Cleanup: simplify struct & enum declarations for C++
This commit is contained in:
parent
2ed108cb84
commit
b8ea968929
|
@ -54,7 +54,7 @@ void BKE_library_callback_remap_editor_id_reference_set(
|
|||
remap_editor_id_reference_cb = func;
|
||||
}
|
||||
|
||||
typedef struct IDRemap {
|
||||
struct IDRemap {
|
||||
eIDRemapType type;
|
||||
Main *bmain; /* Only used to trigger depsgraph updates in the right bmain. */
|
||||
|
||||
|
@ -63,7 +63,7 @@ typedef struct IDRemap {
|
|||
/** The ID in which we are replacing old_id by new_id usages. */
|
||||
ID *id_owner;
|
||||
int flag;
|
||||
} IDRemap;
|
||||
};
|
||||
|
||||
/* IDRemap->flag enums defined in BKE_lib.h */
|
||||
|
||||
|
@ -542,10 +542,10 @@ static void libblock_remap_data(
|
|||
BKE_id_remapper_iter(id_remapper, libblock_remap_data_update_tags, &id_remap_data);
|
||||
}
|
||||
|
||||
typedef struct LibblockRemapMultipleUserData {
|
||||
struct LibBlockRemapMultipleUserData {
|
||||
Main *bmain;
|
||||
int remap_flags;
|
||||
} LibBlockRemapMultipleUserData;
|
||||
};
|
||||
|
||||
static void libblock_remap_foreach_idpair_cb(ID *old_id, ID *new_id, void *user_data)
|
||||
{
|
||||
|
@ -731,10 +731,10 @@ void BKE_libblock_unlink(Main *bmain,
|
|||
* ... sigh
|
||||
*/
|
||||
|
||||
typedef struct LibblockRelinkMultipleUserData {
|
||||
struct LibBlockRelinkMultipleUserData {
|
||||
Main *bmain;
|
||||
LinkNode *ids;
|
||||
} LibBlockRelinkMultipleUserData;
|
||||
};
|
||||
|
||||
static void libblock_relink_foreach_idpair_cb(ID *old_id, ID *new_id, void *user_data)
|
||||
{
|
||||
|
@ -893,10 +893,10 @@ void BKE_libblock_relink_ex(
|
|||
BKE_id_remapper_free(id_remapper);
|
||||
}
|
||||
|
||||
typedef struct RelinkToNewIDData {
|
||||
struct RelinkToNewIDData {
|
||||
LinkNode *ids;
|
||||
IDRemapper *id_remapper;
|
||||
} RelinkToNewIDData;
|
||||
};
|
||||
|
||||
static void libblock_relink_to_newid_prepare_data(Main *bmain,
|
||||
ID *id,
|
||||
|
|
|
@ -488,10 +488,10 @@ static void get_proxy_filepath(const MovieClip *clip,
|
|||
|
||||
#ifdef WITH_OPENEXR
|
||||
|
||||
typedef struct MultilayerConvertContext {
|
||||
struct MultilayerConvertContext {
|
||||
float *combined_pass;
|
||||
int num_combined_channels;
|
||||
} MultilayerConvertContext;
|
||||
};
|
||||
|
||||
static void *movieclip_convert_multilayer_add_view(void * /*ctx_v*/, const char * /*view_name*/)
|
||||
{
|
||||
|
@ -680,7 +680,7 @@ static void movieclip_calc_length(MovieClip *clip)
|
|||
|
||||
/*********************** image buffer cache *************************/
|
||||
|
||||
typedef struct MovieClipCache {
|
||||
struct MovieClipCache {
|
||||
/* regular movie cache */
|
||||
MovieCache *moviecache;
|
||||
|
||||
|
@ -721,17 +721,17 @@ typedef struct MovieClipCache {
|
|||
int sequence_offset;
|
||||
|
||||
bool is_still_sequence;
|
||||
} MovieClipCache;
|
||||
};
|
||||
|
||||
typedef struct MovieClipImBufCacheKey {
|
||||
struct MovieClipImBufCacheKey {
|
||||
int framenr;
|
||||
int proxy;
|
||||
short render_flag;
|
||||
} MovieClipImBufCacheKey;
|
||||
};
|
||||
|
||||
typedef struct MovieClipCachePriorityData {
|
||||
struct MovieClipCachePriorityData {
|
||||
int framenr;
|
||||
} MovieClipCachePriorityData;
|
||||
};
|
||||
|
||||
static int user_frame_to_cache_frame(MovieClip *clip, int framenr)
|
||||
{
|
||||
|
|
|
@ -54,12 +54,12 @@ struct MultiresDisplacementData {
|
|||
|
||||
/* Denotes which grid to use to average value of the displacement read from the
|
||||
* grid which corresponds to the PTEX face. */
|
||||
typedef enum eAverageWith {
|
||||
enum eAverageWith {
|
||||
AVERAGE_WITH_NONE,
|
||||
AVERAGE_WITH_ALL,
|
||||
AVERAGE_WITH_PREV,
|
||||
AVERAGE_WITH_NEXT,
|
||||
} eAverageWith;
|
||||
};
|
||||
|
||||
static int displacement_get_grid_and_coord(SubdivDisplacement *displacement,
|
||||
const int ptex_face_index,
|
||||
|
|
|
@ -75,14 +75,14 @@ static void arena_release(CCGAllocatorHDL a)
|
|||
BLI_memarena_free(reinterpret_cast<MemArena *>(a));
|
||||
}
|
||||
|
||||
typedef enum {
|
||||
enum CCGFlags {
|
||||
CCG_USE_AGING = 1,
|
||||
CCG_USE_ARENA = 2,
|
||||
CCG_CALC_NORMALS = 4,
|
||||
/* add an extra four bytes for a mask layer */
|
||||
CCG_ALLOC_MASK = 8,
|
||||
CCG_SIMPLE_SUBDIV = 16,
|
||||
} CCGFlags;
|
||||
};
|
||||
ENUM_OPERATORS(CCGFlags, CCG_SIMPLE_SUBDIV);
|
||||
|
||||
static CCGSubSurf *_getSubSurf(CCGSubSurf *prevSS, int subdivLevels, int numLayers, CCGFlags flags)
|
||||
|
|
|
@ -711,7 +711,7 @@ struct TempLineInfo {
|
|||
* - Never increase scale to fit, only ever scale on overflow.
|
||||
* \{ */
|
||||
|
||||
typedef struct VFontToCurveIter {
|
||||
struct VFontToCurveIter {
|
||||
int iteraction;
|
||||
float scale_to_fit;
|
||||
struct {
|
||||
|
@ -730,7 +730,7 @@ typedef struct VFontToCurveIter {
|
|||
*/
|
||||
bool word_wrap;
|
||||
int status;
|
||||
} VFontToCurveIter;
|
||||
};
|
||||
|
||||
/** \} */
|
||||
|
||||
|
@ -742,12 +742,12 @@ typedef struct VFontToCurveIter {
|
|||
* text cursor (caret) position or selection range.
|
||||
* \{ */
|
||||
/* Used when translating a mouse cursor location to a position within the string. */
|
||||
typedef struct VFontCursor_Params {
|
||||
struct VFontCursor_Params {
|
||||
/* Mouse cursor location in Object coordinate space as input. */
|
||||
float cursor_location[2];
|
||||
/* Character position within EditFont::textbuf as output. */
|
||||
int r_string_offset;
|
||||
} VFontCursor_Params;
|
||||
};
|
||||
|
||||
enum {
|
||||
VFONT_TO_CURVE_INIT = 0,
|
||||
|
@ -789,7 +789,7 @@ static float vfont_descent(const VFontData *vfd)
|
|||
* Track additional information when using the cursor to select with multiple text boxes.
|
||||
* This gives a more predictable result when the user moves the cursor outside the text-box.
|
||||
*/
|
||||
typedef struct TextBoxBounds_ForCursor {
|
||||
struct TextBoxBounds_ForCursor {
|
||||
/**
|
||||
* Describes the minimum rectangle that contains all characters in a text-box,
|
||||
* values are compatible with #TextBox.
|
||||
|
@ -799,7 +799,7 @@ typedef struct TextBoxBounds_ForCursor {
|
|||
* The last character in this text box or -1 when unfilled.
|
||||
*/
|
||||
int char_index_last;
|
||||
} TextBoxBounds_ForCursor;
|
||||
};
|
||||
|
||||
static bool vfont_to_curve(Object *ob,
|
||||
Curve *cu,
|
||||
|
|
|
@ -1847,11 +1847,11 @@ static void update_noise_node_dimensions(bNodeTree *ntree)
|
|||
/* This structure is only used to pass data to
|
||||
* update_mapping_node_fcurve_rna_path_callback.
|
||||
*/
|
||||
typedef struct {
|
||||
struct MappingNodeFCurveCallbackData {
|
||||
char *nodePath;
|
||||
bNode *minimumNode;
|
||||
bNode *maximumNode;
|
||||
} MappingNodeFCurveCallbackData;
|
||||
};
|
||||
|
||||
/* This callback function is used by update_mapping_node_inputs_and_properties.
|
||||
* It is executed on every fcurve in the nodetree id updating its RNA paths. The
|
||||
|
|
|
@ -163,9 +163,9 @@ BLI_INLINE size_t msg_to_bytes(char *msg, char *bytes, uint32_t size)
|
|||
return i;
|
||||
}
|
||||
|
||||
typedef struct Offset {
|
||||
struct Offset {
|
||||
uint32_t key_offset, key_len, val_offset, val_len;
|
||||
} Offset;
|
||||
};
|
||||
|
||||
/* Return the generated binary output. */
|
||||
static char *generate(GHash *messages, size_t *r_output_size)
|
||||
|
|
|
@ -46,29 +46,29 @@ extern char datatoc_common_view_lib_glsl[];
|
|||
|
||||
/* GPUViewport.storage
|
||||
* Is freed every time the viewport engine changes. */
|
||||
typedef struct EXTERNAL_Storage {
|
||||
struct EXTERNAL_Storage {
|
||||
int dummy;
|
||||
} EXTERNAL_Storage;
|
||||
};
|
||||
|
||||
typedef struct EXTERNAL_StorageList {
|
||||
struct EXTERNAL_StorageList {
|
||||
EXTERNAL_Storage *storage;
|
||||
struct EXTERNAL_PrivateData *g_data;
|
||||
} EXTERNAL_StorageList;
|
||||
};
|
||||
|
||||
typedef struct EXTERNAL_FramebufferList {
|
||||
struct EXTERNAL_FramebufferList {
|
||||
GPUFrameBuffer *depth_buffer_fb;
|
||||
} EXTERNAL_FramebufferList;
|
||||
};
|
||||
|
||||
typedef struct EXTERNAL_TextureList {
|
||||
struct EXTERNAL_TextureList {
|
||||
/* default */
|
||||
GPUTexture *depth_buffer_tx;
|
||||
} EXTERNAL_TextureList;
|
||||
};
|
||||
|
||||
typedef struct EXTERNAL_PassList {
|
||||
struct EXTERNAL_PassList {
|
||||
DRWPass *depth_pass;
|
||||
} EXTERNAL_PassList;
|
||||
};
|
||||
|
||||
typedef struct EXTERNAL_Data {
|
||||
struct EXTERNAL_Data {
|
||||
void *engine_type;
|
||||
EXTERNAL_FramebufferList *fbl;
|
||||
EXTERNAL_TextureList *txl;
|
||||
|
@ -77,7 +77,7 @@ typedef struct EXTERNAL_Data {
|
|||
void *instance_data;
|
||||
|
||||
char info[GPU_INFO_SIZE];
|
||||
} EXTERNAL_Data;
|
||||
};
|
||||
|
||||
/* *********** STATIC *********** */
|
||||
|
||||
|
@ -86,13 +86,13 @@ static struct {
|
|||
GPUShader *depth_sh;
|
||||
} e_data = {nullptr}; /* Engine data */
|
||||
|
||||
typedef struct EXTERNAL_PrivateData {
|
||||
struct EXTERNAL_PrivateData {
|
||||
DRWShadingGroup *depth_shgrp;
|
||||
|
||||
/* Do we need to update the depth or can we reuse the last calculated texture. */
|
||||
bool need_depth;
|
||||
bool update_depth;
|
||||
} EXTERNAL_PrivateData; /* Transient data */
|
||||
}; /* Transient data */
|
||||
|
||||
/* Functions */
|
||||
|
||||
|
|
|
@ -974,12 +974,12 @@ static bool animedit_poll_channels_nla_tweakmode_off(bContext *C)
|
|||
|
||||
/* constants for channel rearranging */
|
||||
/* WARNING: don't change existing ones without modifying rearrange func accordingly */
|
||||
typedef enum eRearrangeAnimChan_Mode {
|
||||
enum eRearrangeAnimChan_Mode {
|
||||
REARRANGE_ANIMCHAN_TOP = -2,
|
||||
REARRANGE_ANIMCHAN_UP = -1,
|
||||
REARRANGE_ANIMCHAN_DOWN = 1,
|
||||
REARRANGE_ANIMCHAN_BOTTOM = 2,
|
||||
} eRearrangeAnimChan_Mode;
|
||||
};
|
||||
|
||||
/* defines for rearranging channels */
|
||||
static const EnumPropertyItem prop_animchannel_rearrange_types[] = {
|
||||
|
@ -1001,12 +1001,12 @@ struct tReorderChannelIsland {
|
|||
};
|
||||
|
||||
/* flags for channel reordering islands */
|
||||
typedef enum eReorderIslandFlag {
|
||||
enum eReorderIslandFlag {
|
||||
REORDER_ISLAND_SELECTED = (1 << 0), /* island is selected */
|
||||
REORDER_ISLAND_UNTOUCHABLE = (1 << 1), /* island should be ignored */
|
||||
REORDER_ISLAND_MOVED = (1 << 2), /* island has already been moved */
|
||||
REORDER_ISLAND_HIDDEN = (1 << 3), /* island is not visible */
|
||||
} eReorderIslandFlag;
|
||||
};
|
||||
|
||||
/* Rearrange Methods --------------------------------------------- */
|
||||
|
||||
|
|
|
@ -854,11 +854,11 @@ void POSE_OT_select_hierarchy(wmOperatorType *ot)
|
|||
/* -------------------------------------- */
|
||||
|
||||
/* modes for select same */
|
||||
typedef enum ePose_SelectSame_Mode {
|
||||
enum ePose_SelectSame_Mode {
|
||||
POSE_SEL_SAME_LAYER = 0,
|
||||
POSE_SEL_SAME_GROUP = 1,
|
||||
POSE_SEL_SAME_KEYINGSET = 2,
|
||||
} ePose_SelectSame_Mode;
|
||||
};
|
||||
|
||||
static bool pose_select_same_group(bContext *C, bool extend)
|
||||
{
|
||||
|
|
|
@ -44,7 +44,7 @@ static CLG_LogRef LOG = {"ed.undo.curve"};
|
|||
/** \name Undo Conversion
|
||||
* \{ */
|
||||
|
||||
typedef struct {
|
||||
struct UndoCurve {
|
||||
ListBase nubase;
|
||||
int actvert;
|
||||
GHash *undoIndex;
|
||||
|
@ -58,7 +58,7 @@ typedef struct {
|
|||
} obedit;
|
||||
|
||||
size_t undo_size;
|
||||
} UndoCurve;
|
||||
};
|
||||
|
||||
static void undocurve_to_editcurve(Main *bmain, UndoCurve *ucu, Curve *cu, short *r_shapenr)
|
||||
{
|
||||
|
|
|
@ -50,10 +50,10 @@
|
|||
#include "eyedropper_intern.hh"
|
||||
#include "interface_intern.hh"
|
||||
|
||||
typedef enum eGP_EyeMode {
|
||||
enum eGP_EyeMode {
|
||||
GP_EYE_MATERIAL = 0,
|
||||
GP_EYE_PALETTE = 1,
|
||||
} eGP_EyeMode;
|
||||
};
|
||||
|
||||
struct EyedropperGPencil {
|
||||
ColorManagedDisplay *display;
|
||||
|
|
|
@ -113,11 +113,11 @@ void LATTICE_OT_make_regular(wmOperatorType *ot)
|
|||
* \{ */
|
||||
|
||||
/* flipping options */
|
||||
typedef enum eLattice_FlipAxes {
|
||||
enum eLattice_FlipAxes {
|
||||
LATTICE_FLIP_U = 0,
|
||||
LATTICE_FLIP_V = 1,
|
||||
LATTICE_FLIP_W = 2,
|
||||
} eLattice_FlipAxes;
|
||||
};
|
||||
|
||||
/**
|
||||
* Flip midpoint value so that relative distances between midpoint and neighbor-pair is maintained.
|
||||
|
|
|
@ -64,13 +64,13 @@ static const float value_clamp_max[NUM_VALUE_KINDS] = {1e6, 100.0f, 1.0f, SEGMEN
|
|||
static const float value_start[NUM_VALUE_KINDS] = {0.0f, 0.0f, 0.5f, 1.0f};
|
||||
static const float value_scale_per_inch[NUM_VALUE_KINDS] = {0.0f, 100.0f, 1.0f, 4.0f};
|
||||
|
||||
typedef struct {
|
||||
struct BevelObjectStore {
|
||||
/** Every object must have a valid #BMEditMesh. */
|
||||
Object *ob;
|
||||
BMBackup mesh_backup;
|
||||
} BevelObjectStore;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct BevelData {
|
||||
float initial_length[NUM_VALUE_KINDS];
|
||||
float scale[NUM_VALUE_KINDS];
|
||||
NumInput num_input[NUM_VALUE_KINDS];
|
||||
|
@ -90,7 +90,7 @@ typedef struct {
|
|||
float segments; /* Segments as float so smooth mouse pan works in small increments */
|
||||
|
||||
CurveProfile *custom_profile;
|
||||
} BevelData;
|
||||
};
|
||||
|
||||
enum {
|
||||
BEV_MODAL_CANCEL = 1,
|
||||
|
|
|
@ -215,10 +215,10 @@ static BMEdge *edbm_ripsel_edge_mark_step(BMVert *v, const int uid)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
typedef struct EdgeLoopPair {
|
||||
struct EdgeLoopPair {
|
||||
BMLoop *l_a;
|
||||
BMLoop *l_b;
|
||||
} EdgeLoopPair;
|
||||
};
|
||||
|
||||
static EdgeLoopPair *edbm_ripsel_looptag_helper(BMesh *bm)
|
||||
{
|
||||
|
@ -396,10 +396,10 @@ static void edbm_ripsel_deselect_helper(BMesh *bm,
|
|||
* So for now this is a known limitation of current rip-fill option.
|
||||
*/
|
||||
|
||||
typedef struct UnorderedLoopPair {
|
||||
struct UnorderedLoopPair {
|
||||
BMLoop *l_pair[2];
|
||||
char flag;
|
||||
} UnorderedLoopPair;
|
||||
};
|
||||
enum {
|
||||
ULP_FLIP_0 = (1 << 0),
|
||||
ULP_FLIP_1 = (1 << 1),
|
||||
|
|
|
@ -269,10 +269,10 @@ static DerivedMesh *multiresbake_create_hiresdm(Scene *scene, Object *ob, int *l
|
|||
return dm;
|
||||
}
|
||||
|
||||
typedef enum ClearFlag {
|
||||
enum ClearFlag {
|
||||
CLEAR_TANGENT_NORMAL = 1,
|
||||
CLEAR_DISPLACEMENT = 2,
|
||||
} ClearFlag;
|
||||
};
|
||||
|
||||
static void clear_single_image(Image *image, ClearFlag flag)
|
||||
{
|
||||
|
|
|
@ -991,10 +991,10 @@ void PARTICLE_OT_connect_hair(wmOperatorType *ot)
|
|||
|
||||
/************************ particle system copy operator *********************/
|
||||
|
||||
typedef enum eCopyParticlesSpace {
|
||||
enum eCopyParticlesSpace {
|
||||
PAR_COPY_SPACE_OBJECT = 0,
|
||||
PAR_COPY_SPACE_WORLD = 1,
|
||||
} eCopyParticlesSpace;
|
||||
};
|
||||
|
||||
static void copy_particle_edit(Depsgraph *depsgraph,
|
||||
Scene *scene,
|
||||
|
|
|
@ -1318,13 +1318,13 @@ void SCULPT_cloth_plane_falloff_preview_draw(const uint gpuattr,
|
|||
|
||||
/* Cloth Filter. */
|
||||
|
||||
typedef enum eSculpClothFilterType {
|
||||
enum eSculptClothFilterType {
|
||||
CLOTH_FILTER_GRAVITY,
|
||||
CLOTH_FILTER_INFLATE,
|
||||
CLOTH_FILTER_EXPAND,
|
||||
CLOTH_FILTER_PINCH,
|
||||
CLOTH_FILTER_SCALE,
|
||||
} eSculptClothFilterType;
|
||||
};
|
||||
|
||||
static EnumPropertyItem prop_cloth_filter_type[] = {
|
||||
{CLOTH_FILTER_GRAVITY, "GRAVITY", 0, "Gravity", "Applies gravity to the simulation"},
|
||||
|
@ -1358,11 +1358,11 @@ static EnumPropertyItem prop_cloth_filter_orientation_items[] = {
|
|||
{0, nullptr, 0, nullptr, nullptr},
|
||||
};
|
||||
|
||||
typedef enum eClothFilterForceAxis {
|
||||
enum eClothFilterForceAxis {
|
||||
CLOTH_FILTER_FORCE_X = 1 << 0,
|
||||
CLOTH_FILTER_FORCE_Y = 1 << 1,
|
||||
CLOTH_FILTER_FORCE_Z = 1 << 2,
|
||||
} eClothFilterForceAxis;
|
||||
};
|
||||
|
||||
static EnumPropertyItem prop_cloth_filter_force_axis_items[] = {
|
||||
{CLOTH_FILTER_FORCE_X, "X", 0, "X", "Apply force in the X axis"},
|
||||
|
|
|
@ -146,10 +146,10 @@ void SCULPT_OT_detail_flood_fill(wmOperatorType *ot)
|
|||
/** \name Sample Detail Size
|
||||
* \{ */
|
||||
|
||||
typedef enum eSculptSampleDetailModeTypes {
|
||||
enum eSculptSampleDetailModeTypes {
|
||||
SAMPLE_DETAIL_DYNTOPO = 0,
|
||||
SAMPLE_DETAIL_VOXEL = 1,
|
||||
} eSculptSampleDetailModeTypes;
|
||||
};
|
||||
|
||||
static EnumPropertyItem prop_sculpt_sample_detail_mode_types[] = {
|
||||
{SAMPLE_DETAIL_DYNTOPO, "DYNTOPO", 0, "Dyntopo", "Sample dyntopo detail"},
|
||||
|
|
|
@ -265,7 +265,7 @@ void SCULPT_filter_cache_free(SculptSession *ss)
|
|||
ss->filter_cache = nullptr;
|
||||
}
|
||||
|
||||
typedef enum eSculptMeshFilterType {
|
||||
enum eSculptMeshFilterType {
|
||||
MESH_FILTER_SMOOTH = 0,
|
||||
MESH_FILTER_SCALE = 1,
|
||||
MESH_FILTER_INFLATE = 2,
|
||||
|
@ -277,7 +277,7 @@ typedef enum eSculptMeshFilterType {
|
|||
MESH_FILTER_SHARPEN = 8,
|
||||
MESH_FILTER_ENHANCE_DETAILS = 9,
|
||||
MESH_FILTER_ERASE_DISPLACEMENT = 10,
|
||||
} eSculptMeshFilterType;
|
||||
};
|
||||
|
||||
static EnumPropertyItem prop_mesh_filter_types[] = {
|
||||
{MESH_FILTER_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth mesh"},
|
||||
|
@ -310,11 +310,11 @@ static EnumPropertyItem prop_mesh_filter_types[] = {
|
|||
{0, nullptr, 0, nullptr, nullptr},
|
||||
};
|
||||
|
||||
typedef enum eMeshFilterDeformAxis {
|
||||
enum eMeshFilterDeformAxis {
|
||||
MESH_FILTER_DEFORM_X = 1 << 0,
|
||||
MESH_FILTER_DEFORM_Y = 1 << 1,
|
||||
MESH_FILTER_DEFORM_Z = 1 << 2,
|
||||
} eMeshFilterDeformAxis;
|
||||
};
|
||||
|
||||
static EnumPropertyItem prop_mesh_filter_deform_axis_items[] = {
|
||||
{MESH_FILTER_DEFORM_X, "X", 0, "X", "Deform in the X axis"},
|
||||
|
|
|
@ -220,7 +220,7 @@ void uiTemplateTrack(uiLayout *layout, PointerRNA *ptr, const char *propname)
|
|||
#define B_MARKER_SEARCH_DIM 7
|
||||
#define B_MARKER_FLAG 8
|
||||
|
||||
typedef struct {
|
||||
struct MarkerUpdateCb {
|
||||
/** compact mode */
|
||||
int compact;
|
||||
|
||||
|
@ -242,7 +242,7 @@ typedef struct {
|
|||
float marker_search_pos[2], marker_search[2];
|
||||
/** marker's flags */
|
||||
int marker_flag;
|
||||
} MarkerUpdateCb;
|
||||
};
|
||||
|
||||
static void to_pixel_space(float r[2], const float a[2], int width, int height)
|
||||
{
|
||||
|
|
|
@ -54,9 +54,9 @@ static bool clip_graph_knots_poll(bContext *C)
|
|||
return false;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
struct SelectUserData {
|
||||
int action;
|
||||
} SelectUserData;
|
||||
};
|
||||
|
||||
static void toggle_selection_cb(void *userdata, MovieTrackingMarker *marker)
|
||||
{
|
||||
|
@ -77,7 +77,7 @@ static void toggle_selection_cb(void *userdata, MovieTrackingMarker *marker)
|
|||
|
||||
/******************** mouse select operator ********************/
|
||||
|
||||
typedef struct {
|
||||
struct MouseSelectUserData {
|
||||
SpaceClip *sc;
|
||||
eClipCurveValueSource value_source;
|
||||
bool has_prev; /* if there's valid coordinate of previous point of curve segment */
|
||||
|
@ -89,7 +89,7 @@ typedef struct {
|
|||
|
||||
MovieTrackingTrack *track; /* nearest found track */
|
||||
MovieTrackingMarker *marker; /* nearest found marker */
|
||||
} MouseSelectUserData;
|
||||
};
|
||||
|
||||
static void find_nearest_tracking_segment_cb(void *userdata,
|
||||
MovieTrackingTrack *track,
|
||||
|
@ -586,9 +586,9 @@ void CLIP_OT_graph_delete_knot(wmOperatorType *ot)
|
|||
|
||||
/******************** view all operator ********************/
|
||||
|
||||
typedef struct {
|
||||
struct ViewAllUserData {
|
||||
float min, max;
|
||||
} ViewAllUserData;
|
||||
};
|
||||
|
||||
static void view_all_cb(void *userdata,
|
||||
MovieTrackingTrack * /*track*/,
|
||||
|
|
|
@ -332,16 +332,16 @@ void CLIP_OT_delete_marker(wmOperatorType *ot)
|
|||
/** \name Slide Marker Operator
|
||||
* \{ */
|
||||
|
||||
typedef enum eSlideAction {
|
||||
enum eSlideAction {
|
||||
SLIDE_ACTION_NONE,
|
||||
|
||||
SLIDE_ACTION_POS,
|
||||
SLIDE_ACTION_SIZE,
|
||||
SLIDE_ACTION_OFFSET,
|
||||
SLIDE_ACTION_TILT_SIZE,
|
||||
} eSlideAction;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct SlideMarkerData {
|
||||
short area;
|
||||
eSlideAction action;
|
||||
MovieTrackingTrack *track;
|
||||
|
@ -357,7 +357,7 @@ typedef struct {
|
|||
float old_search_min[2], old_search_max[2], old_pos[2];
|
||||
float old_corners[4][2];
|
||||
float (*old_markers)[2];
|
||||
} SlideMarkerData;
|
||||
};
|
||||
|
||||
static void slide_marker_tilt_slider_relative(const float pattern_corners[4][2], float r_slider[2])
|
||||
{
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
/********************** solve camera operator *********************/
|
||||
|
||||
typedef struct {
|
||||
struct SolveCameraJob {
|
||||
wmWindowManager *wm;
|
||||
Scene *scene;
|
||||
MovieClip *clip;
|
||||
|
@ -45,7 +45,7 @@ typedef struct {
|
|||
char stats_message[256];
|
||||
|
||||
MovieReconstructContext *context;
|
||||
} SolveCameraJob;
|
||||
};
|
||||
|
||||
static bool solve_camera_initjob(
|
||||
bContext *C, SolveCameraJob *scj, wmOperator *op, char *error_msg, int max_error)
|
||||
|
|
|
@ -90,11 +90,11 @@ static FileSelection find_file_mouse_rect(SpaceFile *sfile,
|
|||
return sel;
|
||||
}
|
||||
|
||||
typedef enum FileSelect {
|
||||
enum FileSelect {
|
||||
FILE_SELECT_NOTHING = 0,
|
||||
FILE_SELECT_DIR = 1,
|
||||
FILE_SELECT_FILE = 2,
|
||||
} FileSelect;
|
||||
};
|
||||
|
||||
static void clamp_to_filelist(int numfiles, FileSelection *sel)
|
||||
{
|
||||
|
|
|
@ -63,12 +63,12 @@
|
|||
* \{ */
|
||||
|
||||
/* Mode defines for insert keyframes tool. */
|
||||
typedef enum eGraphKeys_InsertKey_Types {
|
||||
enum eGraphKeys_InsertKey_Types {
|
||||
GRAPHKEYS_INSERTKEY_ALL = (1 << 0),
|
||||
GRAPHKEYS_INSERTKEY_SEL = (1 << 1),
|
||||
GRAPHKEYS_INSERTKEY_CURSOR = (1 << 2),
|
||||
GRAPHKEYS_INSERTKEY_ACTIVE = (1 << 3),
|
||||
} eGraphKeys_InsertKey_Types;
|
||||
};
|
||||
|
||||
/* RNA mode types for insert keyframes tool. */
|
||||
static const EnumPropertyItem prop_graphkeys_insertkey_types[] = {
|
||||
|
|
|
@ -1230,11 +1230,11 @@ void GRAPH_OT_gaussian_smooth(wmOperatorType *ot)
|
|||
/** \name Butterworth Smooth Operator
|
||||
* \{ */
|
||||
|
||||
typedef struct tBtwOperatorData {
|
||||
struct tBtwOperatorData {
|
||||
ButterworthCoefficients *coefficients;
|
||||
ListBase segment_links; /* tFCurveSegmentLink */
|
||||
ListBase anim_data; /* bAnimListElem */
|
||||
} tBtwOperatorData;
|
||||
};
|
||||
|
||||
static int btw_calculate_sample_count(BezTriple *right_bezt,
|
||||
BezTriple *left_bezt,
|
||||
|
|
|
@ -78,7 +78,7 @@ enum {
|
|||
};
|
||||
|
||||
/* relative view axis locking - xlock, zlock */
|
||||
typedef enum eFlyPanState {
|
||||
enum eFlyPanState {
|
||||
/* disabled */
|
||||
FLY_AXISLOCK_STATE_OFF = 0,
|
||||
|
||||
|
@ -89,7 +89,7 @@ typedef enum eFlyPanState {
|
|||
/* mouse moved and checking needed,
|
||||
* if no view altering is done its changed back to #FLY_AXISLOCK_STATE_IDLE */
|
||||
FLY_AXISLOCK_STATE_ACTIVE = 2,
|
||||
} eFlyPanState;
|
||||
};
|
||||
|
||||
void fly_modal_keymap(wmKeyConfig *keyconf)
|
||||
{
|
||||
|
|
|
@ -100,25 +100,25 @@ enum {
|
|||
WALK_BIT_DOWN = 1 << 5,
|
||||
};
|
||||
|
||||
typedef enum eWalkTeleportState {
|
||||
enum eWalkTeleportState {
|
||||
WALK_TELEPORT_STATE_OFF = 0,
|
||||
WALK_TELEPORT_STATE_ON,
|
||||
} eWalkTeleportState;
|
||||
};
|
||||
|
||||
typedef enum eWalkMethod {
|
||||
enum eWalkMethod {
|
||||
WALK_MODE_FREE = 0,
|
||||
WALK_MODE_GRAVITY,
|
||||
} eWalkMethod;
|
||||
};
|
||||
|
||||
typedef enum eWalkGravityState {
|
||||
enum eWalkGravityState {
|
||||
WALK_GRAVITY_STATE_OFF = 0,
|
||||
WALK_GRAVITY_STATE_JUMP,
|
||||
WALK_GRAVITY_STATE_START,
|
||||
WALK_GRAVITY_STATE_ON,
|
||||
} eWalkGravityState;
|
||||
};
|
||||
|
||||
/* Relative view axis z axis locking. */
|
||||
typedef enum eWalkLockState {
|
||||
enum eWalkLockState {
|
||||
/* Disabled. */
|
||||
WALK_AXISLOCK_STATE_OFF = 0,
|
||||
|
||||
|
@ -127,7 +127,7 @@ typedef enum eWalkLockState {
|
|||
|
||||
/* Done moving, it cannot be activated again. */
|
||||
WALK_AXISLOCK_STATE_DONE = 3,
|
||||
} eWalkLockState;
|
||||
};
|
||||
|
||||
void walk_modal_keymap(wmKeyConfig *keyconf)
|
||||
{
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
/** \name Image Pixel Sample Struct (Operator Custom Data)
|
||||
* \{ */
|
||||
|
||||
typedef struct ImageSampleInfo {
|
||||
struct ImageSampleInfo {
|
||||
ARegionType *art;
|
||||
void *draw_handle;
|
||||
int x, y;
|
||||
|
@ -68,7 +68,7 @@ typedef struct ImageSampleInfo {
|
|||
bool draw;
|
||||
bool color_manage;
|
||||
int use_default_view;
|
||||
} ImageSampleInfo;
|
||||
};
|
||||
|
||||
/** \} */
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#define IMAGIC 0732
|
||||
|
||||
typedef struct {
|
||||
struct IMAGE {
|
||||
ushort imagic; /* Stuff saved on disk. */
|
||||
ushort type;
|
||||
ushort dim;
|
||||
|
@ -36,7 +36,7 @@ typedef struct {
|
|||
char name[80];
|
||||
uint colormap;
|
||||
uchar _pad2[404];
|
||||
} IMAGE;
|
||||
};
|
||||
|
||||
#define HEADER_SIZE 512
|
||||
|
||||
|
|
|
@ -93,13 +93,13 @@ typedef struct {
|
|||
} buffer_struct;
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
struct my_source_mgr {
|
||||
jpeg_source_mgr pub; /* public fields */
|
||||
|
||||
const uchar *buffer;
|
||||
int size;
|
||||
JOCTET terminal[2];
|
||||
} my_source_mgr;
|
||||
};
|
||||
|
||||
typedef my_source_mgr *my_src_ptr;
|
||||
|
||||
|
|
|
@ -128,13 +128,13 @@ static bool get_thumb_dir(char *dir, ThumbSize size)
|
|||
*
|
||||
* \{ */
|
||||
|
||||
typedef enum {
|
||||
enum UnsafeCharacterSet {
|
||||
UNSAFE_ALL = 0x1, /* Escape all unsafe characters. */
|
||||
UNSAFE_ALLOW_PLUS = 0x2, /* Allows '+' */
|
||||
UNSAFE_PATH = 0x8, /* Allows '/', '&', '=', ':', '@', '+', '$' and ',' */
|
||||
UNSAFE_HOST = 0x10, /* Allows '/' and ':' and '@' */
|
||||
UNSAFE_SLASHES = 0x20, /* Allows all characters except for '/' and '%' */
|
||||
} UnsafeCharacterSet;
|
||||
};
|
||||
|
||||
/* Don't lose comment alignment. */
|
||||
/* clang-format off */
|
||||
|
|
|
@ -978,11 +978,11 @@ static int elem_offset(const SDNA *sdna,
|
|||
}
|
||||
|
||||
/* Each struct member belongs to one of the categories below. */
|
||||
typedef enum eStructMemberCategory {
|
||||
enum eStructMemberCategory {
|
||||
STRUCT_MEMBER_CATEGORY_STRUCT,
|
||||
STRUCT_MEMBER_CATEGORY_PRIMITIVE,
|
||||
STRUCT_MEMBER_CATEGORY_POINTER,
|
||||
} eStructMemberCategory;
|
||||
};
|
||||
|
||||
static eStructMemberCategory get_struct_member_category(const SDNA *sdna,
|
||||
const SDNA_StructMember *member)
|
||||
|
@ -1077,16 +1077,16 @@ void DNA_struct_switch_endian(const SDNA *sdna, int struct_nr, char *data)
|
|||
}
|
||||
}
|
||||
|
||||
typedef enum eReconstructStepType {
|
||||
enum eReconstructStepType {
|
||||
RECONSTRUCT_STEP_MEMCPY,
|
||||
RECONSTRUCT_STEP_CAST_PRIMITIVE,
|
||||
RECONSTRUCT_STEP_CAST_POINTER_TO_32,
|
||||
RECONSTRUCT_STEP_CAST_POINTER_TO_64,
|
||||
RECONSTRUCT_STEP_SUBSTRUCT,
|
||||
RECONSTRUCT_STEP_INIT_ZERO,
|
||||
} eReconstructStepType;
|
||||
};
|
||||
|
||||
typedef struct ReconstructStep {
|
||||
struct ReconstructStep {
|
||||
eReconstructStepType type;
|
||||
union {
|
||||
struct {
|
||||
|
@ -1114,16 +1114,16 @@ typedef struct ReconstructStep {
|
|||
short new_struct_nr;
|
||||
} substruct;
|
||||
} data;
|
||||
} ReconstructStep;
|
||||
};
|
||||
|
||||
typedef struct DNA_ReconstructInfo {
|
||||
struct DNA_ReconstructInfo {
|
||||
const SDNA *oldsdna;
|
||||
const SDNA *newsdna;
|
||||
const char *compare_flags;
|
||||
|
||||
int *step_counts;
|
||||
ReconstructStep **steps;
|
||||
} DNA_ReconstructInfo;
|
||||
};
|
||||
|
||||
static void reconstruct_structs(const DNA_ReconstructInfo *reconstruct_info,
|
||||
const int blocks,
|
||||
|
|
|
@ -31,13 +31,13 @@
|
|||
#include "wm_window.h"
|
||||
|
||||
/* Blender custom cursor. */
|
||||
typedef struct BCursor {
|
||||
struct BCursor {
|
||||
char *bitmap;
|
||||
char *mask;
|
||||
char hotx;
|
||||
char hoty;
|
||||
bool can_invert_color;
|
||||
} BCursor;
|
||||
};
|
||||
|
||||
static BCursor *BlenderCursor[WM_CURSOR_NUM] = {0};
|
||||
|
||||
|
|
Loading…
Reference in New Issue