[Bf-blender-cvs] [9b04a470707] master: Cleanup: label scene flags more clearly
Campbell Barton
noreply at git.blender.org
Thu Jan 18 03:43:34 CET 2018
Commit: 9b04a4707077e0c1e61c1aa85d506a6661efa7de
Author: Campbell Barton
Date: Thu Jan 18 13:50:52 2018 +1100
Branches: master
https://developer.blender.org/rB9b04a4707077e0c1e61c1aa85d506a6661efa7de
Cleanup: label scene flags more clearly
Also correct typo in enum name
===================================================================
M source/blender/editors/sculpt_paint/paint_utils.c
M source/blender/makesdna/DNA_scene_types.h
===================================================================
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c
index 1c2ab442e95..7473808012d 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 eImageePaintMode mode = scene->toolsettings->imapaint.mode;
+ const eImagePaintMode 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/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 6535124a1be..0f15ac0ff7f 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -183,12 +183,14 @@ typedef struct SceneRenderLayer {
struct Material *mat_override;
struct Group *light_override;
- unsigned int lay; /* scene->lay itself has priority over this */
+ unsigned int lay; /* Scene.lay itself has priority over this */
unsigned int lay_zmask; /* has to be after lay, this is for Z-masking */
unsigned int lay_exclude; /* not used by internal, exclude */
int layflag;
-
- int passflag; /* pass_xor has to be after passflag */
+
+ /* pass_xor has to be after passflag */
+ /* note, this is treestore element 'nr' in outliner, short still... */
+ int passflag;
int pass_xor;
int samples;
@@ -199,7 +201,7 @@ typedef struct SceneRenderLayer {
struct FreestyleConfig freestyleConfig;
} SceneRenderLayer;
-/* srl->layflag */
+/* SceneRenderLayer.layflag */
#define SCE_LAY_SOLID 1
#define SCE_LAY_ZTRA 2
#define SCE_LAY_HALO 4
@@ -216,7 +218,7 @@ typedef struct SceneRenderLayer {
#define SCE_LAY_ZMASK 0x40000
#define SCE_LAY_NEG_ZMASK 0x80000
-/* srl->passflag */
+/* SceneRenderLayer.passflag */
typedef enum eScenePassType {
SCE_PASS_COMBINED = (1 << 0),
SCE_PASS_Z = (1 << 1),
@@ -286,7 +288,6 @@ typedef enum eScenePassType {
#define RE_PASSNAME_SUBSURFACE_INDIRECT "SubsurfaceInd"
#define RE_PASSNAME_SUBSURFACE_COLOR "SubsurfaceCol"
-/* note, srl->passflag is treestore element 'nr' in outliner, short still... */
/* View - MultiView */
typedef struct SceneRenderView {
@@ -301,16 +302,16 @@ typedef struct SceneRenderView {
} SceneRenderView;
-/* srv->viewflag */
+/* SceneRenderView.viewflag */
#define SCE_VIEW_DISABLE (1<<0)
-/* scene.render.views_format */
+/* RenderData.views_format */
enum {
SCE_VIEWS_FORMAT_STEREO_3D = 0,
SCE_VIEWS_FORMAT_MULTIVIEW = 1,
};
-/* ImageFormatData.views_output */
+/* ImageFormatData.views_format (also used for Sequence.views_format) */
enum {
R_IMF_VIEWS_INDIVIDUAL = 0,
R_IMF_VIEWS_STEREO_3D = 1,
@@ -510,7 +511,7 @@ typedef struct BakeData {
char cage[64]; /* MAX_NAME */
} BakeData;
-/* (char) normal_swizzle */
+/* BakeData.normal_swizzle (char) */
typedef enum eBakeNormalSwizzle {
R_BAKE_POSX = 0,
R_BAKE_POSY = 1,
@@ -520,13 +521,13 @@ typedef enum eBakeNormalSwizzle {
R_BAKE_NEGZ = 5,
} eBakeNormalSwizzle;
-/* (char) save_mode */
+/* BakeData.save_mode (char) */
typedef enum eBakeSaveMode {
R_BAKE_SAVE_INTERNAL = 0,
R_BAKE_SAVE_EXTERNAL = 1,
} eBakeSaveMode;
-/* bake->pass_filter */
+/* BakeData.pass_filter */
typedef enum eBakePassFilter {
R_BAKE_PASS_FILTER_NONE = 0,
R_BAKE_PASS_FILTER_AO = (1 << 0),
@@ -796,6 +797,7 @@ typedef struct GameDome {
struct Text *warptext;
} GameDome;
+/* GameDome.mode */
#define DOME_FISHEYE 1
#define DOME_TRUNCATED_FRONT 2
#define DOME_TRUNCATED_REAR 3
@@ -811,6 +813,7 @@ typedef struct GameFraming {
char type, pad1, pad2, pad3;
} GameFraming;
+/* GameFraming.type */
#define SCE_GAMEFRAMING_BARS 0
#define SCE_GAMEFRAMING_EXTEND 1
#define SCE_GAMEFRAMING_SCALE 2
@@ -834,6 +837,7 @@ typedef struct RecastData {
short pad2;
} RecastData;
+/* RecastData.partitioning */
#define RC_PARTITION_WATERSHED 0
#define RC_PARTITION_MONOTONE 1
#define RC_PARTITION_LAYERS 2
@@ -883,10 +887,12 @@ typedef struct GameData {
} GameData;
+/* GameData.stereoflag */
#define STEREO_NOSTEREO 1
#define STEREO_ENABLED 2
#define STEREO_DOME 3
+/* GameData.stereomode */
//#define STEREO_NOSTEREO 1
#define STEREO_QUADBUFFERED 2
#define STEREO_ABOVEBELOW 3
@@ -897,7 +903,7 @@ typedef struct GameData {
//#define STEREO_DOME 8
#define STEREO_3DTVTOPBOTTOM 9
-/* physicsEngine */
+/* GameData.physicsEngine */
#define WOPHY_NONE 0
#define WOPHY_BULLET 5
@@ -906,13 +912,13 @@ typedef struct GameData {
#define OBSTSIMULATION_TOI_rays 1
#define OBSTSIMULATION_TOI_cells 2
-/* Raster storage */
+/* GameData.raster_storage */
#define RAS_STORE_AUTO 0
-#define RAS_STORE_IMMEDIATE 1
+/* #define RAS_STORE_IMMEDIATE 1 */ /* DEPRECATED */
#define RAS_STORE_VA 2
#define RAS_STORE_VBO 3
-/* vsync */
+/* GameData.vsync */
#define VSYNC_ON 0
#define VSYNC_OFF 1
#define VSYNC_ADAPTIVE 2
@@ -956,13 +962,16 @@ enum {
#define SCE_LOD_USE_HYST (1 << 0)
/* UV Paint */
+/* ToolSettings.uv_sculpt_settings */
#define UV_SCULPT_LOCK_BORDERS 1
#define UV_SCULPT_ALL_ISLANDS 2
+/* ToolSettings.uv_sculpt_tool */
#define UV_SCULPT_TOOL_PINCH 1
#define UV_SCULPT_TOOL_RELAX 2
#define UV_SCULPT_TOOL_GRAB 3
+/* ToolSettings.uv_relax_method */
#define UV_SCULPT_TOOL_RELAX_LAPLACIAN 1
#define UV_SCULPT_TOOL_RELAX_HC 2
@@ -972,6 +981,7 @@ enum {
#define STEREO_RIGHT_SUFFIX "_R"
#define STEREO_LEFT_SUFFIX "_L"
+/* View3D.stereo3d_camera / View3D.multiview_eye / ImageUser.multiview_eye */
typedef enum eStereoViews {
STEREO_LEFT_ID = 0,
STEREO_RIGHT_ID = 1,
@@ -982,7 +992,7 @@ typedef enum eStereoViews {
/* *************************************************************** */
/* Markers */
-typedef struct TimeMarker {
+typedef struct TimeMarker {
struct TimeMarker *next, *prev;
int frame;
char name[64];
@@ -1131,7 +1141,7 @@ enum {
/* ------------------------------------------- */
/* GPencil Stroke Sculpting */
-/* Brush types */
+/* GP_BrushEdit_Settings.brushtype */
typedef enum eGP_EditBrush_Types {
GP_EDITBRUSH_TYPE_SMOOTH = 0,
GP_EDITBRUSH_TYPE_THICKNESS = 1,
@@ -1149,7 +1159,7 @@ typedef enum eGP_EditBrush_Types {
TOT_GP_EDITBRUSH_TYPES
} eGP_EditBrush_Types;
-/* Lock axis options */
+/* GP_BrushEdit_Settings.lock_axis */
typedef enum eGP_Lockaxis_Types {
GP_LOCKAXIS_NONE = 0,
GP_LOCKAXIS_X = 1,
@@ -1187,7 +1197,7 @@ typedef struct GP_BrushEdit_Settings {
int brushtype; /* eGP_EditBrush_Types */
int flag; /* eGP_BrushEdit_SettingsFlag */
- int lock_axis; /* lock drawing to one axis */
+ int lock_axis; /* eGP_Lockaxis_Types lock drawing to one axis */
float alpha; /* alpha factor for selection color */
} GP_BrushEdit_Settings;
@@ -1337,6 +1347,7 @@ typedef struct UnifiedPaintSettings {
struct ColorSpace *colorspace;
} UnifiedPaintSettings;
+/* UnifiedPaintSettings.flag */
typedef enum {
UNIFIED_PAINT_SIZE = (1 << 0),
UNIFIED_PAINT_ALPHA = (1 << 1),
@@ -1698,14 +1709,14 @@ typedef struct Scene {
/* **************** RENDERDATA ********************* */
-/* flag */
+/* RenderData.flag */
/* use preview range */
#define SCER_PRV_RANGE (1<<0)
#define SCER_LOCK_FRAME_SELECTION (1<<1)
/* show/use subframes (for checking motion blur) */
#define SCER_SHOW_SUBFRAME (1<<3)
-/* mode (int now) */
+/* RenderData.mode */
#define R_OSA 0x0001
#define R_SHADOW 0x0002
#define R_GAMMA 0x0004
@@ -1741,7 +1752,7 @@ typedef struct Scene {
#define R_PERSISTENT_DATA 0x4000000 /* keep data around for re-render */
#define R_USE_WS_SHADING 0x8000000 /* use world space interpretation of lighting data */
-/* seq_flag */
+/* RenderData.seq_flag */
enum {
// R_SEQ_GL_PREV = (1 << 1), // UNUSED, we just use setting from seq_prev_type now.
// R_SEQ_GL_REND = (1 << 2), // UNUSED, opengl render has its own operator now.
@@ -1749,15 +1760,14 @@ enum {
R_SEQ_CAMERA_DOF = (1 << 4),
};
-/* displaymode */
-
+/* RenderData.displaymode */
#define R_OUTPUT_SCREEN 0
#define R_OUTPUT_AREA 1
#define R_OUTPUT_WINDOW 2
#define R_OUTPUT_NONE 3
/*#define R_OUTPUT_FORKED 4*/
-/* filtertype */
+/* RenderData.filtertype */
#define R_FILTER_BOX 0
#define R_FILTER_TENT 1
#define R_FILTER_QUAD 2
@@ -1767,7 +1777,7 @@ enum {
#define R_FILTER_MITCH 6
#define R_FILTER_FAST_GAUSS 7 /* note, this is only used for nodes at the moment */
-/* raytrace structure */
+/* RenderData.raytrace_structure */
#define R_RAYSTRUCTURE_AUTO 0
#define R_RAYSTRUCTURE_OCTREE 1
#define R_RAYSTRUCTURE_BLIBVH 2 /* removed */
@@ -1775,11 +1785,11 @@ enum {
#define R_RAYSTRUCTURE_SIMD_SVBVH 4 /* needs SIMD */
#define R_RAYSTRUCTURE_SIMD_QBVH 5 /* needs SIMD */
-/* raytrace_options */
+/* RenderData.raytrace_options */
#define R_RAYTRACE_USE_LOCAL_COORDS 0x0001
#define R_RAYTRACE_USE_INSTANCES 0x0002
-/* scemode (int now) */
+/* RenderData.scemode (int now) */
#define R_DOSEQ 0x0001
#define R_BG_RENDER 0x0002
/* passepartout is camera option now, keep this for backward compatibility */
@@ -1804,7 +1814,7 @@ enum {
#define R_EXR_CACHE_FILE 0x100000
#define R_MULTIVIEW 0x200000
-/* r->stamp */
+/* RenderData.stamp */
#define R_STAMP_TIME 0x0001
#define R_STAMP_FRAME 0x0002
#define R_STAMP_DATE 0x0004
@@ -1825,19 +1835,19 @@ enum {
R_STAMP_RENDERTIME|R_STAMP_CAMERALENS|R_STAMP_MEMORY| \
R_STAMP_HIDE_LABELS)
-/* alphamode */
+/* RenderData.alphamode */
#define R_ADDSKY 0
#define R_ALPHAPREMUL 1
/*#define R_ALPHAKEY 2*/ /* deprecated, shouldn't be used */
-/* color_mgt_flag */
+/* RenderData.color_mgt_flag */
enum {
R_COLOR_MANAGEMENT = (1 << 0), /* deprecated, should only be used in versioning code only */
/*R_COLOR_MANAGEMENT_PREDIVIDE = (1 << 1)*/ /* deprecated, shouldn't be used */
}
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list