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:
Diffstat (limited to 'source/blender/makesdna/DNA_view3d_types.h')
-rw-r--r--source/blender/makesdna/DNA_view3d_types.h67
1 files changed, 52 insertions, 15 deletions
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index 40551701627..317cde9009d 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -135,11 +135,16 @@ typedef struct View3DCursor {
/* 3D Viewport Shading setings */
typedef struct View3DShading {
+ short type; /* Shading type (VIEW3D_SHADE_SOLID, ..) */
+ short prev_type; /* Runtime, for toggle between rendered viewport. */
+
short flag;
short color_type;
short light;
- char pad[2];
+ short background_type;
+ short pad2[2];
+
char studio_light[256]; /* FILE_MAXFILE */
char matcap[256]; /* FILE_MAXFILE */
@@ -154,6 +159,10 @@ typedef struct View3DShading {
float cavity_valley_factor;
float cavity_ridge_factor;
+
+ float background_color[3];
+ int pad;
+
} View3DShading;
/* 3D Viewport Overlay setings */
@@ -181,6 +190,14 @@ typedef struct View3DOverlay {
float wireframe_threshold;
char _pad0[4];
+ /* grease pencil setttings */
+ float gpencil_grid_scale;
+ float gpencil_paper_opacity;
+ int gpencil_grid_lines;
+ int gpencil_grid_axis;
+ float gpencil_grid_opacity;
+ char _pad1[4];
+
} View3DOverlay;
/* 3D ViewPort Struct */
@@ -219,8 +236,10 @@ typedef struct View3D {
int layact;
short ob_centre_cursor; /* optional bool for 3d cursor to define center */
- short scenelock, _pad1;
- short flag, flag2, pad2;
+ short scenelock;
+ short gp_flag;
+ short flag;
+ int flag2;
float lens, grid;
float near, far;
@@ -237,17 +256,18 @@ typedef struct View3D {
char gridflag;
/* transform gizmo info */
- char _pad5[2], mpr_flag;
+ char _pad5[2], gizmo_flag;
- short flag3;
+ short _pad2;
/* drawflags, denoting state */
- char _pad2;
+ char _pad3;
char transp, xray;
char multiview_eye; /* multiview current eye - for internal use */
- char pad3[4];
+ /* actually only used to define the opacity of the grease pencil vertex in edit mode */
+ float vertex_opacity;
/* note, 'fx_settings.dof' is currently _not_ allocated,
* instead set (temporarily) from camera */
@@ -267,9 +287,8 @@ typedef struct View3D {
float stereo3d_convergence_alpha;
/* Display settings */
- short drawtype; /* Shading mode (OB_SOLID, OB_TEXTURE, ..) */
- short prev_drawtype; /* Runtime, for toggle between rendered viewport. */
- int pad5;
+ short drawtype DNA_DEPRECATED;
+ short pad5[3];
View3DShading shading;
View3DOverlay overlay;
@@ -329,10 +348,10 @@ typedef struct View3D {
#define RV3D_VIEW_IS_AXIS(view) \
(((view) >= RV3D_VIEW_FRONT) && ((view) <= RV3D_VIEW_BOTTOM))
-/* View3d->flag2 (short) */
+/* View3d->flag2 (int) */
#define V3D_RENDER_OVERRIDE (1 << 2)
#define V3D_SOLID_TEX (1 << 3)
-#define V3D_SHOW_GPENCIL (1 << 4)
+#define V3D_SHOW_ANNOTATION (1 << 4)
#define V3D_LOCK_CAMERA (1 << 5)
#define V3D_RENDER_SHADOW (1 << 6) /* This is a runtime only flag that's used to tell draw_mesh_object() that we're doing a shadow pass instead of a regular draw */
#define V3D_SHOW_RECONSTRUCTION (1 << 7)
@@ -345,9 +364,12 @@ typedef struct View3D {
#define V3D_OCCLUDE_WIRE (1 << 14)
#define V3D_SHOW_MODE_SHADE_OVERRIDE (1 << 15) /* XXX: DNA deprecated */
-
-/* View3d->flag3 (short) */
-#define V3D_SHOW_WORLD (1 << 0)
+/* View3d->gp_flag (short) */
+#define V3D_GP_SHOW_PAPER (1 << 0) /* Activate paper to cover all viewport */
+#define V3D_GP_SHOW_GRID (1 << 1) /* Activate paper grid */
+#define V3D_GP_SHOW_EDIT_LINES (1 << 2)
+#define V3D_GP_SHOW_MULTIEDIT_LINES (1 << 3)
+#define V3D_GP_SHOW_ONION_SKIN (1 << 4) /* main switch at view level */
/* View3DShading->light */
enum {
@@ -376,6 +398,13 @@ enum {
V3D_SHADING_TEXTURE_COLOR = 3,
};
+/* View3DShading->background_type */
+enum {
+ V3D_SHADING_BACKGROUND_THEME = 0,
+ V3D_SHADING_BACKGROUND_WORLD = 1,
+ V3D_SHADING_BACKGROUND_VIEWPORT = 2,
+};
+
/* View3DOverlay->flag */
enum {
V3D_OVERLAY_FACE_ORIENTATION = (1 << 0),
@@ -467,4 +496,12 @@ enum {
#define RV3D_CAMZOOM_MIN_FACTOR 0.1657359312880714853f
#define RV3D_CAMZOOM_MAX_FACTOR 44.9852813742385702928f
+/* View3d.gpencil_grid_axis */
+enum {
+ V3D_GP_GRID_AXIS_LOCK = (1 << 0),
+ V3D_GP_GRID_AXIS_X = (1 << 1),
+ V3D_GP_GRID_AXIS_Y = (1 << 2),
+ V3D_GP_GRID_AXIS_Z = (1 << 3),
+};
+
#endif