diff options
author | Ton Roosendaal <ton@blender.org> | 2009-01-19 19:54:41 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-01-19 19:54:41 +0300 |
commit | bc63213844e723b0c552da446fb7fa9f9e7ea5f6 (patch) | |
tree | 433519ee3526536032e62226a058f6ec4fd17a1a /source/blender/makesdna/DNA_view3d_types.h | |
parent | 9b049d89a1bc36534875c67e097415e034d0624d (diff) |
2.5
View3D has been split now in a local part (RegionView3D) and a
per-area part (old View3D). Currently local is:
- view transform
- camera zoom/offset
- gpencil (todo)
- custom clipping planes
Rest is in Area still, like active camera, draw type, layers,
localview, custom centers, around-settings, transform widget,
gridlines, and so on (mostly stuff as available in header).
To see it work; also added new feature for region split,
press SHIFT+ALT+CTRL+S for four-split.
The idea is to make a preset 4-split, configured to stick
to top/right/front views for three views.
Another cool idea to explore is to then box-clip all drawing
based on these 3 views.
Note about the code:
- currently view3d still stores some depricated settings, to
convert from older files. Not all settings are copied over
though, like custom clip planes or the 'lock view to object'.
- since some view3d ops are now on area level, the operators
for it should keep track of that.
Bugfix in transform: quat initialize in operator-invoke missed
one zero.
Als brought back GE to compile for missing Ipos and channels.
Diffstat (limited to 'source/blender/makesdna/DNA_view3d_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_view3d_types.h | 122 |
1 files changed, 72 insertions, 50 deletions
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 4f6d8989f9d..ee50854f05c 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -71,92 +71,114 @@ typedef struct BGpic { /* ********************************* */ -/* 3D ViewPort Struct */ -typedef struct View3D { - struct SpaceLink *next, *prev; - ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - float blockscale; +typedef struct RegionView3D { - short blockhandler[8]; - float winmat[4][4]; float viewmat[4][4]; float viewinv[4][4]; float persmat[4][4]; float persinv[4][4]; - - float viewquat[4], dist, zfac; /* zfac is initgrabz() result */ - int lay_used; /* used while drawing */ + float twmat[4][4]; /* transform widget */ + float viewquat[4], dist, zfac; /* zfac is initgrabz() result */ + float camdx, camdy; /* camera view offsets, 1.0 = viewplane moves entire width/height */ + float pixsize; + float ofs[3]; + short camzoom, viewbut; + int pad1; + + short rflag, pad2; short persp; short view; + + /* user defined clipping planes */ + float clip[4][4]; + struct BoundBox *clipbb; + + struct bGPdata *gpd; /* Grease-Pencil Data (annotation layers) */ + + struct RegionView3D *localvd; + struct RenderInfo *ri; + struct RetopoViewData *retopo_view_data; + struct ViewDepths *depths; + + /* animated smooth view */ + struct SmoothViewStore *sms; + struct wmTimer *smooth_timer; + + /* last view */ + float lviewquat[4]; + short lpersp, lview; + int pad3; + +} RegionView3D; +/* 3D ViewPort Struct */ +typedef struct View3D { + struct SpaceLink *next, *prev; + ListBase regionbase; /* storage of regions for inactive spaces */ + int spacetype; + float blockscale; + short blockhandler[8]; + + float viewquat[4], dist, pad1; /* XXX depricated */ + + int lay_used; /* used while drawing */ + + short persp; /* XXX depricated */ + short view; /* XXX depricated */ + struct Object *camera, *ob_centre; struct BGpic *bgpic; struct View3D *localvd; - struct RenderInfo *ri; - struct RetopoViewData *retopo_view_data; - struct ViewDepths *depths; char ob_centre_bone[32]; /* optional string for armature bone to define center */ + int lay, layact; + /** * The drawing mode for the 3d display. Set to OB_WIRE, OB_SOLID, * OB_SHADED or OB_TEXTURE */ short drawtype; short localview; - int lay, layact; - short scenelock, around, camzoom; + short scenelock, around, pad3; + short flag, flag2; - char pivot_last, pad1; /* pivot_last is for rotating around the last edited element */ + short pivot_last; /* pivot_last is for rotating around the last edited element */ - float lens, grid, gridview, pixsize, near, far; - float camdx, camdy; /* camera view offsets, 1.0 = viewplane moves entire width/height */ - float ofs[3], cursor[3]; + float lens, grid, gridview, padf, near, far; + float ofs[3]; /* XXX depricated */ + float cursor[3]; - short gridlines, viewbut; + short gridlines, pad4; short gridflag; - short modeselect, menunr, texnr; + short gridsubdiv; /* Number of subdivisions in the grid between each highlighted grid line */ + short modeselect; + short keyflags; /* flags for display of keyframes */ /* transform widget info */ short twtype, twmode, twflag, twdrawflag; - float twmat[4][4]; - /* user defined clipping planes */ - float clip[4][4]; - - struct BoundBox *clipbb; + /* customdata flags from modes */ + unsigned int customdata_mask; /* afterdraw, for xray & transparent */ struct ListBase afterdraw; + /* drawflags, denoting state */ short zbuf, transp, xray; - short flag, flag2; - - short gridsubdiv; /* Number of subdivisions in the grid between each highlighted grid line */ - - short keyflags; /* flags for display of keyframes */ - - char ndofmode; /* mode of transform for 6DOF devices -1 not found, 0 normal, 1 fly, 2 ob transform */ - char ndoffilter; /*filter for 6DOF devices 0 normal, 1 dominant */ + char ndofmode; /* mode of transform for 6DOF devices -1 not found, 0 normal, 1 fly, 2 ob transform */ + char ndoffilter; /* filter for 6DOF devices 0 normal, 1 dominant */ void *properties_storage; /* Nkey panel stores stuff here, not in file */ + + /* XXX depricated? */ struct bGPdata *gpd; /* Grease-Pencil Data (annotation layers) */ - /* animated smooth view */ - struct SmoothViewStore *sms; - struct wmTimer *smooth_timer; - - /* last view */ - float lviewquat[4]; - short lpersp, lview; - - /* customdata flags from modes */ - unsigned int customdata_mask; } View3D; +/* XXX this needs cleaning */ /* View3D->flag (short) */ #define V3D_MODE (16+32+64+128+256+512) @@ -174,14 +196,14 @@ typedef struct View3D { #define V3D_SELECT_OUTLINE 2048 #define V3D_ZBUF_SELECT 4096 #define V3D_GLOBAL_STATS 8192 -#define V3D_CLIPPING 16384 #define V3D_DRAW_CENTERS 32768 +/* RegionView3d->rflag */ +#define RV3D_OPP_DIRECTION_NAME 1 +#define RV3D_FLYMODE 2 +#define RV3D_CLIPPING 4 + /* View3d->flag2 (short) */ -#define V3D_MODE2 (32) -#define V3D_OPP_DIRECTION_NAME 1 -#define V3D_FLYMODE 2 -#define V3D_DEPRECATED 4 /* V3D_TRANSFORM_SNAP, moved to a scene setting */ #define V3D_SOLID_TEX 8 #define V3D_DISPGP 16 |