From 99520e3f92e14eb3b7fab3f7decd0914a3da1360 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 17 Oct 2017 13:43:10 +1100 Subject: Cleanup: use 'e' prefix for enum typedefs Convention was only followed loosely, apply to DNA where changes aren't likely to conflict. (Skipped ModifierType for eg). --- source/blender/blenkernel/BKE_brush.h | 5 ++- source/blender/blenkernel/BKE_paint.h | 24 +++++------ source/blender/blenkernel/intern/brush.c | 3 +- source/blender/blenkernel/intern/paint.c | 16 +++---- source/blender/blenkernel/intern/writeffmpeg.c | 2 +- source/blender/blenlib/BLI_string_cursor_utf8.h | 22 +++++----- source/blender/blenlib/intern/string_cursor_utf8.c | 50 ++++++++++++++-------- source/blender/blenloader/BLO_readfile.h | 6 +-- .../include/ED_transform_snap_object_context.h | 4 +- .../blender/editors/interface/interface_handlers.c | 6 +-- source/blender/editors/object/object_bake_api.c | 14 +++--- source/blender/editors/object/object_edit.c | 6 +-- source/blender/editors/sculpt_paint/paint_cursor.c | 14 +++--- source/blender/editors/sculpt_paint/paint_curve.c | 6 +-- source/blender/editors/sculpt_paint/paint_image.c | 14 +++--- source/blender/editors/sculpt_paint/paint_intern.h | 16 +++---- source/blender/editors/sculpt_paint/paint_ops.c | 6 +-- source/blender/editors/sculpt_paint/paint_stroke.c | 22 +++++----- source/blender/editors/sculpt_paint/paint_utils.c | 2 +- source/blender/editors/sculpt_paint/sculpt.c | 2 +- source/blender/editors/space_file/file_ops.c | 2 +- source/blender/editors/space_view3d/drawobject.c | 2 +- source/blender/editors/transform/transform_snap.c | 6 +-- .../editors/transform/transform_snap_object.c | 12 +++--- source/blender/makesdna/DNA_action_types.h | 4 +- source/blender/makesdna/DNA_boid_types.h | 12 +++--- source/blender/makesdna/DNA_brush_types.h | 30 ++++++------- source/blender/makesdna/DNA_color_types.h | 4 +- source/blender/makesdna/DNA_constraint_types.h | 19 ++++---- source/blender/makesdna/DNA_meshdata_types.h | 6 +-- source/blender/makesdna/DNA_modifier_types.h | 6 +-- source/blender/makesdna/DNA_object_force.h | 6 +-- source/blender/makesdna/DNA_object_types.h | 4 +- source/blender/makesdna/DNA_packedFile_types.h | 2 +- source/blender/makesdna/DNA_scene_types.h | 50 +++++++++++----------- source/blender/makesdna/DNA_space_types.h | 4 +- source/blender/makesrna/intern/rna_brush.c | 4 +- source/blender/render/extern/include/RE_bake.h | 12 +++--- source/blender/render/intern/source/bake_api.c | 12 +++--- .../blender/render/intern/source/external_engine.c | 2 +- source/blender/windowmanager/intern/wm_draw.c | 2 +- 41 files changed, 228 insertions(+), 213 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/BKE_brush.h b/source/blender/blenkernel/BKE_brush.h index 7c2873046d5..e7af7400850 100644 --- a/source/blender/blenkernel/BKE_brush.h +++ b/source/blender/blenkernel/BKE_brush.h @@ -27,13 +27,14 @@ * General operations for brushes. */ +enum eCurveMappingPreset; struct Brush; struct ImBuf; struct ImagePool; struct Main; struct Scene; struct UnifiedPaintSettings; -// enum CurveMappingPreset; +// enum eCurveMappingPreset; /* globals for brush execution */ @@ -68,7 +69,7 @@ void BKE_brush_jitter_pos( void BKE_brush_randomize_texture_coords(struct UnifiedPaintSettings *ups, bool mask); /* brush curve */ -void BKE_brush_curve_preset(struct Brush *b, int preset); +void BKE_brush_curve_preset(struct Brush *b, enum eCurveMappingPreset preset); float BKE_brush_curve_strength_clamped(struct Brush *br, float p, const float len); float BKE_brush_curve_strength(const struct Brush *br, float p, const float len); diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index 3a70819ec58..dff7f65b39a 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -58,14 +58,14 @@ struct Tex; struct ImagePool; struct UnifiedPaintSettings; -enum OverlayFlags; +enum eOverlayFlags; extern const char PAINT_CURSOR_SCULPT[3]; extern const char PAINT_CURSOR_VERTEX_PAINT[3]; extern const char PAINT_CURSOR_WEIGHT_PAINT[3]; extern const char PAINT_CURSOR_TEXTURE_PAINT[3]; -typedef enum PaintMode { +typedef enum ePaintMode { ePaintSculpt = 0, ePaintVertex = 1, ePaintWeight = 2, @@ -73,17 +73,17 @@ typedef enum PaintMode { ePaintTexture2D = 4, ePaintSculptUV = 5, ePaintInvalid = 6 -} PaintMode; +} ePaintMode; /* overlay invalidation */ -typedef enum OverlayControlFlags { +typedef enum eOverlayControlFlags { PAINT_INVALID_OVERLAY_TEXTURE_PRIMARY = 1, PAINT_INVALID_OVERLAY_TEXTURE_SECONDARY = (1 << 2), PAINT_INVALID_OVERLAY_CURVE = (1 << 3), PAINT_OVERLAY_OVERRIDE_CURSOR = (1 << 4), PAINT_OVERLAY_OVERRIDE_PRIMARY = (1 << 5), PAINT_OVERLAY_OVERRIDE_SECONDARY = (1 << 6) -} OverlayControlFlags; +} eOverlayControlFlags; #define PAINT_OVERRIDE_MASK (PAINT_OVERLAY_OVERRIDE_SECONDARY | \ PAINT_OVERLAY_OVERRIDE_PRIMARY | \ @@ -92,9 +92,9 @@ typedef enum OverlayControlFlags { void BKE_paint_invalidate_overlay_tex(struct Scene *scene, const struct Tex *tex); void BKE_paint_invalidate_cursor_overlay(struct Scene *scene, struct CurveMapping *curve); void BKE_paint_invalidate_overlay_all(void); -OverlayControlFlags BKE_paint_get_overlay_flags(void); -void BKE_paint_reset_overlay_invalid(OverlayControlFlags flag); -void BKE_paint_set_overlay_override(enum OverlayFlags flag); +eOverlayControlFlags BKE_paint_get_overlay_flags(void); +void BKE_paint_reset_overlay_invalid(eOverlayControlFlags flag); +void BKE_paint_set_overlay_override(enum eOverlayFlags flag); /* palettes */ void BKE_palette_free(struct Palette *palette); @@ -116,17 +116,17 @@ void BKE_paint_curve_copy_data( struct PaintCurve *BKE_paint_curve_copy(struct Main *bmain, const struct PaintCurve *pc); void BKE_paint_curve_make_local(struct Main *bmain, struct PaintCurve *pc, const bool lib_local); -void BKE_paint_init(struct Scene *sce, PaintMode mode, const char col[3]); +void BKE_paint_init(struct Scene *sce, ePaintMode mode, const char col[3]); void BKE_paint_free(struct Paint *p); void BKE_paint_copy(struct Paint *src, struct Paint *tar, const int flag); void BKE_paint_cavity_curve_preset(struct Paint *p, int preset); -short BKE_paint_object_mode_from_paint_mode(PaintMode mode); -struct Paint *BKE_paint_get_active_from_paintmode(struct Scene *sce, PaintMode mode); +short BKE_paint_object_mode_from_paint_mode(ePaintMode mode); +struct Paint *BKE_paint_get_active_from_paintmode(struct Scene *sce, ePaintMode mode); struct Paint *BKE_paint_get_active(struct Scene *sce); struct Paint *BKE_paint_get_active_from_context(const struct bContext *C); -PaintMode BKE_paintmode_get_active_from_context(const struct bContext *C); +ePaintMode BKE_paintmode_get_active_from_context(const struct bContext *C); struct Brush *BKE_paint_brush(struct Paint *paint); void BKE_paint_brush_set(struct Paint *paint, struct Brush *br); struct Palette *BKE_paint_palette(struct Paint *paint); diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index aeaead578a1..c36c6c56d5e 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -438,9 +438,8 @@ void BKE_brush_sculpt_reset(Brush *br) /** * Library Operations - * \param preset CurveMappingPreset */ -void BKE_brush_curve_preset(Brush *b, int preset) +void BKE_brush_curve_preset(Brush *b, eCurveMappingPreset preset) { CurveMap *cm = NULL; diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index 62af61585c1..c1ad31a1cab 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -72,7 +72,7 @@ const char PAINT_CURSOR_VERTEX_PAINT[3] = {255, 255, 255}; const char PAINT_CURSOR_WEIGHT_PAINT[3] = {200, 200, 255}; const char PAINT_CURSOR_TEXTURE_PAINT[3] = {255, 255, 255}; -static OverlayControlFlags overlay_flags = 0; +static eOverlayControlFlags overlay_flags = 0; void BKE_paint_invalidate_overlay_tex(Scene *scene, const Tex *tex) { @@ -104,12 +104,12 @@ void BKE_paint_invalidate_overlay_all(void) PAINT_INVALID_OVERLAY_CURVE); } -OverlayControlFlags BKE_paint_get_overlay_flags(void) +eOverlayControlFlags BKE_paint_get_overlay_flags(void) { return overlay_flags; } -void BKE_paint_set_overlay_override(OverlayFlags flags) +void BKE_paint_set_overlay_override(eOverlayFlags flags) { if (flags & BRUSH_OVERLAY_OVERRIDE_MASK) { if (flags & BRUSH_OVERLAY_CURSOR_OVERRIDE_ON_STROKE) @@ -124,12 +124,12 @@ void BKE_paint_set_overlay_override(OverlayFlags flags) } } -void BKE_paint_reset_overlay_invalid(OverlayControlFlags flag) +void BKE_paint_reset_overlay_invalid(eOverlayControlFlags flag) { overlay_flags &= ~(flag); } -Paint *BKE_paint_get_active_from_paintmode(Scene *sce, PaintMode mode) +Paint *BKE_paint_get_active_from_paintmode(Scene *sce, ePaintMode mode) { if (sce) { ToolSettings *ts = sce->toolsettings; @@ -235,7 +235,7 @@ Paint *BKE_paint_get_active_from_context(const bContext *C) return NULL; } -PaintMode BKE_paintmode_get_active_from_context(const bContext *C) +ePaintMode BKE_paintmode_get_active_from_context(const bContext *C) { Scene *sce = CTX_data_scene(C); SpaceImage *sima; @@ -496,7 +496,7 @@ void BKE_paint_cavity_curve_preset(Paint *p, int preset) curvemapping_changed(p->cavity_curve, false); } -short BKE_paint_object_mode_from_paint_mode(PaintMode mode) +short BKE_paint_object_mode_from_paint_mode(ePaintMode mode) { switch (mode) { case ePaintSculpt: @@ -517,7 +517,7 @@ short BKE_paint_object_mode_from_paint_mode(PaintMode mode) } } -void BKE_paint_init(Scene *sce, PaintMode mode, const char col[3]) +void BKE_paint_init(Scene *sce, ePaintMode mode, const char col[3]) { UnifiedPaintSettings *ups = &sce->toolsettings->unified_paint_settings; Brush *brush; diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index a19e4142894..b5484291e37 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -75,7 +75,7 @@ typedef struct FFMpegContext { bool ffmpeg_preview; int ffmpeg_crf; /* set to 0 to not use CRF mode; we have another flag for lossless anyway. */ - int ffmpeg_preset; /* see FFMpegPreset */ + int ffmpeg_preset; /* see eFFMpegPreset */ AVFormatContext *outfile; AVStream *video_stream; diff --git a/source/blender/blenlib/BLI_string_cursor_utf8.h b/source/blender/blenlib/BLI_string_cursor_utf8.h index b4d354b7e37..e7776aa0f0d 100644 --- a/source/blender/blenlib/BLI_string_cursor_utf8.h +++ b/source/blender/blenlib/BLI_string_cursor_utf8.h @@ -30,26 +30,28 @@ * \ingroup bli */ -typedef enum strCursorJumpType { +typedef enum eStrCursorJumpType { STRCUR_JUMP_NONE, STRCUR_JUMP_DELIM, STRCUR_JUMP_ALL -} strCursorJumpType; +} eStrCursorJumpType; -typedef enum strCursorJumpDirection { +typedef enum eStrCursorJumpDirection { STRCUR_DIR_PREV, STRCUR_DIR_NEXT -} strCursorJumpDirection; +} eStrCursorJumpDirection; bool BLI_str_cursor_step_next_utf8(const char *str, size_t maxlen, int *pos); bool BLI_str_cursor_step_prev_utf8(const char *str, size_t maxlen, int *pos); -void BLI_str_cursor_step_utf8(const char *str, size_t maxlen, - int *pos, strCursorJumpDirection direction, - strCursorJumpType jump, bool use_init_step); +void BLI_str_cursor_step_utf8( + const char *str, size_t maxlen, + int *pos, eStrCursorJumpDirection direction, + eStrCursorJumpType jump, bool use_init_step); -void BLI_str_cursor_step_wchar(const wchar_t *str, size_t maxlen, - int *pos, strCursorJumpDirection direction, - strCursorJumpType jump, bool use_init_step); +void BLI_str_cursor_step_wchar( + const wchar_t *str, size_t maxlen, + int *pos, eStrCursorJumpDirection direction, + eStrCursorJumpType jump, bool use_init_step); #endif /* __BLI_STRING_CURSOR_UTF8_H__ */ diff --git a/source/blender/blenlib/intern/string_cursor_utf8.c b/source/blender/blenlib/intern/string_cursor_utf8.c index 09b7ecb2277..85e3106dc6e 100644 --- a/source/blender/blenlib/intern/string_cursor_utf8.c +++ b/source/blender/blenlib/intern/string_cursor_utf8.c @@ -40,7 +40,7 @@ # pragma GCC diagnostic error "-Wsign-conversion" #endif -typedef enum strCursorDelimType { +typedef enum eStrCursorDelimType { STRCUR_DELIM_NONE, STRCUR_DELIM_ALPHANUMERIC, STRCUR_DELIM_PUNCT, @@ -49,9 +49,9 @@ typedef enum strCursorDelimType { STRCUR_DELIM_QUOTE, STRCUR_DELIM_WHITESPACE, STRCUR_DELIM_OTHER -} strCursorDelimType; +} eStrCursorDelimType; -static strCursorDelimType cursor_delim_type_unicode(const unsigned int uch) +static eStrCursorDelimType cursor_delim_type_unicode(const unsigned int uch) { switch (uch) { case ',': @@ -108,7 +108,7 @@ static strCursorDelimType cursor_delim_type_unicode(const unsigned int uch) return STRCUR_DELIM_ALPHANUMERIC; /* Not quite true, but ok for now */ } -static strCursorDelimType cursor_delim_type_utf8(const char *ch_utf8) +static eStrCursorDelimType cursor_delim_type_utf8(const char *ch_utf8) { /* for full unicode support we really need to have large lookup tables to figure * out whats what in every possible char set - and python, glib both have these. */ @@ -146,9 +146,10 @@ bool BLI_str_cursor_step_prev_utf8(const char *str, size_t UNUSED(maxlen), int * return false; } -void BLI_str_cursor_step_utf8(const char *str, size_t maxlen, - int *pos, strCursorJumpDirection direction, - strCursorJumpType jump, bool use_init_step) +void BLI_str_cursor_step_utf8( + const char *str, size_t maxlen, + int *pos, eStrCursorJumpDirection direction, + eStrCursorJumpType jump, bool use_init_step) { const int pos_orig = *pos; @@ -161,13 +162,16 @@ void BLI_str_cursor_step_utf8(const char *str, size_t maxlen, } if (jump != STRCUR_JUMP_NONE) { - const strCursorDelimType delim_type = (*pos) < maxlen ? cursor_delim_type_utf8(&str[*pos]) : STRCUR_DELIM_NONE; + const eStrCursorDelimType delim_type = + (*pos) < maxlen ? cursor_delim_type_utf8(&str[*pos]) : STRCUR_DELIM_NONE; /* jump between special characters (/,\,_,-, etc.), * look at function cursor_delim_type() for complete * list of special character, ctr -> */ while ((*pos) < maxlen) { if (BLI_str_cursor_step_next_utf8(str, maxlen, pos)) { - if ((jump != STRCUR_JUMP_ALL) && (delim_type != cursor_delim_type_utf8(&str[*pos]))) { + if ((jump != STRCUR_JUMP_ALL) && + (delim_type != cursor_delim_type_utf8(&str[*pos]))) + { break; } } @@ -186,14 +190,17 @@ void BLI_str_cursor_step_utf8(const char *str, size_t maxlen, } if (jump != STRCUR_JUMP_NONE) { - const strCursorDelimType delim_type = (*pos) > 0 ? cursor_delim_type_utf8(&str[(*pos) - 1]) : STRCUR_DELIM_NONE; + const eStrCursorDelimType delim_type = + (*pos) > 0 ? cursor_delim_type_utf8(&str[(*pos) - 1]) : STRCUR_DELIM_NONE; /* jump between special characters (/,\,_,-, etc.), * look at function cursor_delim_type() for complete * list of special character, ctr -> */ while ((*pos) > 0) { const int pos_prev = *pos; if (BLI_str_cursor_step_prev_utf8(str, maxlen, pos)) { - if ((jump != STRCUR_JUMP_ALL) && (delim_type != cursor_delim_type_utf8(&str[*pos]))) { + if ((jump != STRCUR_JUMP_ALL) && + (delim_type != cursor_delim_type_utf8(&str[*pos]))) + { /* left only: compensate for index/change in direction */ if ((pos_orig - (*pos)) >= 1) { *pos = pos_prev; @@ -235,9 +242,10 @@ static bool wchar_t_step_prev(const wchar_t *UNUSED(str), size_t UNUSED(maxlen), return true; } -void BLI_str_cursor_step_wchar(const wchar_t *str, size_t maxlen, - int *pos, strCursorJumpDirection direction, - strCursorJumpType jump, bool use_init_step) +void BLI_str_cursor_step_wchar( + const wchar_t *str, size_t maxlen, + int *pos, eStrCursorJumpDirection direction, + eStrCursorJumpType jump, bool use_init_step) { const int pos_orig = *pos; @@ -250,13 +258,16 @@ void BLI_str_cursor_step_wchar(const wchar_t *str, size_t maxlen, } if (jump != STRCUR_JUMP_NONE) { - const strCursorDelimType delim_type = (*pos) < maxlen ? cursor_delim_type_unicode((unsigned int)str[*pos]) : STRCUR_DELIM_NONE; + const eStrCursorDelimType delim_type = + (*pos) < maxlen ? cursor_delim_type_unicode((unsigned int)str[*pos]) : STRCUR_DELIM_NONE; /* jump between special characters (/,\,_,-, etc.), * look at function cursor_delim_type_unicode() for complete * list of special character, ctr -> */ while ((*pos) < maxlen) { if (wchar_t_step_next(str, maxlen, pos)) { - if ((jump != STRCUR_JUMP_ALL) && (delim_type != cursor_delim_type_unicode((unsigned int)str[*pos]))) { + if ((jump != STRCUR_JUMP_ALL) && + (delim_type != cursor_delim_type_unicode((unsigned int)str[*pos]))) + { break; } } @@ -275,14 +286,17 @@ void BLI_str_cursor_step_wchar(const wchar_t *str, size_t maxlen, } if (jump != STRCUR_JUMP_NONE) { - const strCursorDelimType delim_type = (*pos) > 0 ? cursor_delim_type_unicode((unsigned int)str[(*pos) - 1]) : STRCUR_DELIM_NONE; + const eStrCursorDelimType delim_type = + (*pos) > 0 ? cursor_delim_type_unicode((unsigned int)str[(*pos) - 1]) : STRCUR_DELIM_NONE; /* jump between special characters (/,\,_,-, etc.), * look at function cursor_delim_type() for complete * list of special character, ctr -> */ while ((*pos) > 0) { const int pos_prev = *pos; if (wchar_t_step_prev(str, maxlen, pos)) { - if ((jump != STRCUR_JUMP_ALL) && (delim_type != cursor_delim_type_unicode((unsigned int)str[*pos]))) { + if ((jump != STRCUR_JUMP_ALL) && + (delim_type != cursor_delim_type_unicode((unsigned int)str[*pos]))) + { /* left only: compensate for index/change in direction */ if ((pos_orig - (*pos)) >= 1) { *pos = pos_prev; diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h index e6fc4703248..59bd7ed74f4 100644 --- a/source/blender/blenloader/BLO_readfile.h +++ b/source/blender/blenloader/BLO_readfile.h @@ -51,11 +51,11 @@ struct FileData; typedef struct BlendHandle BlendHandle; -typedef enum BlenFileType { +typedef enum eBlenFileType { BLENFILETYPE_BLEND = 1, BLENFILETYPE_PUB = 2, BLENFILETYPE_RUNTIME = 3 -} BlenFileType; +} eBlenFileType; typedef struct BlendFileData { struct Main *main; @@ -68,7 +68,7 @@ typedef struct BlendFileData { struct bScreen *curscreen; struct Scene *curscene; - BlenFileType type; + eBlenFileType type; } BlendFileData; diff --git a/source/blender/editors/include/ED_transform_snap_object_context.h b/source/blender/editors/include/ED_transform_snap_object_context.h index e440e8c8389..156b0ab36b0 100644 --- a/source/blender/editors/include/ED_transform_snap_object_context.h +++ b/source/blender/editors/include/ED_transform_snap_object_context.h @@ -40,11 +40,11 @@ struct View3D; /* ED_transform_snap_object_*** API */ -typedef enum SnapSelect { +typedef enum eSnapSelect { SNAP_ALL = 0, SNAP_NOT_SELECTED = 1, SNAP_NOT_ACTIVE = 2, -} SnapSelect; +} eSnapSelect; /** used for storing multiple hits */ struct SnapObjectHitDepth { diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index f7dfb4b7fd2..9e93b02a8cd 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -2816,8 +2816,8 @@ static bool ui_textedit_insert_ascii(uiBut *but, uiHandleButtonData *data, char } static void ui_textedit_move( - uiBut *but, uiHandleButtonData *data, strCursorJumpDirection direction, - const bool select, strCursorJumpType jump) + uiBut *but, uiHandleButtonData *data, eStrCursorJumpDirection direction, + const bool select, eStrCursorJumpType jump) { const char *str = data->str; const int len = strlen(str); @@ -2893,7 +2893,7 @@ static void ui_textedit_move( } } -static bool ui_textedit_delete(uiBut *but, uiHandleButtonData *data, int direction, strCursorJumpType jump) +static bool ui_textedit_delete(uiBut *but, uiHandleButtonData *data, int direction, eStrCursorJumpType jump) { char *str = data->str; const int len = strlen(str); diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c index 122330f7ede..4825271876c 100644 --- a/source/blender/editors/object/object_bake_api.c +++ b/source/blender/editors/object/object_bake_api.c @@ -87,7 +87,7 @@ typedef struct BakeAPIRender { ReportList *reports; ListBase selected_objects; - ScenePassType pass_type; + eScenePassType pass_type; int pass_filter; int margin; @@ -101,7 +101,7 @@ typedef struct BakeAPIRender { float cage_extrusion; int normal_space; - BakeNormalSwizzle normal_swizzle[3]; + eBakeNormalSwizzle normal_swizzle[3]; char uv_layer[MAX_CUSTOMDATA_LAYER_NAME]; char custom_cage[MAX_NAME]; @@ -340,7 +340,7 @@ static bool write_external_bake_pixels( return ok; } -static bool is_noncolor_pass(ScenePassType pass_type) +static bool is_noncolor_pass(eScenePassType pass_type) { return ELEM(pass_type, SCE_PASS_Z, @@ -431,7 +431,7 @@ static bool bake_object_check(Scene *scene, Object *ob, ReportList *reports) return true; } -static bool bake_pass_filter_check(ScenePassType pass_type, const int pass_filter, ReportList *reports) +static bool bake_pass_filter_check(eScenePassType pass_type, const int pass_filter, ReportList *reports) { switch (pass_type) { case SCE_PASS_COMBINED: @@ -634,10 +634,10 @@ static Mesh *bake_mesh_new_from_object(Main *bmain, Scene *scene, Object *ob) static int bake( Render *re, Main *bmain, Scene *scene, Object *ob_low, ListBase *selected_objects, ReportList *reports, - const ScenePassType pass_type, const int pass_filter, const int margin, - const BakeSaveMode save_mode, const bool is_clear, const bool is_split_materials, + const eScenePassType pass_type, const int pass_filter, const int margin, + const eBakeSaveMode save_mode, const bool is_clear, const bool is_split_materials, const bool is_automatic_name, const bool is_selected_to_active, const bool is_cage, - const float cage_extrusion, const int normal_space, const BakeNormalSwizzle normal_swizzle[], + const float cage_extrusion, const int normal_space, const eBakeNormalSwizzle normal_swizzle[], const char *custom_cage, const char *filepath, const int width, const int height, const char *identifier, ScrArea *sa, const char *uv_layer) { diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 4a96a2e2200..76a9d7d22a6 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -1647,7 +1647,7 @@ static const char *object_mode_op_string(int mode) /* checks the mode to be set is compatible with the object * should be made into a generic function */ -static bool object_mode_compat_test(Object *ob, ObjectMode mode) +static bool object_mode_compat_test(Object *ob, eObjectMode mode) { if (ob) { if (mode == OB_MODE_OBJECT) @@ -1725,8 +1725,8 @@ static int object_mode_set_exec(bContext *C, wmOperator *op) { Object *ob = CTX_data_active_object(C); bGPdata *gpd = CTX_data_gpencil_data(C); - ObjectMode mode = RNA_enum_get(op->ptr, "mode"); - ObjectMode restore_mode = (ob) ? ob->mode : OB_MODE_OBJECT; + eObjectMode mode = RNA_enum_get(op->ptr, "mode"); + eObjectMode restore_mode = (ob) ? ob->mode : OB_MODE_OBJECT; const bool toggle = RNA_boolean_get(op->ptr, "toggle"); if (gpd) { diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index 0cf39644bc1..f0d9a0bbb68 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -249,12 +249,12 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima TexSnapshot *target; MTex *mtex = (primary) ? &br->mtex : &br->mask_mtex; - OverlayControlFlags overlay_flags = BKE_paint_get_overlay_flags(); + eOverlayControlFlags overlay_flags = BKE_paint_get_overlay_flags(); GLubyte *buffer = NULL; int size; bool refresh; - OverlayControlFlags invalid = (primary) ? (overlay_flags & PAINT_INVALID_OVERLAY_TEXTURE_PRIMARY) : + eOverlayControlFlags invalid = (primary) ? (overlay_flags & PAINT_INVALID_OVERLAY_TEXTURE_PRIMARY) : (overlay_flags & PAINT_INVALID_OVERLAY_TEXTURE_SECONDARY); target = (primary) ? &primary_snap : &secondary_snap; @@ -399,7 +399,7 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom) { bool init; - OverlayControlFlags overlay_flags = BKE_paint_get_overlay_flags(); + eOverlayControlFlags overlay_flags = BKE_paint_get_overlay_flags(); GLubyte *buffer = NULL; int size; @@ -770,11 +770,11 @@ static void paint_draw_cursor_overlay(UnifiedPaintSettings *ups, Brush *brush, } static void paint_draw_alpha_overlay(UnifiedPaintSettings *ups, Brush *brush, - ViewContext *vc, int x, int y, float zoom, PaintMode mode) + ViewContext *vc, int x, int y, float zoom, ePaintMode mode) { /* color means that primary brush texture is colured and secondary is used for alpha/mask control */ bool col = ELEM(mode, ePaintTextureProjective, ePaintTexture2D, ePaintVertex) ? true : false; - OverlayControlFlags flags = BKE_paint_get_overlay_flags(); + eOverlayControlFlags flags = BKE_paint_get_overlay_flags(); /* save lots of GL state * TODO: check on whether all of these are needed? */ glPushAttrib(GL_COLOR_BUFFER_BIT | @@ -971,7 +971,7 @@ static void paint_cursor_on_hit(UnifiedPaintSettings *ups, Brush *brush, ViewCon } } -static bool ommit_cursor_drawing(Paint *paint, PaintMode mode, Brush *brush) +static bool ommit_cursor_drawing(Paint *paint, ePaintMode mode, Brush *brush) { if (paint->flags & PAINT_SHOW_BRUSH) { if (ELEM(mode, ePaintTexture2D, ePaintTextureProjective) && brush->imagepaint_tool == PAINT_TOOL_FILL) { @@ -988,7 +988,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused)) UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings; Paint *paint = BKE_paint_get_active_from_context(C); Brush *brush = BKE_paint_brush(paint); - PaintMode mode = BKE_paintmode_get_active_from_context(C); + ePaintMode mode = BKE_paintmode_get_active_from_context(C); ViewContext vc; float final_radius; float translation[2]; diff --git a/source/blender/editors/sculpt_paint/paint_curve.c b/source/blender/editors/sculpt_paint/paint_curve.c index 9704db9d035..0ee78d61fb8 100644 --- a/source/blender/editors/sculpt_paint/paint_curve.c +++ b/source/blender/editors/sculpt_paint/paint_curve.c @@ -128,7 +128,7 @@ static void paintcurve_undo_delete(ListBase *lb) static void paintcurve_undo_begin(bContext *C, wmOperator *op, PaintCurve *pc) { - PaintMode mode = BKE_paintmode_get_active_from_context(C); + ePaintMode mode = BKE_paintmode_get_active_from_context(C); ListBase *lb = NULL; int undo_stack_id; UndoCurve *uc; @@ -733,7 +733,7 @@ void PAINTCURVE_OT_slide(wmOperatorType *ot) static int paintcurve_draw_exec(bContext *C, wmOperator *UNUSED(op)) { - PaintMode mode = BKE_paintmode_get_active_from_context(C); + ePaintMode mode = BKE_paintmode_get_active_from_context(C); const char *name; switch (mode) { @@ -774,7 +774,7 @@ void PAINTCURVE_OT_draw(wmOperatorType *ot) static int paintcurve_cursor_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event) { - PaintMode mode = BKE_paintmode_get_active_from_context(C); + ePaintMode mode = BKE_paintmode_get_active_from_context(C); switch (mode) { case ePaintTexture2D: diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 79ce440251d..5343aa72b01 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -510,7 +510,7 @@ BlurKernel *paint_new_blur_kernel(Brush *br, bool proj) BlurKernel *kernel = MEM_mallocN(sizeof(BlurKernel), "blur kernel"); float radius; int side; - BlurKernelType type = br->blur_mode; + eBlurKernelType type = br->blur_mode; if (proj) { radius = 0.5f; @@ -624,13 +624,13 @@ static int image_paint_2d_clone_poll(bContext *C) } /************************ paint operator ************************/ -typedef enum TexPaintMode { +typedef enum eTexPaintMode { PAINT_MODE_2D, PAINT_MODE_3D_PROJECT -} TexPaintMode; +} eTexPaintMode; typedef struct PaintOperation { - TexPaintMode mode; + eTexPaintMode mode; void *custom_paint; @@ -1186,7 +1186,7 @@ static int sample_color_exec(bContext *C, wmOperator *op) { Paint *paint = BKE_paint_get_active_from_context(C); Brush *brush = BKE_paint_brush(paint); - PaintMode mode = BKE_paintmode_get_active_from_context(C); + ePaintMode mode = BKE_paintmode_get_active_from_context(C); ARegion *ar = CTX_wm_region(C); wmWindow *win = CTX_wm_window(C); const bool show_cursor = ((paint->flags & PAINT_SHOW_BRUSH) != 0); @@ -1238,7 +1238,7 @@ static int sample_color_invoke(bContext *C, wmOperator *op, const wmEvent *event RNA_int_set_array(op->ptr, "location", event->mval); - PaintMode mode = BKE_paintmode_get_active_from_context(C); + ePaintMode mode = BKE_paintmode_get_active_from_context(C); const bool use_sample_texture = (mode == ePaintTextureProjective) && !RNA_boolean_get(op->ptr, "merged"); paint_sample_color(C, ar, event->mval[0], event->mval[1], use_sample_texture, false); @@ -1274,7 +1274,7 @@ static int sample_color_modal(bContext *C, wmOperator *op, const wmEvent *event) return OPERATOR_FINISHED; } - PaintMode mode = BKE_paintmode_get_active_from_context(C); + ePaintMode mode = BKE_paintmode_get_active_from_context(C); const bool use_sample_texture = (mode == ePaintTextureProjective) && !RNA_boolean_get(op->ptr, "merged"); switch (event->type) { diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h index f6fcbfdfbee..48fcf0596e3 100644 --- a/source/blender/editors/sculpt_paint/paint_intern.h +++ b/source/blender/editors/sculpt_paint/paint_intern.h @@ -54,7 +54,7 @@ struct wmOperator; struct wmOperatorType; struct wmWindowManager; struct DMCoNo; -enum PaintMode; +enum ePaintMode; /* paint_stroke.c */ typedef bool (*StrokeGetLocation)(struct bContext *C, float location[3], const float mouse[2]); @@ -69,12 +69,12 @@ struct PaintStroke *paint_stroke_new(struct bContext *C, struct wmOperator *op, StrokeDone done, int event_type); void paint_stroke_data_free(struct wmOperator *op); -bool paint_space_stroke_enabled(struct Brush *br, enum PaintMode mode); -bool paint_supports_dynamic_size(struct Brush *br, enum PaintMode mode); -bool paint_supports_dynamic_tex_coords(struct Brush *br, enum PaintMode mode); -bool paint_supports_smooth_stroke(struct Brush *br, enum PaintMode mode); -bool paint_supports_texture(enum PaintMode mode); -bool paint_supports_jitter(enum PaintMode mode); +bool paint_space_stroke_enabled(struct Brush *br, enum ePaintMode mode); +bool paint_supports_dynamic_size(struct Brush *br, enum ePaintMode mode); +bool paint_supports_dynamic_tex_coords(struct Brush *br, enum ePaintMode mode); +bool paint_supports_smooth_stroke(struct Brush *br, enum ePaintMode mode); +bool paint_supports_texture(enum ePaintMode mode); +bool paint_supports_jitter(enum ePaintMode mode); struct wmKeyMap *paint_stroke_modal_keymap(struct wmKeyConfig *keyconf); int paint_stroke_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event); @@ -336,7 +336,7 @@ typedef struct { int pixel_len; /* pixels around center that kernel is wide */ } BlurKernel; -enum BlurKernelType; +enum eBlurKernelType; /* can be extended to other blur kernels later */ BlurKernel *paint_new_blur_kernel(struct Brush *br, bool proj); void paint_delete_blur_kernel(BlurKernel *); diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index 2899cfeedcf..d3dcf283052 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -66,7 +66,7 @@ static int brush_add_exec(bContext *C, wmOperator *UNUSED(op)) Paint *paint = BKE_paint_get_active_from_context(C); Brush *br = BKE_paint_brush(paint); Main *bmain = CTX_data_main(C); - PaintMode mode = BKE_paintmode_get_active_from_context(C); + ePaintMode mode = BKE_paintmode_get_active_from_context(C); if (br) br = BKE_brush_copy(bmain, br); @@ -195,7 +195,7 @@ static int palette_color_add_exec(bContext *C, wmOperator *UNUSED(op)) Scene *scene = CTX_data_scene(C); Paint *paint = BKE_paint_get_active_from_context(C); Brush *brush = paint->brush; - PaintMode mode = BKE_paintmode_get_active_from_context(C); + ePaintMode mode = BKE_paintmode_get_active_from_context(C); Palette *palette = paint->palette; PaletteColor *color; @@ -776,7 +776,7 @@ static int stencil_control_modal(bContext *C, wmOperator *op, const wmEvent *eve static int stencil_control_poll(bContext *C) { - PaintMode mode = BKE_paintmode_get_active_from_context(C); + ePaintMode mode = BKE_paintmode_get_active_from_context(C); Paint *paint; Brush *br; diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index bb2cd52a41e..2c8e88e3ccb 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -192,7 +192,7 @@ static void paint_draw_line_cursor(bContext *C, int x, int y, void *customdata) glDisable(GL_LINE_SMOOTH); } -static bool paint_tool_require_location(Brush *brush, PaintMode mode) +static bool paint_tool_require_location(Brush *brush, ePaintMode mode) { switch (mode) { case ePaintSculpt: @@ -214,7 +214,7 @@ static bool paint_tool_require_location(Brush *brush, PaintMode mode) /* Initialize the stroke cache variants from operator properties */ static bool paint_brush_update(bContext *C, Brush *brush, - PaintMode mode, + ePaintMode mode, struct PaintStroke *stroke, const float mouse_init[2], float mouse[2], float pressure, @@ -396,7 +396,7 @@ static bool paint_brush_update(bContext *C, return location_success; } -static bool paint_stroke_use_jitter(PaintMode mode, Brush *brush, bool invert) +static bool paint_stroke_use_jitter(ePaintMode mode, Brush *brush, bool invert) { bool use_jitter = (brush->flag & BRUSH_ABSOLUTE_JITTER) ? (brush->jitter_absolute != 0) : (brush->jitter != 0); @@ -416,7 +416,7 @@ static void paint_brush_stroke_add_step(bContext *C, wmOperator *op, const float { Scene *scene = CTX_data_scene(C); Paint *paint = BKE_paint_get_active_from_context(C); - PaintMode mode = BKE_paintmode_get_active_from_context(C); + ePaintMode mode = BKE_paintmode_get_active_from_context(C); Brush *brush = BKE_paint_brush(paint); PaintStroke *stroke = op->customdata; UnifiedPaintSettings *ups = stroke->ups; @@ -491,7 +491,7 @@ static void paint_brush_stroke_add_step(bContext *C, wmOperator *op, const float /* Returns zero if no sculpt changes should be made, non-zero otherwise */ static bool paint_smooth_stroke( - PaintStroke *stroke, const PaintSample *sample, PaintMode mode, + PaintStroke *stroke, const PaintSample *sample, ePaintMode mode, float r_mouse[2], float *r_pressure) { if (paint_supports_smooth_stroke(stroke->brush, mode)) { @@ -757,7 +757,7 @@ static void stroke_done(struct bContext *C, struct wmOperator *op) } /* Returns zero if the stroke dots should not be spaced, non-zero otherwise */ -bool paint_space_stroke_enabled(Brush *br, PaintMode mode) +bool paint_space_stroke_enabled(Brush *br, ePaintMode mode) { return (br->flag & BRUSH_SPACE) && paint_supports_dynamic_size(br, mode); } @@ -772,7 +772,7 @@ static bool sculpt_is_grab_tool(Brush *br) } /* return true if the brush size can change during paint (normally used for pressure) */ -bool paint_supports_dynamic_size(Brush *br, PaintMode mode) +bool paint_supports_dynamic_size(Brush *br, ePaintMode mode) { if (br->flag & BRUSH_ANCHORED) return false; @@ -798,7 +798,7 @@ bool paint_supports_dynamic_size(Brush *br, PaintMode mode) return true; } -bool paint_supports_smooth_stroke(Brush *br, PaintMode mode) +bool paint_supports_smooth_stroke(Brush *br, ePaintMode mode) { if (!(br->flag & BRUSH_SMOOTH_STROKE) || (br->flag & (BRUSH_ANCHORED | BRUSH_DRAG_DOT | BRUSH_LINE))) @@ -817,14 +817,14 @@ bool paint_supports_smooth_stroke(Brush *br, PaintMode mode) return true; } -bool paint_supports_texture(PaintMode mode) +bool paint_supports_texture(ePaintMode mode) { /* omit: PAINT_WEIGHT, PAINT_SCULPT_UV, PAINT_INVALID */ return ELEM(mode, ePaintSculpt, ePaintVertex, ePaintTextureProjective, ePaintTexture2D); } /* return true if the brush size can change during paint (normally used for pressure) */ -bool paint_supports_dynamic_tex_coords(Brush *br, PaintMode mode) +bool paint_supports_dynamic_tex_coords(Brush *br, ePaintMode mode) { if (br->flag & BRUSH_ANCHORED) return false; @@ -1086,7 +1086,7 @@ static void paint_stroke_line_constrain(PaintStroke *stroke, float mouse[2]) int paint_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event) { Paint *p = BKE_paint_get_active_from_context(C); - PaintMode mode = BKE_paintmode_get_active_from_context(C); + ePaintMode mode = BKE_paintmode_get_active_from_context(C); PaintStroke *stroke = op->customdata; Brush *br = stroke->brush; PaintSample sample_average; diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index b02e547d0df..b2196bf6237 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -285,7 +285,7 @@ static void imapaint_pick_uv(Scene *scene, Object *ob, unsigned int faceindex, c float p[2], w[3], absw, minabsw; float matrix[4][4], proj[4][4]; GLint view[4]; - const ImagePaintMode mode = scene->toolsettings->imapaint.mode; + const eImageePaintMode mode = scene->toolsettings->imapaint.mode; const MLoopTri *lt = dm->getLoopTriArray(dm); const MPoly *mpoly = dm->getPolyArray(dm); const MLoop *mloop = dm->getLoopArray(dm); diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 1f0d8e5d29b..64404b38da3 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -3916,7 +3916,7 @@ static const char *sculpt_tool_name(Sculpt *sd) { Brush *brush = BKE_paint_brush(&sd->paint); - switch ((BrushSculptTool)brush->sculpt_tool) { + switch ((eBrushSculptTool)brush->sculpt_tool) { case SCULPT_TOOL_DRAW: return "Draw Brush"; case SCULPT_TOOL_SMOOTH: diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 64c1e6f1d1d..5ea727cf17f 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -105,7 +105,7 @@ static void file_deselect_all(SpaceFile *sfile, unsigned int flag) filelist_entries_select_index_range_set(sfile->files, &sel, FILE_SEL_REMOVE, flag, CHECK_ALL); } -typedef enum FileSelect { +typedef enum FileSelect { FILE_SELECT_NOTHING = 0, FILE_SELECT_DIR = 1, FILE_SELECT_FILE = 2 diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 5f01092f5b0..087f1a28316 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -631,7 +631,7 @@ void drawaxes(const float viewmat_local[4][4], float size, char drawtype) /* Function to draw an Image on an empty Object */ -static void draw_empty_image(Object *ob, const short dflag, const unsigned char ob_wire_col[4], StereoViews sview) +static void draw_empty_image(Object *ob, const short dflag, const unsigned char ob_wire_col[4], eStereoViews sview) { Image *ima = ob->data; ImBuf *ibuf; diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 4a7c2decf95..45b8ca3749f 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -105,7 +105,7 @@ static float ResizeBetween(TransInfo *t, const float p1[3], const float p2[3]); /****************** IMPLEMENTATIONS *********************/ -static bool snapNodeTest(View2D *v2d, bNode *node, SnapSelect snap_select); +static bool snapNodeTest(View2D *v2d, bNode *node, eSnapSelect snap_select); static NodeBorder snapNodeBorder(int snap_node_mode); #if 0 @@ -1315,7 +1315,7 @@ bool peelObjectsTransform( /******************** NODES ***********************************/ -static bool snapNodeTest(View2D *v2d, bNode *node, SnapSelect snap_select) +static bool snapNodeTest(View2D *v2d, bNode *node, eSnapSelect snap_select) { /* node is use for snapping only if a) snap mode matches and b) node is inside the view */ return ((snap_select == SNAP_NOT_SELECTED && !(node->flag & NODE_SELECT)) || @@ -1394,7 +1394,7 @@ static bool snapNode( static bool snapNodes( ToolSettings *ts, SpaceNode *snode, ARegion *ar, - const int mval[2], SnapSelect snap_select, + const int mval[2], eSnapSelect snap_select, float r_loc[2], float *r_dist_px, char *r_node_border) { bNodeTree *ntree = snode->edittree; diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c index 1fdf7c67cff..737005ccf8b 100644 --- a/source/blender/editors/transform/transform_snap_object.c +++ b/source/blender/editors/transform/transform_snap_object.c @@ -145,12 +145,12 @@ typedef void(*IterSnapObjsCallback)(SnapObjectContext *sctx, bool is_obedit, Obj * Walks through all objects in the scene to create the list of objets to snap. * * \param sctx: Snap context to store data. - * \param snap_select : from enum SnapSelect. + * \param snap_select : from enum eSnapSelect. * \param obedit : Object Edited to use its coordinates of BMesh(if any) to do the snapping. */ static void iter_snap_objects( SnapObjectContext *sctx, - const SnapSelect snap_select, + const eSnapSelect snap_select, Object *obedit, IterSnapObjsCallback sob_callback, void *data) @@ -795,7 +795,7 @@ static void raycast_obj_cb(SnapObjectContext *sctx, bool is_obedit, Object *ob, * * \param sctx: Snap context to store data. * \param snapdata: struct generated in `set_snapdata`. - * \param snap_select : from enum SnapSelect. + * \param snap_select : from enum eSnapSelect. * \param use_object_edit_cage : Uses the coordinates of BMesh(if any) to do the snapping. * \param obj_list: List with objects to snap (created in `create_object_list`). * @@ -819,7 +819,7 @@ static void raycast_obj_cb(SnapObjectContext *sctx, bool is_obedit, Object *ob, static bool raycastObjects( SnapObjectContext *sctx, const float ray_start[3], const float ray_dir[3], - const SnapSelect snap_select, const bool use_object_edit_cage, + const eSnapSelect snap_select, const bool use_object_edit_cage, /* read/write args */ float *ray_depth, /* return args */ @@ -2036,7 +2036,7 @@ static void sanp_obj_cb(SnapObjectContext *sctx, bool is_obedit, Object *ob, flo * * \param sctx: Snap context to store data. * \param snapdata: struct generated in `get_snapdata`. - * \param snap_select : from enum SnapSelect. + * \param snap_select : from enum eSnapSelect. * \param use_object_edit_cage : Uses the coordinates of BMesh(if any) to do the snapping. * * Read/Write Args @@ -2058,7 +2058,7 @@ static void sanp_obj_cb(SnapObjectContext *sctx, bool is_obedit, Object *ob, flo */ static bool snapObjectsRay( SnapObjectContext *sctx, SnapData *snapdata, - const SnapSelect snap_select, const bool use_object_edit_cage, + const eSnapSelect snap_select, const bool use_object_edit_cage, /* read/write args */ float *ray_depth, float *dist_px, /* return args */ diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index d49960771d0..9d4731f8da4 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -749,7 +749,7 @@ typedef struct bActionChannel { } bActionChannel; /* Action Channel flags (ONLY USED FOR DO_VERSIONS...) */ -typedef enum ACHAN_FLAG { +typedef enum eActionChannelFlag { ACHAN_SELECTED = (1 << 0), ACHAN_HIGHLIGHTED = (1 << 1), ACHAN_HIDDEN = (1 << 2), @@ -758,6 +758,6 @@ typedef enum ACHAN_FLAG { ACHAN_SHOWIPO = (1 << 5), ACHAN_SHOWCONS = (1 << 6), ACHAN_MOVED = (1u << 31) -} ACHAN_FLAG; +} eActionChannelFlag; #endif /* __DNA_ACTION_TYPES_H__ */ diff --git a/source/blender/makesdna/DNA_boid_types.h b/source/blender/makesdna/DNA_boid_types.h index f1930ffd643..44764eb012e 100644 --- a/source/blender/makesdna/DNA_boid_types.h +++ b/source/blender/makesdna/DNA_boid_types.h @@ -34,7 +34,7 @@ #include "DNA_listBase.h" -typedef enum BoidRuleType { +typedef enum eBoidRuleType { eBoidRuleType_None = 0, eBoidRuleType_Goal = 1, /* go to goal assigned object or loudest assigned signal source */ eBoidRuleType_Avoid = 2, /* get away from assigned object or loudest assigned signal source */ @@ -49,7 +49,7 @@ typedef enum BoidRuleType { //eBoidRuleType_FollowPath = 11, /* move along a assigned curve or closest curve in a group */ //eBoidRuleType_FollowWall = 12, /* move next to a deflector object's in direction of it's tangent */ NUM_BOID_RULE_TYPES -} BoidRuleType; +} eBoidRuleType; /* boidrule->flag */ #define BOIDRULE_CURRENT 1 @@ -96,14 +96,14 @@ typedef struct BoidRuleFight { float distance, flee_distance; } BoidRuleFight; -typedef enum BoidMode { +typedef enum eBoidMode { eBoidMode_InAir = 0, eBoidMode_OnLand = 1, eBoidMode_Climbing = 2, eBoidMode_Falling = 3, eBoidMode_Liftoff = 4, NUM_BOID_MODES -} BoidMode; +} eBoidMode; typedef struct BoidData { @@ -140,12 +140,12 @@ typedef struct BoidData { // int signal_id, channels; //} BoidCondition; -typedef enum BoidRulesetType { +typedef enum eBoidRulesetType { eBoidRulesetType_Fuzzy = 0, eBoidRulesetType_Random = 1, eBoidRulesetType_Average = 2, NUM_BOID_RULESET_TYPES -} BoidRulesetType; +} eBoidRulesetType; #define BOIDSTATE_CURRENT 1 typedef struct BoidState { struct BoidState *next, *prev; diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h index c285b44c939..407d59f09da 100644 --- a/source/blender/makesdna/DNA_brush_types.h +++ b/source/blender/makesdna/DNA_brush_types.h @@ -105,7 +105,7 @@ typedef struct Brush { char sculpt_tool; /* active sculpt tool */ char vertexpaint_tool; /* active vertex/weight paint blend mode (poorly named) */ char imagepaint_tool; /* active image paint tool */ - char mask_tool; /* enum BrushMaskTool, only used if sculpt_tool is SCULPT_TOOL_MASK */ + char mask_tool; /* enum eBrushMaskTool, only used if sculpt_tool is SCULPT_TOOL_MASK */ float autosmooth_factor; @@ -171,19 +171,19 @@ typedef struct PaintCurve { } PaintCurve; /* Brush.gradient_source */ -typedef enum BrushGradientSourceStroke { +typedef enum eBrushGradientSourceStroke { BRUSH_GRADIENT_PRESSURE = 0, /* gradient from pressure */ BRUSH_GRADIENT_SPACING_REPEAT = 1, /* gradient from spacing */ BRUSH_GRADIENT_SPACING_CLAMP = 2 /* gradient from spacing */ -} BrushGradientSourceStroke; +} eBrushGradientSourceStroke; -typedef enum BrushGradientSourceFill { +typedef enum eBrushGradientSourceFill { BRUSH_GRADIENT_LINEAR = 0, /* gradient from pressure */ BRUSH_GRADIENT_RADIAL = 1 /* gradient from spacing */ -} BrushGradientSourceFill; +} eBrushGradientSourceFill; /* Brush.flag */ -typedef enum BrushFlags { +typedef enum eBrushFlags { BRUSH_AIRBRUSH = (1 << 0), BRUSH_FLAG_DEPRECATED_1 = (1 << 1), BRUSH_ALPHA_PRESSURE = (1 << 2), @@ -216,7 +216,7 @@ typedef enum BrushFlags { BRUSH_LINE = (1 << 29), BRUSH_ABSOLUTE_JITTER = (1 << 30), BRUSH_CURVE = (1u << 31) -} BrushFlags; +} eBrushFlags; typedef enum { BRUSH_MASK_PRESSURE_RAMP = (1 << 1), @@ -224,21 +224,21 @@ typedef enum { } BrushMaskPressureFlags; /* Brush.overlay_flags */ -typedef enum OverlayFlags { +typedef enum eOverlayFlags { BRUSH_OVERLAY_CURSOR = (1), BRUSH_OVERLAY_PRIMARY = (1 << 1), BRUSH_OVERLAY_SECONDARY = (1 << 2), BRUSH_OVERLAY_CURSOR_OVERRIDE_ON_STROKE = (1 << 3), BRUSH_OVERLAY_PRIMARY_OVERRIDE_ON_STROKE = (1 << 4), BRUSH_OVERLAY_SECONDARY_OVERRIDE_ON_STROKE = (1 << 5) -} OverlayFlags; +} eOverlayFlags; #define BRUSH_OVERLAY_OVERRIDE_MASK (BRUSH_OVERLAY_CURSOR_OVERRIDE_ON_STROKE | \ BRUSH_OVERLAY_PRIMARY_OVERRIDE_ON_STROKE | \ BRUSH_OVERLAY_SECONDARY_OVERRIDE_ON_STROKE) /* Brush.sculpt_tool */ -typedef enum BrushSculptTool { +typedef enum eBrushSculptTool { SCULPT_TOOL_DRAW = 1, SCULPT_TOOL_SMOOTH = 2, SCULPT_TOOL_PINCH = 3, @@ -258,7 +258,7 @@ typedef enum BrushSculptTool { SCULPT_TOOL_BLOB = 17, SCULPT_TOOL_CLAY_STRIPS = 18, SCULPT_TOOL_MASK = 19 -} BrushSculptTool; +} eBrushSculptTool; /** When #BRUSH_ACCUMULATE is used */ #define SCULPT_TOOL_HAS_ACCUMULATE(t) ELEM(t, \ @@ -295,14 +295,14 @@ typedef enum BrushSculptTool { ) == 0) /* ImagePaintSettings.tool */ -typedef enum BrushImagePaintTool { +typedef enum eBrushImagePaintTool { PAINT_TOOL_DRAW = 0, PAINT_TOOL_SOFTEN = 1, PAINT_TOOL_SMEAR = 2, PAINT_TOOL_CLONE = 3, PAINT_TOOL_FILL = 4, PAINT_TOOL_MASK = 5 -} BrushImagePaintTool; +} eBrushImagePaintTool; /* direction that the brush displaces along */ enum { @@ -343,10 +343,10 @@ typedef enum { } BrushMaskTool; /* blur kernel types, Brush.blur_mode */ -typedef enum BlurKernelType { +typedef enum eBlurKernelType { KERNEL_GAUSSIAN, KERNEL_BOX -} BlurKernelType; +} eBlurKernelType; /* Brush.falloff_shape */ enum { diff --git a/source/blender/makesdna/DNA_color_types.h b/source/blender/makesdna/DNA_color_types.h index f7ee1ff3915..6f9c407c6c6 100644 --- a/source/blender/makesdna/DNA_color_types.h +++ b/source/blender/makesdna/DNA_color_types.h @@ -91,7 +91,7 @@ typedef struct CurveMapping { #define CUMA_DRAW_SAMPLE 8 /* cumapping->preset */ -typedef enum CurveMappingPreset { +typedef enum eCurveMappingPreset { CURVE_PRESET_LINE = 0, CURVE_PRESET_SHARP = 1, CURVE_PRESET_SMOOTH = 2, @@ -99,7 +99,7 @@ typedef enum CurveMappingPreset { CURVE_PRESET_MID9 = 4, CURVE_PRESET_ROUND = 5, CURVE_PRESET_ROOT = 6, -} CurveMappingPreset; +} eCurveMappingPreset; /* histogram->mode */ enum { diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index ca774864e95..4c4440ad573 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -92,23 +92,22 @@ typedef struct bConstraintTarget { short space; /* space that target should be evaluated in (overrides bConstraint->tarspace) */ short flag; /* runtime settings (for editor, etc.) */ - short type; /* type of target (B_CONSTRAINT_OB_TYPE) */ + short type; /* type of target (eConstraintObType) */ short rotOrder; /* rotation order for target (as defined in BLI_math.h) */ } bConstraintTarget; /* bConstraintTarget -> flag */ -typedef enum B_CONSTRAINT_TARGET_FLAG { +typedef enum eConstraintTargetFlag { CONSTRAINT_TAR_TEMP = (1<<0) /* temporary target-struct that needs to be freed after use */ -} B_CONSTRAINT_TARGET_FLAG; +} eConstraintTargetFlag; /* bConstraintTarget/bConstraintOb -> type */ -typedef enum B_CONSTRAINT_OB_TYPE { +typedef enum eConstraintObType { CONSTRAINT_OBTYPE_OBJECT = 1, /* string is "" */ CONSTRAINT_OBTYPE_BONE = 2, /* string is bone-name */ CONSTRAINT_OBTYPE_VERT = 3, /* string is vertex-group name */ CONSTRAINT_OBTYPE_CV = 4 /* string is vertex-group name - is not available until curves get vgroups */ -} B_CONSTRAINT_OB_TYPE; - +} eConstraintObType; /* Python Script Constraint */ @@ -128,7 +127,7 @@ typedef struct bPythonConstraint { /* Inverse-Kinematics (IK) constraint * This constraint supports a variety of mode determine by the type field - * according to B_CONSTRAINT_IK_TYPE. + * according to eConstraint_IK_Type. * Some fields are used by all types, some are specific to some types * This is indicated in the comments for each field */ @@ -145,15 +144,15 @@ typedef struct bKinematicConstraint { float weight; /* All: Weight of constraint in IK tree */ float orientweight; /* CopyPose: Amount of rotation a target applies on chain */ float grabtarget[3]; /* CopyPose: for target-less IK */ - short type; /* subtype of IK constraint: B_CONSTRAINT_IK_TYPE */ + short type; /* subtype of IK constraint: eConstraint_IK_Type */ short mode; /* Distance: how to limit in relation to clamping sphere: LIMITDIST_.. */ float dist; /* Distance: distance (radius of clamping sphere) from target */ } bKinematicConstraint; -typedef enum B_CONSTRAINT_IK_TYPE { +typedef enum eConstraint_IK_Type { CONSTRAINT_IK_COPYPOSE = 0, /* 'standard' IK constraint: match position and/or orientation of target */ CONSTRAINT_IK_DISTANCE = 1 /* maintain distance with target */ -} B_CONSTRAINT_IK_TYPE; +} eConstraint_IK_Type; /* Spline IK Constraint diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index 3676066a399..8bb711339f7 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -356,7 +356,7 @@ typedef struct GridPaintMask { int pad; } GridPaintMask; -typedef enum MVertSkinFlag { +typedef enum eMVertSkinFlag { /* Marks a vertex as the edge-graph root, used for calculating rotations for all connected edges (recursively). * Also used to choose a root when generating an armature. */ @@ -366,13 +366,13 @@ typedef enum MVertSkinFlag { * directly hulled together, rather than the default of generating intermediate frames. */ MVERT_SKIN_LOOSE = 2, -} MVertSkinFlag; +} eMVertSkinFlag; typedef struct MVertSkin { /* Radii of the skin, define how big the generated frames are. Currently only the first two elements are used. */ float radius[3]; - /* MVertSkinFlag */ + /* eMVertSkinFlag */ int flag; } MVertSkin; diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 64856b2eb76..7f0547188e9 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -1226,19 +1226,19 @@ enum { }; /* Remesh modifier */ -typedef enum RemeshModifierFlags { +typedef enum eRemeshModifierFlags { MOD_REMESH_FLOOD_FILL = 1, MOD_REMESH_SMOOTH_SHADING = 2, } RemeshModifierFlags; -typedef enum RemeshModifierMode { +typedef enum eRemeshModifierMode { /* blocky */ MOD_REMESH_CENTROID = 0, /* smooth */ MOD_REMESH_MASS_POINT = 1, /* keeps sharp edges */ MOD_REMESH_SHARP_FEATURES = 2, -} RemeshModifierMode; +} eRemeshModifierMode; typedef struct RemeshModifierData { ModifierData modifier; diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h index ed14c4b9311..6e8d4a0480c 100644 --- a/source/blender/makesdna/DNA_object_force.h +++ b/source/blender/makesdna/DNA_object_force.h @@ -39,7 +39,7 @@ extern "C" { #include "DNA_listBase.h" /* pd->forcefield: Effector Fields types */ -typedef enum PFieldType { +typedef enum ePFieldType { PFIELD_NULL = 0, /* (this is used for general effector weight) */ PFIELD_FORCE = 1, /* Force away/towards a point depending on force strength */ PFIELD_VORTEX = 2, /* Force around the effector normal */ @@ -56,8 +56,8 @@ typedef enum PFieldType { PFIELD_DRAG = 12, /* Linear & quadratic drag */ PFIELD_SMOKEFLOW = 13, /* Force based on smoke simulation air flow */ NUM_PFIELD_TYPES -} PFieldType; - +} ePFieldType; + typedef struct PartDeflect { int flag; /* general settings flag */ short deflect; /* Deflection flag - does mesh deflect particles */ diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 0f341aa4001..d08bca4f244 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -668,7 +668,7 @@ enum { }; /* ob->mode */ -typedef enum ObjectMode { +typedef enum eObjectMode { OB_MODE_OBJECT = 0, OB_MODE_EDIT = 1 << 0, OB_MODE_SCULPT = 1 << 1, @@ -678,7 +678,7 @@ typedef enum ObjectMode { OB_MODE_PARTICLE_EDIT = 1 << 5, OB_MODE_POSE = 1 << 6, OB_MODE_GPENCIL = 1 << 7, /* NOTE: Just a dummy to make the UI nicer */ -} ObjectMode; +} eObjectMode; /* any mode where the brush system is used */ #define OB_MODE_ALL_PAINT (OB_MODE_SCULPT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT) diff --git a/source/blender/makesdna/DNA_packedFile_types.h b/source/blender/makesdna/DNA_packedFile_types.h index 56140c84cb1..00a54c2db7f 100644 --- a/source/blender/makesdna/DNA_packedFile_types.h +++ b/source/blender/makesdna/DNA_packedFile_types.h @@ -40,7 +40,7 @@ typedef struct PackedFile { void *data; } PackedFile; -enum PF_FileStatus { +enum ePF_FileStatus { PF_EQUAL = 0, PF_DIFFERS = 1, PF_NOFILE = 2, diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 3ad75142c46..b9f19a36072 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -99,7 +99,7 @@ typedef struct AviCodecData { char avicodecname[128]; } AviCodecData; -typedef enum FFMpegPreset { +typedef enum eFFMpegPreset { FFM_PRESET_NONE, FFM_PRESET_ULTRAFAST, FFM_PRESET_SUPERFAST, @@ -110,7 +110,7 @@ typedef enum FFMpegPreset { FFM_PRESET_SLOW, FFM_PRESET_SLOWER, FFM_PRESET_VERYSLOW, -} FFMpegPreset; +} eFFMpegPreset; /* Mapping from easily-understandable descriptions to CRF values. @@ -119,7 +119,7 @@ typedef enum FFMpegPreset { * We use a slightly wider than "subjectively sane range" according * to https://trac.ffmpeg.org/wiki/Encode/H.264#a1.ChooseaCRFvalue */ -typedef enum FFMpegCrf { +typedef enum eFFMpegCrf { FFM_CRF_NONE = -1, FFM_CRF_LOSSLESS = 0, FFM_CRF_PERC_LOSSLESS = 17, @@ -128,7 +128,7 @@ typedef enum FFMpegCrf { FFM_CRF_LOW = 26, FFM_CRF_VERYLOW = 29, FFM_CRF_LOWEST = 32, -} FFMpegCrf; +} eFFMpegCrf; typedef struct FFMpegCodecData { int type; @@ -144,7 +144,7 @@ typedef struct FFMpegCodecData { int max_b_frames; /* only used if FFMPEG_USE_MAX_B_FRAMES flag is set. */ int flags; int constant_rate_factor; - int ffmpeg_preset; /* see FFMpegPreset */ + int ffmpeg_preset; /* see eFFMpegPreset */ int rc_min_rate; int rc_max_rate; @@ -217,7 +217,7 @@ typedef struct SceneRenderLayer { #define SCE_LAY_NEG_ZMASK 0x80000 /* srl->passflag */ -typedef enum ScenePassType { +typedef enum eScenePassType { SCE_PASS_COMBINED = (1 << 0), SCE_PASS_Z = (1 << 1), SCE_PASS_RGBA = (1 << 2), @@ -249,7 +249,7 @@ typedef enum ScenePassType { SCE_PASS_SUBSURFACE_DIRECT = (1 << 28), SCE_PASS_SUBSURFACE_INDIRECT = (1 << 29), SCE_PASS_SUBSURFACE_COLOR = (1 << 30), -} ScenePassType; +} eScenePassType; #define RE_PASSNAME_COMBINED "Combined" #define RE_PASSNAME_Z "Depth" @@ -511,23 +511,23 @@ typedef struct BakeData { } BakeData; /* (char) normal_swizzle */ -typedef enum BakeNormalSwizzle { +typedef enum eBakeNormalSwizzle { R_BAKE_POSX = 0, R_BAKE_POSY = 1, R_BAKE_POSZ = 2, R_BAKE_NEGX = 3, R_BAKE_NEGY = 4, R_BAKE_NEGZ = 5, -} BakeNormalSwizzle; +} eBakeNormalSwizzle; /* (char) save_mode */ -typedef enum BakeSaveMode { +typedef enum eBakeSaveMode { R_BAKE_SAVE_INTERNAL = 0, R_BAKE_SAVE_EXTERNAL = 1, -} BakeSaveMode; +} eBakeSaveMode; /* bake->pass_filter */ -typedef enum BakePassFilter { +typedef enum eBakePassFilter { R_BAKE_PASS_FILTER_NONE = 0, R_BAKE_PASS_FILTER_AO = (1 << 0), R_BAKE_PASS_FILTER_EMIT = (1 << 1), @@ -538,7 +538,7 @@ typedef enum BakePassFilter { R_BAKE_PASS_FILTER_DIRECT = (1 << 6), R_BAKE_PASS_FILTER_INDIRECT = (1 << 7), R_BAKE_PASS_FILTER_COLOR = (1 << 8), -} BakePassFilter; +} eBakePassFilter; #define R_BAKE_PASS_FILTER_ALL (~0) @@ -972,12 +972,12 @@ enum { #define STEREO_RIGHT_SUFFIX "_R" #define STEREO_LEFT_SUFFIX "_L" -typedef enum StereoViews { +typedef enum eStereoViews { STEREO_LEFT_ID = 0, STEREO_RIGHT_ID = 1, STEREO_3D_ID = 2, STEREO_MONO_ID = 3, -} StereoViews; +} eStereoViews; /* *************************************************************** */ /* Markers */ @@ -1005,7 +1005,7 @@ typedef struct Paint { void *paint_cursor; unsigned char paint_cursor_col[4]; - /* enum PaintFlags */ + /* enum ePaintFlags */ int flags; /* Paint stroke can use up to PAINT_MAX_INPUT_SAMPLES inputs to @@ -1351,7 +1351,7 @@ typedef enum { /* only used if unified alpha is enabled, mirrors the brush flag * BRUSH_ALPHA_PRESSURE */ UNIFIED_PAINT_BRUSH_ALPHA_PRESSURE = (1 << 4) -} UnifiedPaintSettingsFlags; +} eUnifiedPaintSettingsFlags; typedef struct CurvePaintSettings { @@ -2065,16 +2065,16 @@ enum { }; /* Paint.flags */ -typedef enum { +typedef enum ePaintFlags { PAINT_SHOW_BRUSH = (1 << 0), PAINT_FAST_NAVIGATE = (1 << 1), PAINT_SHOW_BRUSH_ON_SURFACE = (1 << 2), PAINT_USE_CAVITY_MASK = (1 << 3) -} PaintFlags; +} ePaintFlags; /* Paint.symmetry_flags * (for now just a duplicate of sculpt symmetry flags) */ -typedef enum SymmetryFlags { +typedef enum ePaintSymmetryFlags { PAINT_SYMM_X = (1 << 0), PAINT_SYMM_Y = (1 << 1), PAINT_SYMM_Z = (1 << 2), @@ -2082,13 +2082,13 @@ typedef enum SymmetryFlags { PAINT_TILE_X = (1 << 4), PAINT_TILE_Y = (1 << 5), PAINT_TILE_Z = (1 << 6), -} SymmetryFlags; +} ePaintSymmetryFlags; #define PAINT_SYMM_AXIS_ALL (PAINT_SYMM_X | PAINT_SYMM_Y | PAINT_SYMM_Z) /* Sculpt.flags */ /* These can eventually be moved to paint flags? */ -typedef enum SculptFlags { +typedef enum eSculptFlags { #ifdef DNA_DEPRECATED /* deprecated, part of paint struct symmetry_flags now */ SCULPT_SYMM_X = (1 << 0), @@ -2118,12 +2118,12 @@ typedef enum SculptFlags { /* If set, dynamic-topology detail size will be constant in object space */ SCULPT_DYNTOPO_DETAIL_CONSTANT = (1 << 13), SCULPT_DYNTOPO_DETAIL_BRUSH = (1 << 14), -} SculptFlags; +} eSculptFlags; -typedef enum ImagePaintMode { +typedef enum eImageePaintMode { IMAGEPAINT_MODE_MATERIAL, /* detect texture paint slots from the material */ IMAGEPAINT_MODE_IMAGE, /* select texture paint image directly */ -} ImagePaintMode; +} eImageePaintMode; /* ImagePaintSettings.flag */ #define IMAGEPAINT_DRAWING 1 diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index d6490d99016..a0f77d61d1d 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -664,7 +664,7 @@ typedef struct FSMenuEntry { } FSMenuEntry; /* FileSelectParams.display */ -enum FileDisplayTypeE { +enum eFileDisplayType { FILE_DEFAULTDISPLAY = 0, FILE_SHORTDISPLAY = 1, FILE_LONGDISPLAY = 2, @@ -672,7 +672,7 @@ enum FileDisplayTypeE { }; /* FileSelectParams.sort */ -enum FileSortTypeE { +enum eFileSortType { FILE_SORT_NONE = 0, FILE_SORT_ALPHA = 1, FILE_SORT_EXTENSION = 2, diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index 2b2df861f2d..294af1a4b83 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -480,7 +480,7 @@ static void rna_Brush_set_unprojected_radius(PointerRNA *ptr, float value) static EnumPropertyItem *rna_Brush_direction_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { - PaintMode mode = BKE_paintmode_get_active_from_context(C); + ePaintMode mode = BKE_paintmode_get_active_from_context(C); static EnumPropertyItem prop_default_items[] = { {0, NULL, 0, NULL, NULL} @@ -586,7 +586,7 @@ static EnumPropertyItem *rna_Brush_direction_itemf(bContext *C, PointerRNA *ptr, static EnumPropertyItem *rna_Brush_stroke_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { - PaintMode mode = BKE_paintmode_get_active_from_context(C); + ePaintMode mode = BKE_paintmode_get_active_from_context(C); static EnumPropertyItem brush_stroke_method_items[] = { {0, "DOTS", 0, "Dots", "Apply paint on each mouse move step"}, diff --git a/source/blender/render/extern/include/RE_bake.h b/source/blender/render/extern/include/RE_bake.h index a04d1d6632c..090e0e6c28d 100644 --- a/source/blender/render/extern/include/RE_bake.h +++ b/source/blender/render/extern/include/RE_bake.h @@ -72,13 +72,13 @@ bool RE_bake_has_engine(struct Render *re); bool RE_bake_engine( struct Render *re, struct Object *object, const int object_id, const BakePixel pixel_array[], - const size_t num_pixels, const int depth, const ScenePassType pass_type, const int pass_filter, float result[]); + const size_t num_pixels, const int depth, const eScenePassType pass_type, const int pass_filter, float result[]); /* bake.c */ -int RE_pass_depth(const ScenePassType pass_type); +int RE_pass_depth(const eScenePassType pass_type); bool RE_bake_internal( struct Render *re, struct Object *object, const BakePixel pixel_array[], - const size_t num_pixels, const int depth, const ScenePassType pass_type, float result[]); + const size_t num_pixels, const int depth, const eScenePassType pass_type, float result[]); bool RE_bake_pixels_populate_from_objects( struct Mesh *me_low, BakePixel pixel_array_from[], BakePixel pixel_array_to[], @@ -95,13 +95,13 @@ void RE_bake_margin(struct ImBuf *ibuf, char *mask, const int margin); void RE_bake_normal_world_to_object( const BakePixel pixel_array[], const size_t num_pixels, const int depth, float result[], - struct Object *ob, const BakeNormalSwizzle normal_swizzle[3]); + struct Object *ob, const eBakeNormalSwizzle normal_swizzle[3]); void RE_bake_normal_world_to_tangent( const BakePixel pixel_array[], const size_t num_pixels, const int depth, float result[], - struct Mesh *me, const BakeNormalSwizzle normal_swizzle[3], float mat[4][4]); + struct Mesh *me, const eBakeNormalSwizzle normal_swizzle[3], float mat[4][4]); void RE_bake_normal_world_to_world( const BakePixel pixel_array[], const size_t num_pixels, const int depth, float result[], - const BakeNormalSwizzle normal_swizzle[3]); + const eBakeNormalSwizzle normal_swizzle[3]); void RE_bake_ibuf_clear(struct Image *image, const bool is_tangent); diff --git a/source/blender/render/intern/source/bake_api.c b/source/blender/render/intern/source/bake_api.c index 588c327ab91..505af3c2fa8 100644 --- a/source/blender/render/intern/source/bake_api.c +++ b/source/blender/render/intern/source/bake_api.c @@ -734,7 +734,7 @@ static void normal_uncompress(float out[3], const float in[3]) out[i] = 2.0f * in[i] - 1.0f; } -static void normal_compress(float out[3], const float in[3], const BakeNormalSwizzle normal_swizzle[3]) +static void normal_compress(float out[3], const float in[3], const eBakeNormalSwizzle normal_swizzle[3]) { const int swizzle_index[6] = { 0, /* R_BAKE_POSX */ @@ -777,7 +777,7 @@ static void normal_compress(float out[3], const float in[3], const BakeNormalSwi */ void RE_bake_normal_world_to_tangent( const BakePixel pixel_array[], const size_t num_pixels, const int depth, - float result[], Mesh *me, const BakeNormalSwizzle normal_swizzle[3], + float result[], Mesh *me, const eBakeNormalSwizzle normal_swizzle[3], float mat[4][4]) { size_t i; @@ -888,7 +888,7 @@ void RE_bake_normal_world_to_tangent( void RE_bake_normal_world_to_object( const BakePixel pixel_array[], const size_t num_pixels, const int depth, - float result[], struct Object *ob, const BakeNormalSwizzle normal_swizzle[3]) + float result[], struct Object *ob, const eBakeNormalSwizzle normal_swizzle[3]) { size_t i; float iobmat[4][4]; @@ -916,7 +916,7 @@ void RE_bake_normal_world_to_object( void RE_bake_normal_world_to_world( const BakePixel pixel_array[], const size_t num_pixels, const int depth, - float result[], const BakeNormalSwizzle normal_swizzle[3]) + float result[], const eBakeNormalSwizzle normal_swizzle[3]) { size_t i; @@ -975,7 +975,7 @@ static bool bake_uv(const BakePixel pixel_array[], const size_t num_pixels, cons bool RE_bake_internal( Render *UNUSED(re), Object *UNUSED(object), const BakePixel pixel_array[], - const size_t num_pixels, const int depth, const ScenePassType pass_type, float result[]) + const size_t num_pixels, const int depth, const eScenePassType pass_type, float result[]) { switch (pass_type) { case SCE_PASS_UV: @@ -988,7 +988,7 @@ bool RE_bake_internal( return false; } -int RE_pass_depth(const ScenePassType pass_type) +int RE_pass_depth(const eScenePassType pass_type) { /* IMB_buffer_byte_from_float assumes 4 channels * making it work for now - XXX */ diff --git a/source/blender/render/intern/source/external_engine.c b/source/blender/render/intern/source/external_engine.c index a581f7bd198..55a6cbec549 100644 --- a/source/blender/render/intern/source/external_engine.c +++ b/source/blender/render/intern/source/external_engine.c @@ -503,7 +503,7 @@ bool RE_bake_engine( Render *re, Object *object, const int object_id, const BakePixel pixel_array[], const size_t num_pixels, const int depth, - const ScenePassType pass_type, const int pass_filter, + const eScenePassType pass_type, const int pass_filter, float result[]) { RenderEngineType *type = RE_engines_find(re->r.engine); diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index 2b695c95258..f802e873555 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -645,7 +645,7 @@ static void wm_method_draw_triple(bContext *C, wmWindow *win) } } -static void wm_method_draw_triple_multiview(bContext *C, wmWindow *win, StereoViews sview) +static void wm_method_draw_triple_multiview(bContext *C, wmWindow *win, eStereoViews sview) { wmWindowManager *wm = CTX_wm_manager(C); wmDrawData *drawdata; -- cgit v1.2.3