Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <jeroen@blender.org>2020-03-06 14:08:03 +0300
committerJeroen Bakker <jeroen@blender.org>2020-03-06 14:11:55 +0300
commit297261eb906c56c7decf4401e6a3e06cec1691e8 (patch)
treef9833fb55af46edc0bc3849cffeb2dee83a3c6c9 /source/blender/makesdna
parent9fa29fe7652a9adc4a11ba3dc2975595489f7bcd (diff)
CodeCleanup: Added enums to opengl render functions
Motivation the functions get 3 different kind of flag parameters (ImBuf, DrawType, OffscreenRendering) the naming of the flags were not clear, leading to mistakes and unnecessary time spend debugging.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_object_enums.h10
-rw-r--r--source/blender/makesdna/DNA_object_types.h10
-rw-r--r--source/blender/makesdna/DNA_view3d_types.h4
3 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/makesdna/DNA_object_enums.h b/source/blender/makesdna/DNA_object_enums.h
index 3214de5b3c6..3ba26dc4bb5 100644
--- a/source/blender/makesdna/DNA_object_enums.h
+++ b/source/blender/makesdna/DNA_object_enums.h
@@ -39,6 +39,16 @@ typedef enum eObjectMode {
OB_MODE_WEIGHT_GPENCIL = 1 << 10,
} eObjectMode;
+/** #Object.dt */
+typedef enum eObjectDrawType {
+ OB_BOUNDBOX = 1,
+ OB_WIRE = 2,
+ OB_SOLID = 3,
+ OB_MATERIAL = 4,
+ OB_TEXTURE = 5,
+ OB_RENDER = 6,
+} eObjectDrawType;
+
/** 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_object_types.h b/source/blender/makesdna/DNA_object_types.h
index bfa7400f926..4d15abc3c77 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -527,16 +527,6 @@ enum {
OB_NEGZ = 5,
};
-/* dt: no flags */
-enum {
- OB_BOUNDBOX = 1,
- OB_WIRE = 2,
- OB_SOLID = 3,
- OB_MATERIAL = 4,
- OB_TEXTURE = 5,
- OB_RENDER = 6,
-};
-
/* dtx: flags (short) */
enum {
OB_DRAWBOUNDOX = 1 << 0,
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index ce0c68055d9..f0743a3fbb9 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -608,11 +608,11 @@ enum {
};
/** Settings for offscreen rendering */
-enum {
+typedef enum eV3DOffscreenDrawFlag {
V3D_OFSDRAW_NONE = (0),
V3D_OFSDRAW_SHOW_ANNOTATION = (1 << 0),
V3D_OFSDRAW_OVERRIDE_SCENE_SETTINGS = (1 << 1),
-};
+} eV3DOffscreenDrawFlag;
#define RV3D_CAMZOOM_MIN -30
#define RV3D_CAMZOOM_MAX 600