diff options
Diffstat (limited to 'source/blender/makesdna/DNA_view3d_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_view3d_types.h | 84 |
1 files changed, 31 insertions, 53 deletions
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index b9894d46b5b..619f9fd4f6e 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -45,6 +45,7 @@ struct SmoothView3DStore; struct wmTimer; struct Material; struct GPUFX; +struct GPUViewport; /* This is needed to not let VC choke on near and far... old * proprietary MS extensions... */ @@ -65,21 +66,12 @@ struct GPUFX; /* The near/far thing is a Win EXCEPTION. Thus, leave near/far in the * code, and patch for windows. */ - -/* Background Picture in 3D-View */ -typedef struct BGpic { - struct BGpic *next, *prev; - - struct Image *ima; - struct ImageUser iuser; - struct MovieClip *clip; - struct MovieClipUser cuser; - float xof, yof, size, blend, rotation; - short view; - short flag; - short source; - char pad[6]; -} BGpic; + +typedef struct View3DDebug { + float znear, zfar; + char background; + char pad[7]; +} View3DDebug; /* ********************************* */ @@ -111,8 +103,12 @@ typedef struct RegionView3D { struct wmTimer *smooth_timer; - /* transform widget matrix */ + /* transform manipulator matrix */ float twmat[4][4]; + /* min/max dot product on twmat xyz axis. */ + float tw_axis_min[3], tw_axis_max[3]; + float tw_axis_matrix[3][3]; + char _pad[4]; float viewquat[4]; /* view rotation, must be kept normalized */ float dist; /* distance from 'ofs' along -viewinv[2] vector, where result is negative as is 'ofs' */ @@ -130,7 +126,7 @@ typedef struct RegionView3D { char pad[3]; float ofs_lock[2]; /* normalized offset for locked view: (-1, -1) bottom left, (1, 1) upper right */ - short twdrawflag; + short twdrawflag; /* XXX can easily get rid of this (Julian) */ short rflag; @@ -147,6 +143,7 @@ typedef struct RegionView3D { float rot_axis[3]; struct GPUFX *compositor; + struct GPUViewport *viewport; } RegionView3D; /* 3D ViewPort Struct */ @@ -173,9 +170,6 @@ typedef struct View3D { struct Object *camera, *ob_centre; rctf render_border; - struct ListBase bgpicbase; - struct BGpic *bgpic DNA_DEPRECATED; /* deprecated, use bgpicbase, only kept for do_versions(...) */ - struct View3D *localvd; /* allocated backup of its self while in localview */ char ob_centre_bone[64]; /* optional string for armature bone to define center, MAXBONENAME */ @@ -202,7 +196,7 @@ typedef struct View3D { short gridsubdiv; /* Number of subdivisions in the grid between each highlighted grid line */ char gridflag; - /* transform widget info */ + /* transform manipulator info */ char twtype, twmode, twflag; short flag3; @@ -217,8 +211,9 @@ typedef struct View3D { char multiview_eye; /* multiview current eye - for internal use */ - /* built-in shader effects (eGPUFXFlags) */ - char pad3[4]; + /* The active custom transform orientation of this 3D view. */ + short custom_orientation_index; + char pad3[2]; /* note, 'fx_settings.dof' is currently _not_ allocated, * instead set (temporarily) from camera */ @@ -245,6 +240,7 @@ typedef struct View3D { short prev_drawtype; short pad1; float pad2; + View3DDebug debug; } View3D; @@ -255,7 +251,7 @@ typedef struct View3D { /* View3D->flag (short) */ /*#define V3D_DISPIMAGE 1*/ /*UNUSED*/ -#define V3D_DISPBGPICS 2 +/*#define V3D_DISPBGPICS 2*/ /* UNUSED */ #define V3D_HIDE_HELPLINES 4 #define V3D_INVALID_BACKBUF 8 @@ -315,12 +311,19 @@ typedef struct View3D { #define V3D_SOLID_MATCAP (1 << 12) /* user flag */ #define V3D_SHOW_SOLID_MATCAP (1 << 13) /* runtime flag */ #define V3D_OCCLUDE_WIRE (1 << 14) -#define V3D_SHADELESS_TEX (1 << 15) +#define V3D_SHOW_MODE_SHADE_OVERRIDE (1 << 15) /* View3d->flag3 (short) */ #define V3D_SHOW_WORLD (1 << 0) +/* View3d->debug.background */ +enum { + V3D_DEBUG_BACKGROUND_NONE = (1 << 0), + V3D_DEBUG_BACKGROUND_GRADIENT = (1 << 1), + V3D_DEBUG_BACKGROUND_WORLD = (1 << 2), +}; + /* View3D->around */ enum { /* center of the bounding box */ @@ -362,38 +365,13 @@ enum { #define V3D_MANIP_NORMAL 2 #define V3D_MANIP_VIEW 3 #define V3D_MANIP_GIMBAL 4 -#define V3D_MANIP_CUSTOM 5 /* anything of value 5 or higher is custom */ - -/* View3d->twflag */ - /* USE = user setting, DRAW = based on selection */ -#define V3D_USE_MANIPULATOR 1 -#define V3D_DRAW_MANIPULATOR 2 -/* #define V3D_CALC_MANIPULATOR 4 */ /*UNUSED*/ +#define V3D_MANIP_CUSTOM 5 -/* BGPic->flag */ -/* may want to use 1 for select ? */ +/* View3d->twflag (also) */ enum { - V3D_BGPIC_EXPANDED = (1 << 1), - V3D_BGPIC_CAMERACLIP = (1 << 2), - V3D_BGPIC_DISABLED = (1 << 3), - V3D_BGPIC_FOREGROUND = (1 << 4), - - /* Camera framing options */ - V3D_BGPIC_CAMERA_ASPECT = (1 << 5), /* don't stretch to fit the camera view */ - V3D_BGPIC_CAMERA_CROP = (1 << 6), /* crop out the image */ - - /* Axis flip options */ - V3D_BGPIC_FLIP_X = (1 << 7), - V3D_BGPIC_FLIP_Y = (1 << 8), + V3D_MANIPULATOR_DRAW = (1 << 0), }; -#define V3D_BGPIC_EXPANDED (V3D_BGPIC_EXPANDED | V3D_BGPIC_CAMERACLIP) - -/* BGPic->source */ -/* may want to use 1 for select ?*/ -#define V3D_BGPIC_IMAGE 0 -#define V3D_BGPIC_MOVIE 1 - #define RV3D_CAMZOOM_MIN -30 #define RV3D_CAMZOOM_MAX 600 |