[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46962] trunk/blender/source/blender/ makesdna/DNA_space_types.h: Code Cleanup - DNA_space_types. h - Part 2 - Rearranging Stuff
Joshua Leung
aligorith at gmail.com
Thu May 24 06:46:02 CEST 2012
Revision: 46962
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46962
Author: aligorith
Date: 2012-05-24 04:46:01 +0000 (Thu, 24 May 2012)
Log Message:
-----------
Code Cleanup - DNA_space_types.h - Part 2 - Rearranging Stuff
* Moved all enums to immediately follow the struct(s) that they are used for/by.
Less jumping around the file to find these
* Reshuffled the order of a few structs/editor groupings. For example, now all
animation editors are grouped together, and most general/property editors are
grouped together.
Modified Paths:
--------------
trunk/blender/source/blender/makesdna/DNA_space_types.h
Modified: trunk/blender/source/blender/makesdna/DNA_space_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_space_types.h 2012-05-24 04:21:57 UTC (rev 46961)
+++ trunk/blender/source/blender/makesdna/DNA_space_types.h 2012-05-24 04:46:01 UTC (rev 46962)
@@ -68,12 +68,14 @@
struct MovieClip;
struct MovieClipScopes;
- /**
- * The base structure all the other spaces
- * are derived (implicitly) from. Would be
- * good to make this explicit.
- */
+/* SpaceLink (Base) ==================================== */
+
+/**
+ * The base structure all the other spaces
+ * are derived (implicitly) from. Would be
+ * good to make this explicit.
+ */
typedef struct SpaceLink {
struct SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
@@ -82,17 +84,19 @@
short blockhandler[8] DNA_DEPRECATED; /* XXX make deprecated */
} SpaceLink;
+
+/* Space Info ========================================== */
+
+/* Info Header */
typedef struct SpaceInfo {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype;
float blockscale DNA_DEPRECATED;
-
short blockhandler[8] DNA_DEPRECATED; /* XXX make deprecated */
char rpt_mask;
char pad[7];
-
} SpaceInfo;
/* SpaceInfo.rpt_mask */
@@ -104,14 +108,194 @@
INFO_RPT_ERR = (1 << 4),
} eSpaceInfo_RptMask;
+
+/* Properties Editor ==================================== */
+
+/* Properties Editor */
+typedef struct SpaceButs {
+ SpaceLink *next, *prev;
+ ListBase regionbase; /* storage of regions for inactive spaces */
+ int spacetype;
+ float blockscale DNA_DEPRECATED;
+
+ short blockhandler[8] DNA_DEPRECATED;
+
+ View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
+
+ short mainb, mainbo, mainbuser; /* context tabs */
+ short re_align, align; /* align for panels */
+ short preview; /* preview is signal to refresh */
+ short texture_context; /* texture context selector (material, world, brush)*/
+ char flag, pad;
+
+ void *path; /* runtime */
+ int pathflag, dataicon; /* runtime */
+ ID *pinid;
+
+ void *texuser;
+} SpaceButs;
+
+/* button defines (deprecated) */
+/* warning: the values of these defines are used in sbuts->tabs[8] */
+/* sbuts->mainb new */
+#define CONTEXT_SCENE 0
+#define CONTEXT_OBJECT 1
+#define CONTEXT_TYPES 2
+#define CONTEXT_SHADING 3
+#define CONTEXT_EDITING 4
+#define CONTEXT_SCRIPT 5
+#define CONTEXT_LOGIC 6
+
+/* sbuts->mainb old (deprecated) */
+#define BUTS_VIEW 0
+#define BUTS_LAMP 1
+#define BUTS_MAT 2
+#define BUTS_TEX 3
+#define BUTS_ANIM 4
+#define BUTS_WORLD 5
+#define BUTS_RENDER 6
+#define BUTS_EDIT 7
+#define BUTS_GAME 8
+#define BUTS_FPAINT 9
+#define BUTS_RADIO 10
+#define BUTS_SCRIPT 11
+#define BUTS_SOUND 12
+#define BUTS_CONSTRAINT 13
+#define BUTS_EFFECTS 14
+
+/* buts->mainb new */
+typedef enum eSpaceButtons_Context {
+ BCONTEXT_RENDER = 0,
+ BCONTEXT_SCENE,
+ BCONTEXT_WORLD,
+ BCONTEXT_OBJECT,
+ BCONTEXT_DATA,
+ BCONTEXT_MATERIAL,
+ BCONTEXT_TEXTURE,
+ BCONTEXT_PARTICLE,
+ BCONTEXT_PHYSICS,
+ BCONTEXT_BONE,
+ BCONTEXT_MODIFIER,
+ BCONTEXT_CONSTRAINT,
+ BCONTEXT_BONE_CONSTRAINT,
+
+ /* always as last... */
+ BCONTEXT_TOT
+} eSpaceButtons_Context;
+
+/* sbuts->flag */
+#define SB_PRV_OSA 1
+#define SB_PIN_CONTEXT 2
+//#define SB_WORLD_TEX 4 //not used anymore
+//#define SB_BRUSH_TEX 8 //not used anymore
+#define SB_SHADING_CONTEXT 16
+
+/* sbuts->texture_context */
+typedef enum eSpaceButtons_Texture_Context {
+ SB_TEXC_MAT_OR_LAMP = 0,
+ SB_TEXC_WORLD,
+ SB_TEXC_BRUSH,
+ SB_TEXC_PARTICLES,
+} eSpaceButtons_Texture_Context;
+
+/* sbuts->align */
+typedef enum eSpaceButtons_Align {
+ BUT_FREE = 0,
+ BUT_HORIZONTAL,
+ BUT_VERTICAL,
+ BUT_AUTO,
+} eSpaceButtons_Align;
+
+/* sbuts->scaflag */
+#define BUTS_SENS_SEL 1
+#define BUTS_SENS_ACT 2
+#define BUTS_SENS_LINK 4
+#define BUTS_CONT_SEL 8
+#define BUTS_CONT_ACT 16
+#define BUTS_CONT_LINK 32
+#define BUTS_ACT_SEL 64
+#define BUTS_ACT_ACT 128
+#define BUTS_ACT_LINK 256
+#define BUTS_SENS_STATE 512
+#define BUTS_ACT_STATE 1024
+#define BUTS_CONT_INIT_STATE 2048
+
+
+/* Outliner =============================================== */
+
+/* Outliner */
+typedef struct SpaceOops {
+ SpaceLink *next, *prev;
+ ListBase regionbase; /* storage of regions for inactive spaces */
+ int spacetype;
+ float blockscale DNA_DEPRECATED;
+ short blockhandler[8] DNA_DEPRECATED;
+
+ View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
+
+ ListBase tree;
+ struct TreeStore *treestore;
+
+ /* search stuff */
+ char search_string[32];
+ struct TreeStoreElem search_tse;
+
+ short flag, outlinevis, storeflag, search_flags;
+} SpaceOops;
+
+
+/* SpaceOops->flag */
+typedef enum eSpaceOutliner_Flag {
+ SO_TESTBLOCKS = (1 << 0),
+ SO_NEWSELECTED = (1 << 1),
+ SO_HIDE_RESTRICTCOLS = (1 << 2),
+ SO_HIDE_KEYINGSETINFO = (1 << 3),
+} eSpaceOutliner_Flag;
+
+/* SpaceOops->outlinevis */
+typedef enum eSpaceOutliner_Mode {
+ SO_ALL_SCENES = 0,
+ SO_CUR_SCENE,
+ SO_VISIBLE,
+ SO_SELECTED,
+ SO_ACTIVE,
+ SO_SAME_TYPE,
+ SO_GROUPS,
+ SO_LIBRARIES,
+ SO_VERSE_SESSION,
+ SO_VERSE_MS,
+ SO_SEQUENCE,
+ SO_DATABLOCKS,
+ SO_USERDEF,
+ SO_KEYMAP,
+} eSpaceOutliner_Mode;
+
+/* SpaceOops->storeflag */
+typedef enum eSpaceOutliner_StoreFlag {
+ /* rebuild tree */
+ SO_TREESTORE_CLEANUP = (1 << 0),
+ /* if set, it allows redraws. gets set for some allqueue events */
+ SO_TREESTORE_REDRAW = (1 << 1),
+} eSpaceOutliner_StoreFlag;
+
+/* outliner search flags (SpaceOops->search_flags) */
+typedef enum eSpaceOutliner_Search_Flags {
+ SO_FIND_CASE_SENSITIVE = (1 << 0),
+ SO_FIND_COMPLETE = (1 << 1),
+ SO_SEARCH_RECURSIVE = (1 << 2),
+} eSpaceOutliner_Search_Flags;
+
+
+/* Graph Editor ========================================= */
+
/* 'Graph' Editor (formerly known as the IPO Editor) */
typedef struct SpaceIpo {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype;
float blockscale DNA_DEPRECATED;
-
short blockhandler[8] DNA_DEPRECATED;
+
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
struct bDopeSheet *ads; /* settings for filtering animation data (NOTE: we use a pointer due to code-linking issues) */
@@ -126,29 +310,147 @@
int around; /* pivot point for transforms */
} SpaceIpo;
-typedef struct SpaceButs {
- SpaceLink *next, *prev;
+
+/* SpaceIpo->flag (Graph Editor Settings) */
+typedef enum eGraphEdit_Flag {
+ /* OLD DEPRECEATED SETTING */
+ /* SIPO_LOCK_VIEW = (1 << 0), */
+
+ /* don't merge keyframes on the same frame after a transform */
+ SIPO_NOTRANSKEYCULL = (1 << 1),
+ /* don't show any keyframe handles at all */
+ SIPO_NOHANDLES = (1 << 2),
+ /* don't show current frame number beside indicator line */
+ SIPO_NODRAWCFRANUM = (1 << 3),
+ /* show timing in seconds instead of frames */
+ SIPO_DRAWTIME = (1 << 4),
+ /* only show keyframes for selected F-Curves */
+ SIPO_SELCUVERTSONLY = (1 << 5),
+ /* draw names of F-Curves beside the respective curves */
+ /* NOTE: currently not used */
+ SIPO_DRAWNAMES = (1 << 6),
+ /* show sliders in channels list */
+ SIPO_SLIDERS = (1 << 7),
+ /* don't show the horizontal component of the cursor */
+ SIPO_NODRAWCURSOR = (1 << 8),
+ /* only show handles of selected keyframes */
+ SIPO_SELVHANDLESONLY = (1 << 9),
+ /* temporary flag to force channel selections to be synced with main */
+ SIPO_TEMP_NEEDCHANSYNC = (1 << 10),
+ /* don't perform realtime updates */
+ SIPO_NOREALTIMEUPDATES = (1 << 11),
+ /* don't draw curves with AA ("beauty-draw") for performance */
+ SIPO_BEAUTYDRAW_OFF = (1 << 12),
+ /* draw grouped channels with colors set in group */
+ SIPO_NODRAWGCOLORS = (1 << 13),
+} eGraphEdit_Flag;
+
+/* SpaceIpo->mode (Graph Editor Mode) */
+typedef enum eGraphEdit_Mode {
+ /* all animation curves (from all over Blender) */
+ SIPO_MODE_ANIMATION = 0,
+ /* drivers only */
+ SIPO_MODE_DRIVERS,
+} eGraphEdit_Mode;
+
+
+/* NLA Editor ============================================= */
+
+/* NLA Editor */
+typedef struct SpaceNla {
+ struct SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype;
float blockscale DNA_DEPRECATED;
-
short blockhandler[8] DNA_DEPRECATED;
- View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
+ short autosnap; /* this uses the same settings as autosnap for Action Editor */
+ short flag;
+ int pad;
- short mainb, mainbo, mainbuser; /* context tabs */
- short re_align, align; /* align for panels */
- short preview; /* preview is signal to refresh */
- short texture_context; /* texture context selector (material, world, brush)*/
- char flag, pad;
+ struct bDopeSheet *ads;
+ View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
+} SpaceNla;
+
+/* nla->flag */
+typedef enum eSpaceNla_Flag {
+ /* flags (1<<0), (1<<1), and (1<<3) are depreceated flags from old verisons */
+
+ /* draw timing in seconds instead of frames */
+ SNLA_DRAWTIME = (1 << 2),
+ /* don't draw frame number beside frame indicator */
+ SNLA_NODRAWCFRANUM = (1 << 4),
+ /* don't draw influence curves on strips */
+ SNLA_NOSTRIPCURVES = (1 << 5),
+ /* don't perform realtime updates */
+ SNLA_NOREALTIMEUPDATES = (1 << 6),
+} eSpaceNla_Flag;
+
+
+/* Timeline =============================================== */
+
+/* Pointcache drawing data */
+# /* Only store the data array in the cache to avoid constant reallocation. */
+# /* No need to store when saved. */
+typedef struct SpaceTimeCache {
+ struct SpaceTimeCache *next, *prev;
+ float *array;
+} SpaceTimeCache;
+
+/* Timeline View */
+typedef struct SpaceTime {
+ SpaceLink *next, *prev;
+ ListBase regionbase; /* storage of regions for inactive spaces */
+ int spacetype;
+ float blockscale DNA_DEPRECATED;
- void *path; /* runtime */
- int pathflag, dataicon; /* runtime */
- ID *pinid;
+ View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
- void *texuser;
-} SpaceButs;
+ ListBase caches;
+ int cache_display;
+ int flag;
+} SpaceTime;
+
+
+/* time->flag */
+typedef enum eTimeline_Flag {
+ /* show timing in frames instead of in seconds */
+ TIME_DRAWFRAMES = (1 << 0),
+ /* show time indicator box beside the frame number */
+ TIME_CFRA_NUM = (1 << 1),
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list