[Bf-blender-cvs] [99520e3f92e] master: Cleanup: use 'e' prefix for enum typedefs
Campbell Barton
noreply at git.blender.org
Tue Oct 17 04:52:00 CEST 2017
Commit: 99520e3f92e14eb3b7fab3f7decd0914a3da1360
Author: Campbell Barton
Date: Tue Oct 17 13:43:10 2017 +1100
Branches: master
https://developer.blender.org/rB99520e3f92e14eb3b7fab3f7decd0914a3da1360
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).
===================================================================
M intern/cycles/kernel/kernel_types.h
M source/blender/blenkernel/BKE_brush.h
M source/blender/blenkernel/BKE_paint.h
M source/blender/blenkernel/intern/brush.c
M source/blender/blenkernel/intern/paint.c
M source/blender/blenkernel/intern/writeffmpeg.c
M source/blender/blenlib/BLI_string_cursor_utf8.h
M source/blender/blenlib/intern/string_cursor_utf8.c
M source/blender/blenloader/BLO_readfile.h
M source/blender/editors/include/ED_transform_snap_object_context.h
M source/blender/editors/interface/interface_handlers.c
M source/blender/editors/object/object_bake_api.c
M source/blender/editors/object/object_edit.c
M source/blender/editors/sculpt_paint/paint_cursor.c
M source/blender/editors/sculpt_paint/paint_curve.c
M source/blender/editors/sculpt_paint/paint_image.c
M source/blender/editors/sculpt_paint/paint_intern.h
M source/blender/editors/sculpt_paint/paint_ops.c
M source/blender/editors/sculpt_paint/paint_stroke.c
M source/blender/editors/sculpt_paint/paint_utils.c
M source/blender/editors/sculpt_paint/sculpt.c
M source/blender/editors/space_file/file_ops.c
M source/blender/editors/space_view3d/drawobject.c
M source/blender/editors/transform/transform_snap.c
M source/blender/editors/transform/transform_snap_object.c
M source/blender/makesdna/DNA_action_types.h
M source/blender/makesdna/DNA_boid_types.h
M source/blender/makesdna/DNA_brush_types.h
M source/blender/makesdna/DNA_color_types.h
M source/blender/makesdna/DNA_constraint_types.h
M source/blender/makesdna/DNA_meshdata_types.h
M source/blender/makesdna/DNA_modifier_types.h
M source/blender/makesdna/DNA_object_force.h
M source/blender/makesdna/DNA_object_types.h
M source/blender/makesdna/DNA_packedFile_types.h
M source/blender/makesdna/DNA_scene_types.h
M source/blender/makesdna/DNA_space_types.h
M source/blender/makesrna/intern/rna_brush.c
M source/blender/render/extern/include/RE_bake.h
M source/blender/render/intern/source/bake_api.c
M source/blender/render/intern/source/external_engine.c
M source/blender/windowmanager/intern/wm_draw.c
===================================================================
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h
index f76d6c2e556..2ae003227dc 100644
--- a/intern/cycles/kernel/kernel_types.h
+++ b/intern/cycles/kernel/kernel_types.h
@@ -409,7 +409,7 @@ typedef enum DenoisingPassOffsets {
DENOISING_PASS_SIZE_CLEAN = 3,
} DenoisingPassOffsets;
-typedef enum BakePassFilter {
+typedef enum eBakePassFilter {
BAKE_FILTER_NONE = 0,
BAKE_FILTER_DIRECT = (1 << 0),
BAKE_FILTER_INDIRECT = (1 << 1),
@@ -420,7 +420,7 @@ typedef enum BakePassFilter {
BAKE_FILTER_SUBSURFACE = (1 << 6),
BAKE_FILTER_EMISSION = (1 << 7),
BAKE_FILTER_AO = (1 << 8),
-} BakePassFilter;
+} eBakePassFilter;
typedef enum BakePassFilterCombos {
BAKE_FILTER_COMBINED = (
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,
+ eStrCursorJumpT
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list