Cleanup: use doxy sections for space types

Also use struct names in enum/define comments.
This commit is contained in:
Campbell Barton
2018-05-31 09:49:58 +02:00
parent d9324b61d5
commit 84a9647f22

View File

@@ -67,8 +67,9 @@ struct MovieClipScopes;
struct Mask; struct Mask;
struct BLI_mempool; struct BLI_mempool;
/* -------------------------------------------------------------------- */
/* SpaceLink (Base) ==================================== */ /** \name SpaceLink (Base)
* \{ */
/** /**
* The base structure all the other spaces * The base structure all the other spaces
@@ -83,8 +84,9 @@ typedef struct SpaceLink {
short blockhandler[8] DNA_DEPRECATED; /* XXX make deprecated */ short blockhandler[8] DNA_DEPRECATED; /* XXX make deprecated */
} SpaceLink; } SpaceLink;
/* -------------------------------------------------------------------- */
/* Space Info ========================================== */ /** \name Space Info
* \{ */
/* Info Header */ /* Info Header */
typedef struct SpaceInfo { typedef struct SpaceInfo {
@@ -93,7 +95,7 @@ typedef struct SpaceInfo {
int spacetype; int spacetype;
float blockscale DNA_DEPRECATED; float blockscale DNA_DEPRECATED;
short blockhandler[8] DNA_DEPRECATED; /* XXX make deprecated */ short blockhandler[8] DNA_DEPRECATED; /* XXX make deprecated */
char rpt_mask; char rpt_mask;
char pad[7]; char pad[7];
} SpaceInfo; } SpaceInfo;
@@ -107,8 +109,11 @@ typedef enum eSpaceInfo_RptMask {
INFO_RPT_ERR = (1 << 4), INFO_RPT_ERR = (1 << 4),
} eSpaceInfo_RptMask; } eSpaceInfo_RptMask;
/** \} */
/* Properties Editor ==================================== */ /* -------------------------------------------------------------------- */
/** \name Properties Editor
* \{ */
/* Properties Editor */ /* Properties Editor */
typedef struct SpaceButs { typedef struct SpaceButs {
@@ -116,18 +121,18 @@ typedef struct SpaceButs {
ListBase regionbase; /* storage of regions for inactive spaces */ ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype; int spacetype;
float blockscale DNA_DEPRECATED; float blockscale DNA_DEPRECATED;
short blockhandler[8] DNA_DEPRECATED; short blockhandler[8] DNA_DEPRECATED;
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
short mainb, mainbo, mainbuser; /* context tabs */ short mainb, mainbo, mainbuser; /* context tabs */
short re_align, align; /* align for panels */ short re_align, align; /* align for panels */
short preview; /* preview is signal to refresh */ short preview; /* preview is signal to refresh */
/* texture context selector (material, lamp, particles, world, other) */ /* texture context selector (material, lamp, particles, world, other) */
short texture_context, texture_context_prev; short texture_context, texture_context_prev;
char flag, pad[7]; char flag, pad[7];
void *path; /* runtime */ void *path; /* runtime */
int pathflag, dataicon; /* runtime */ int pathflag, dataicon; /* runtime */
ID *pinid; ID *pinid;
@@ -136,18 +141,18 @@ typedef struct SpaceButs {
} SpaceButs; } SpaceButs;
/* button defines (deprecated) */ /* button defines (deprecated) */
/* warning: the values of these defines are used in sbuts->tabs[8] */ #ifdef DNA_DEPRECATED_ALLOW
/* sbuts->mainb new */ /* warning: the values of these defines are used in SpaceButs.tabs[8] */
/* SpaceButs.mainb new */
#define CONTEXT_SCENE 0 #define CONTEXT_SCENE 0
#define CONTEXT_OBJECT 1 #define CONTEXT_OBJECT 1
#define CONTEXT_TYPES 2 // #define CONTEXT_TYPES 2
#define CONTEXT_SHADING 3 #define CONTEXT_SHADING 3
#define CONTEXT_EDITING 4 #define CONTEXT_EDITING 4
#define CONTEXT_SCRIPT 5 // #define CONTEXT_SCRIPT 5
#define CONTEXT_LOGIC 6 #define CONTEXT_LOGIC 6
/* sbuts->mainb old (deprecated) */ /* SpaceButs.mainb old (deprecated) */
#ifdef DNA_DEPRECATED_ALLOW
// #define BUTS_VIEW 0 // #define BUTS_VIEW 0
#define BUTS_LAMP 1 #define BUTS_LAMP 1
#define BUTS_MAT 2 #define BUTS_MAT 2
@@ -163,9 +168,9 @@ typedef struct SpaceButs {
// #define BUTS_SOUND 12 // #define BUTS_SOUND 12
#define BUTS_CONSTRAINT 13 #define BUTS_CONSTRAINT 13
// #define BUTS_EFFECTS 14 // #define BUTS_EFFECTS 14
#endif #endif /* DNA_DEPRECATED_ALLOW */
/* buts->mainb new */ /* SpaceButs.mainb new */
typedef enum eSpaceButtons_Context { typedef enum eSpaceButtons_Context {
BCONTEXT_RENDER = 0, BCONTEXT_RENDER = 0,
BCONTEXT_SCENE = 1, BCONTEXT_SCENE = 1,
@@ -181,12 +186,12 @@ typedef enum eSpaceButtons_Context {
BCONTEXT_CONSTRAINT = 11, BCONTEXT_CONSTRAINT = 11,
BCONTEXT_BONE_CONSTRAINT = 12, BCONTEXT_BONE_CONSTRAINT = 12,
BCONTEXT_RENDER_LAYER = 13, BCONTEXT_RENDER_LAYER = 13,
/* always as last... */ /* always as last... */
BCONTEXT_TOT BCONTEXT_TOT
} eSpaceButtons_Context; } eSpaceButtons_Context;
/* sbuts->flag */ /* SpaceButs.flag */
typedef enum eSpaceButtons_Flag { typedef enum eSpaceButtons_Flag {
SB_PRV_OSA = (1 << 0), SB_PRV_OSA = (1 << 0),
SB_PIN_CONTEXT = (1 << 1), SB_PIN_CONTEXT = (1 << 1),
@@ -196,7 +201,7 @@ typedef enum eSpaceButtons_Flag {
SB_SHADING_CONTEXT = (1 << 4), SB_SHADING_CONTEXT = (1 << 4),
} eSpaceButtons_Flag; } eSpaceButtons_Flag;
/* sbuts->texture_context */ /* SpaceButs.texture_context */
typedef enum eSpaceButtons_Texture_Context { typedef enum eSpaceButtons_Texture_Context {
SB_TEXC_MATERIAL = 0, SB_TEXC_MATERIAL = 0,
SB_TEXC_WORLD = 1, SB_TEXC_WORLD = 1,
@@ -206,7 +211,7 @@ typedef enum eSpaceButtons_Texture_Context {
SB_TEXC_LINESTYLE = 5, SB_TEXC_LINESTYLE = 5,
} eSpaceButtons_Texture_Context; } eSpaceButtons_Texture_Context;
/* sbuts->align */ /* SpaceButs.align */
typedef enum eSpaceButtons_Align { typedef enum eSpaceButtons_Align {
BUT_FREE = 0, BUT_FREE = 0,
BUT_HORIZONTAL = 1, BUT_HORIZONTAL = 1,
@@ -214,7 +219,7 @@ typedef enum eSpaceButtons_Align {
BUT_AUTO = 3, BUT_AUTO = 3,
} eSpaceButtons_Align; } eSpaceButtons_Align;
/* sbuts->scaflag */ /* SpaceButs.scaflag */
#define BUTS_SENS_SEL 1 #define BUTS_SENS_SEL 1
#define BUTS_SENS_ACT 2 #define BUTS_SENS_ACT 2
#define BUTS_SENS_LINK 4 #define BUTS_SENS_LINK 4
@@ -229,7 +234,11 @@ typedef enum eSpaceButtons_Align {
#define BUTS_CONT_INIT_STATE 2048 #define BUTS_CONT_INIT_STATE 2048
/* Outliner =============================================== */ /** \} */
/* -------------------------------------------------------------------- */
/** \name Outliner
* \{ */
/* Outliner */ /* Outliner */
typedef struct SpaceOops { typedef struct SpaceOops {
@@ -240,9 +249,9 @@ typedef struct SpaceOops {
short blockhandler[8] DNA_DEPRECATED; short blockhandler[8] DNA_DEPRECATED;
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
ListBase tree; ListBase tree;
/* treestore is an ordered list of TreeStoreElem's from outliner tree; /* treestore is an ordered list of TreeStoreElem's from outliner tree;
* Note that treestore may contain duplicate elements if element * Note that treestore may contain duplicate elements if element
* is used multiple times in outliner tree (e. g. linked objects) * is used multiple times in outliner tree (e. g. linked objects)
@@ -250,19 +259,19 @@ typedef struct SpaceOops {
* therefore readfile.c/writefile.c linearize treestore into TreeStore structure * therefore readfile.c/writefile.c linearize treestore into TreeStore structure
*/ */
struct BLI_mempool *treestore; struct BLI_mempool *treestore;
/* search stuff */ /* search stuff */
char search_string[64]; char search_string[64];
struct TreeStoreElem search_tse; struct TreeStoreElem search_tse;
short flag, outlinevis, storeflag, search_flags; short flag, outlinevis, storeflag, search_flags;
/* pointers to treestore elements, grouped by (id, type, nr) in hashtable for faster searching */ /* pointers to treestore elements, grouped by (id, type, nr) in hashtable for faster searching */
void *treehash; void *treehash;
} SpaceOops; } SpaceOops;
/* SpaceOops->flag */ /* SpaceOops.flag */
typedef enum eSpaceOutliner_Flag { typedef enum eSpaceOutliner_Flag {
SO_TESTBLOCKS = (1 << 0), SO_TESTBLOCKS = (1 << 0),
SO_NEWSELECTED = (1 << 1), SO_NEWSELECTED = (1 << 1),
@@ -271,7 +280,7 @@ typedef enum eSpaceOutliner_Flag {
SO_SKIP_SORT_ALPHA = (1 << 4), SO_SKIP_SORT_ALPHA = (1 << 4),
} eSpaceOutliner_Flag; } eSpaceOutliner_Flag;
/* SpaceOops->outlinevis */ /* SpaceOops.outlinevis */
typedef enum eSpaceOutliner_Mode { typedef enum eSpaceOutliner_Mode {
SO_ALL_SCENES = 0, SO_ALL_SCENES = 0,
SO_CUR_SCENE = 1, SO_CUR_SCENE = 1,
@@ -290,7 +299,7 @@ typedef enum eSpaceOutliner_Mode {
SO_ID_ORPHANS = 14, SO_ID_ORPHANS = 14,
} eSpaceOutliner_Mode; } eSpaceOutliner_Mode;
/* SpaceOops->storeflag */ /* SpaceOops.storeflag */
typedef enum eSpaceOutliner_StoreFlag { typedef enum eSpaceOutliner_StoreFlag {
/* cleanup tree */ /* cleanup tree */
SO_TREESTORE_CLEANUP = (1 << 0), SO_TREESTORE_CLEANUP = (1 << 0),
@@ -301,15 +310,18 @@ typedef enum eSpaceOutliner_StoreFlag {
SO_TREESTORE_REBUILD = (1 << 2), SO_TREESTORE_REBUILD = (1 << 2),
} eSpaceOutliner_StoreFlag; } eSpaceOutliner_StoreFlag;
/* outliner search flags (SpaceOops->search_flags) */ /* outliner search flags (SpaceOops.search_flags) */
typedef enum eSpaceOutliner_Search_Flags { typedef enum eSpaceOutliner_Search_Flags {
SO_FIND_CASE_SENSITIVE = (1 << 0), SO_FIND_CASE_SENSITIVE = (1 << 0),
SO_FIND_COMPLETE = (1 << 1), SO_FIND_COMPLETE = (1 << 1),
SO_SEARCH_RECURSIVE = (1 << 2), SO_SEARCH_RECURSIVE = (1 << 2),
} eSpaceOutliner_Search_Flags; } eSpaceOutliner_Search_Flags;
/** \} */
/* Graph Editor ========================================= */ /* -------------------------------------------------------------------- */
/** \name Graph Editor
* \{ */
/* 'Graph' Editor (formerly known as the IPO Editor) */ /* 'Graph' Editor (formerly known as the IPO Editor) */
typedef struct SpaceIpo { typedef struct SpaceIpo {
@@ -318,17 +330,17 @@ typedef struct SpaceIpo {
int spacetype; int spacetype;
float blockscale DNA_DEPRECATED; float blockscale DNA_DEPRECATED;
short blockhandler[8] DNA_DEPRECATED; short blockhandler[8] DNA_DEPRECATED;
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ 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) */ struct bDopeSheet *ads; /* settings for filtering animation data (NOTE: we use a pointer due to code-linking issues) */
ListBase ghostCurves; /* sampled snapshots of F-Curves used as in-session guides */ ListBase ghostCurves; /* sampled snapshots of F-Curves used as in-session guides */
short mode; /* mode for the Graph editor (eGraphEdit_Mode) */ short mode; /* mode for the Graph editor (eGraphEdit_Mode) */
short autosnap; /* time-transform autosnapping settings for Graph editor (eAnimEdit_AutoSnap in DNA_action_types.h) */ short autosnap; /* time-transform autosnapping settings for Graph editor (eAnimEdit_AutoSnap in DNA_action_types.h) */
int flag; /* settings for Graph editor (eGraphEdit_Flag) */ int flag; /* settings for Graph editor (eGraphEdit_Flag) */
float cursorTime; /* time value for cursor (when in drivers mode; animation uses current frame) */ float cursorTime; /* time value for cursor (when in drivers mode; animation uses current frame) */
float cursorVal; /* cursor value (y-value, x-value is current frame) */ float cursorVal; /* cursor value (y-value, x-value is current frame) */
int around; /* pivot point for transforms */ int around; /* pivot point for transforms */
@@ -336,11 +348,11 @@ typedef struct SpaceIpo {
} SpaceIpo; } SpaceIpo;
/* SpaceIpo->flag (Graph Editor Settings) */ /* SpaceIpo.flag (Graph Editor Settings) */
typedef enum eGraphEdit_Flag { typedef enum eGraphEdit_Flag {
/* OLD DEPRECEATED SETTING */ /* OLD DEPRECEATED SETTING */
/* SIPO_LOCK_VIEW = (1 << 0), */ /* SIPO_LOCK_VIEW = (1 << 0), */
/* don't merge keyframes on the same frame after a transform */ /* don't merge keyframes on the same frame after a transform */
SIPO_NOTRANSKEYCULL = (1 << 1), SIPO_NOTRANSKEYCULL = (1 << 1),
/* don't show any keyframe handles at all */ /* don't show any keyframe handles at all */
@@ -373,7 +385,7 @@ typedef enum eGraphEdit_Flag {
SIPO_NORMALIZE_FREEZE = (1 << 15), SIPO_NORMALIZE_FREEZE = (1 << 15),
} eGraphEdit_Flag; } eGraphEdit_Flag;
/* SpaceIpo->mode (Graph Editor Mode) */ /* SpaceIpo.mode (Graph Editor Mode) */
typedef enum eGraphEdit_Mode { typedef enum eGraphEdit_Mode {
/* all animation curves (from all over Blender) */ /* all animation curves (from all over Blender) */
SIPO_MODE_ANIMATION = 0, SIPO_MODE_ANIMATION = 0,
@@ -381,8 +393,11 @@ typedef enum eGraphEdit_Mode {
SIPO_MODE_DRIVERS = 1, SIPO_MODE_DRIVERS = 1,
} eGraphEdit_Mode; } eGraphEdit_Mode;
/** \} */
/* NLA Editor ============================================= */ /* -------------------------------------------------------------------- */
/** \name NLA Editor
* \{ */
/* NLA Editor */ /* NLA Editor */
typedef struct SpaceNla { typedef struct SpaceNla {
@@ -395,12 +410,12 @@ typedef struct SpaceNla {
short autosnap; /* this uses the same settings as autosnap for Action Editor */ short autosnap; /* this uses the same settings as autosnap for Action Editor */
short flag; short flag;
int pad; int pad;
struct bDopeSheet *ads; struct bDopeSheet *ads;
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
} SpaceNla; } SpaceNla;
/* nla->flag */ /* SpaceNla.flag */
typedef enum eSpaceNla_Flag { typedef enum eSpaceNla_Flag {
/* flags (1<<0), (1<<1), and (1<<3) are deprecated flags from old verisons */ /* flags (1<<0), (1<<1), and (1<<3) are deprecated flags from old verisons */
@@ -416,8 +431,11 @@ typedef enum eSpaceNla_Flag {
SNLA_NOLOCALMARKERS = (1 << 7), SNLA_NOLOCALMARKERS = (1 << 7),
} eSpaceNla_Flag; } eSpaceNla_Flag;
/** \} */
/* Timeline =============================================== */ /* -------------------------------------------------------------------- */
/** \name Timeline
* \{ */
/* Pointcache drawing data */ /* Pointcache drawing data */
# /* Only store the data array in the cache to avoid constant reallocation. */ # /* Only store the data array in the cache to avoid constant reallocation. */
@@ -433,7 +451,7 @@ typedef struct SpaceTime {
ListBase regionbase; /* storage of regions for inactive spaces */ ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype; int spacetype;
float blockscale DNA_DEPRECATED; float blockscale DNA_DEPRECATED;
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
ListBase caches; ListBase caches;
@@ -443,7 +461,7 @@ typedef struct SpaceTime {
} SpaceTime; } SpaceTime;
/* time->flag */ /* SpaceTime.flag */
typedef enum eTimeline_Flag { typedef enum eTimeline_Flag {
/* show timing in frames instead of in seconds */ /* show timing in frames instead of in seconds */
TIME_DRAWFRAMES = (1 << 0), TIME_DRAWFRAMES = (1 << 0),
@@ -453,7 +471,7 @@ typedef enum eTimeline_Flag {
TIME_ONLYACTSEL = (1 << 2), TIME_ONLYACTSEL = (1 << 2),
} eTimeline_Flag; } eTimeline_Flag;
/* time->redraws (now screen->redraws_flag) */ /* SpaceTime.redraws (now bScreen.redraws_flag) */
typedef enum eScreen_Redraws_Flag { typedef enum eScreen_Redraws_Flag {
TIME_REGION = (1 << 0), TIME_REGION = (1 << 0),
TIME_ALL_3D_WIN = (1 << 1), TIME_ALL_3D_WIN = (1 << 1),
@@ -469,7 +487,7 @@ typedef enum eScreen_Redraws_Flag {
TIME_FOLLOW = (1 << 15), TIME_FOLLOW = (1 << 15),
} eScreen_Redraws_Flag; } eScreen_Redraws_Flag;
/* time->cache */ /* SpaceTime.cache */
typedef enum eTimeline_Cache_Flag { typedef enum eTimeline_Cache_Flag {
TIME_CACHE_DISPLAY = (1 << 0), TIME_CACHE_DISPLAY = (1 << 0),
TIME_CACHE_SOFTBODY = (1 << 1), TIME_CACHE_SOFTBODY = (1 << 1),
@@ -480,8 +498,11 @@ typedef enum eTimeline_Cache_Flag {
TIME_CACHE_RIGIDBODY = (1 << 6), TIME_CACHE_RIGIDBODY = (1 << 6),
} eTimeline_Cache_Flag; } eTimeline_Cache_Flag;
/** \} */
/* Sequence Editor ======================================= */ /* -------------------------------------------------------------------- */
/** \name Sequence Editor
* \{ */
/* Sequencer */ /* Sequencer */
typedef struct SpaceSeq { typedef struct SpaceSeq {
@@ -493,7 +514,7 @@ typedef struct SpaceSeq {
short blockhandler[8] DNA_DEPRECATED; short blockhandler[8] DNA_DEPRECATED;
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
float xof DNA_DEPRECATED, yof DNA_DEPRECATED; /* deprecated: offset for drawing the image preview */ float xof DNA_DEPRECATED, yof DNA_DEPRECATED; /* deprecated: offset for drawing the image preview */
short mainb; /* weird name for the sequencer subtype (seq, image, luma... etc) */ short mainb; /* weird name for the sequencer subtype (seq, image, luma... etc) */
short render_size; /* eSpaceSeq_Proxy_RenderSize */ short render_size; /* eSpaceSeq_Proxy_RenderSize */
@@ -518,7 +539,7 @@ typedef struct SpaceSeq {
} SpaceSeq; } SpaceSeq;
/* sseq->mainb */ /* SpaceSeq.mainb */
typedef enum eSpaceSeq_RegionType { typedef enum eSpaceSeq_RegionType {
SEQ_DRAW_SEQUENCE = 0, SEQ_DRAW_SEQUENCE = 0,
SEQ_DRAW_IMG_IMBUF = 1, SEQ_DRAW_IMG_IMBUF = 1,
@@ -527,14 +548,14 @@ typedef enum eSpaceSeq_RegionType {
SEQ_DRAW_IMG_HISTOGRAM = 4, SEQ_DRAW_IMG_HISTOGRAM = 4,
} eSpaceSeq_RegionType; } eSpaceSeq_RegionType;
/* sseq->draw_flag */ /* SpaceSeq.draw_flag */
typedef enum eSpaceSeq_DrawFlag { typedef enum eSpaceSeq_DrawFlag {
SEQ_DRAW_BACKDROP = (1 << 0), SEQ_DRAW_BACKDROP = (1 << 0),
SEQ_DRAW_OFFSET_EXT = (1 << 1), SEQ_DRAW_OFFSET_EXT = (1 << 1),
} eSpaceSeq_DrawFlag; } eSpaceSeq_DrawFlag;
/* sseq->flag */ /* SpaceSeq.flag */
typedef enum eSpaceSeq_Flag { typedef enum eSpaceSeq_Flag {
SEQ_DRAWFRAMES = (1 << 0), SEQ_DRAWFRAMES = (1 << 0),
SEQ_MARKER_TRANS = (1 << 1), SEQ_MARKER_TRANS = (1 << 1),
@@ -549,14 +570,14 @@ typedef enum eSpaceSeq_Flag {
SEQ_SHOW_METADATA = (1 << 10), SEQ_SHOW_METADATA = (1 << 10),
} eSpaceSeq_Flag; } eSpaceSeq_Flag;
/* sseq->view */ /* SpaceSeq.view */
typedef enum eSpaceSeq_Displays { typedef enum eSpaceSeq_Displays {
SEQ_VIEW_SEQUENCE = 1, SEQ_VIEW_SEQUENCE = 1,
SEQ_VIEW_PREVIEW = 2, SEQ_VIEW_PREVIEW = 2,
SEQ_VIEW_SEQUENCE_PREVIEW = 3, SEQ_VIEW_SEQUENCE_PREVIEW = 3,
} eSpaceSeq_Dispays; } eSpaceSeq_Dispays;
/* sseq->render_size */ /* SpaceSeq.render_size */
typedef enum eSpaceSeq_Proxy_RenderSize { typedef enum eSpaceSeq_Proxy_RenderSize {
SEQ_PROXY_RENDER_SIZE_NONE = -1, SEQ_PROXY_RENDER_SIZE_NONE = -1,
SEQ_PROXY_RENDER_SIZE_SCENE = 0, SEQ_PROXY_RENDER_SIZE_SCENE = 0,
@@ -577,14 +598,18 @@ typedef struct MaskSpaceInfo {
char pad3[5]; char pad3[5];
} MaskSpaceInfo; } MaskSpaceInfo;
/* sseq->mainb */ /* SpaceSeq.mainb */
typedef enum eSpaceSeq_OverlayType { typedef enum eSpaceSeq_OverlayType {
SEQ_DRAW_OVERLAY_RECT = 0, SEQ_DRAW_OVERLAY_RECT = 0,
SEQ_DRAW_OVERLAY_REFERENCE = 1, SEQ_DRAW_OVERLAY_REFERENCE = 1,
SEQ_DRAW_OVERLAY_CURRENT = 2 SEQ_DRAW_OVERLAY_CURRENT = 2
} eSpaceSeq_OverlayType; } eSpaceSeq_OverlayType;
/* File Selector ========================================== */ /** \} */
/* -------------------------------------------------------------------- */
/** \name File Selector
* \{ */
/* Config and Input for File Selector */ /* Config and Input for File Selector */
typedef struct FileSelectParams { typedef struct FileSelectParams {
@@ -629,28 +654,28 @@ typedef struct SpaceFile {
SpaceLink *next, *prev; SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */ ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype; int spacetype;
int scroll_offset; int scroll_offset;
struct FileSelectParams *params; /* config and input for file select */ struct FileSelectParams *params; /* config and input for file select */
struct FileList *files; /* holds the list of files to show */ struct FileList *files; /* holds the list of files to show */
ListBase *folders_prev; /* holds the list of previous directories to show */ ListBase *folders_prev; /* holds the list of previous directories to show */
ListBase *folders_next; /* holds the list of next directories (pushed from previous) to show */ ListBase *folders_next; /* holds the list of next directories (pushed from previous) to show */
/* operator that is invoking fileselect /* operator that is invoking fileselect
* op->exec() will be called on the 'Load' button. * op->exec() will be called on the 'Load' button.
* if operator provides op->cancel(), then this will be invoked * if operator provides op->cancel(), then this will be invoked
* on the cancel button. * on the cancel button.
*/ */
struct wmOperator *op; struct wmOperator *op;
struct wmTimer *smoothscroll_timer; struct wmTimer *smoothscroll_timer;
struct wmTimer *previews_timer; struct wmTimer *previews_timer;
struct FileLayout *layout; struct FileLayout *layout;
short recentnr, bookmarknr; short recentnr, bookmarknr;
short systemnr, system_bookmarknr; short systemnr, system_bookmarknr;
} SpaceFile; } SpaceFile;
@@ -870,7 +895,11 @@ enum {
FILE_ENTRY_INVALID_PREVIEW = 1 << 0, /* The preview for this entry could not be generated. */ FILE_ENTRY_INVALID_PREVIEW = 1 << 0, /* The preview for this entry could not be generated. */
}; };
/* Image/UV Editor ======================================== */ /** \} */
/* -------------------------------------------------------------------- */
/** \name Image/UV Editor
* \{ */
/* Image/UV Editor */ /* Image/UV Editor */
typedef struct SpaceImage { typedef struct SpaceImage {
@@ -911,7 +940,7 @@ typedef struct SpaceImage {
} SpaceImage; } SpaceImage;
/* SpaceImage->dt_uv */ /* SpaceImage.dt_uv */
typedef enum eSpaceImage_UVDT { typedef enum eSpaceImage_UVDT {
SI_UVDT_OUTLINE = 0, SI_UVDT_OUTLINE = 0,
SI_UVDT_DASH = 1, SI_UVDT_DASH = 1,
@@ -919,20 +948,20 @@ typedef enum eSpaceImage_UVDT {
SI_UVDT_WHITE = 3, SI_UVDT_WHITE = 3,
} eSpaceImage_UVDT; } eSpaceImage_UVDT;
/* SpaceImage->dt_uvstretch */ /* SpaceImage.dt_uvstretch */
typedef enum eSpaceImage_UVDT_Stretch { typedef enum eSpaceImage_UVDT_Stretch {
SI_UVDT_STRETCH_ANGLE = 0, SI_UVDT_STRETCH_ANGLE = 0,
SI_UVDT_STRETCH_AREA = 1, SI_UVDT_STRETCH_AREA = 1,
} eSpaceImage_UVDT_Stretch; } eSpaceImage_UVDT_Stretch;
/* SpaceImage->mode */ /* SpaceImage.mode */
typedef enum eSpaceImage_Mode { typedef enum eSpaceImage_Mode {
SI_MODE_VIEW = 0, SI_MODE_VIEW = 0,
SI_MODE_PAINT = 1, SI_MODE_PAINT = 1,
SI_MODE_MASK = 2 /* note: mesh edit mode overrides mask */ SI_MODE_MASK = 2 /* note: mesh edit mode overrides mask */
} eSpaceImage_Mode; } eSpaceImage_Mode;
/* SpaceImage->sticky /* SpaceImage.sticky
* Note DISABLE should be 0, however would also need to re-arrange icon order, * Note DISABLE should be 0, however would also need to re-arrange icon order,
* also, sticky loc is the default mode so this means we don't need to 'do_versions' */ * also, sticky loc is the default mode so this means we don't need to 'do_versions' */
typedef enum eSpaceImage_Sticky { typedef enum eSpaceImage_Sticky {
@@ -941,7 +970,7 @@ typedef enum eSpaceImage_Sticky {
SI_STICKY_VERTEX = 2, SI_STICKY_VERTEX = 2,
} eSpaceImage_Sticky; } eSpaceImage_Sticky;
/* SpaceImage->flag */ /* SpaceImage.flag */
typedef enum eSpaceImage_Flag { typedef enum eSpaceImage_Flag {
/* SI_BE_SQUARE = (1 << 0), */ /* deprecated */ /* SI_BE_SQUARE = (1 << 0), */ /* deprecated */
SI_EDITTILE = (1 << 1), /* XXX - not used but should be? */ SI_EDITTILE = (1 << 1), /* XXX - not used but should be? */
@@ -958,14 +987,14 @@ typedef enum eSpaceImage_Flag {
SI_USE_ALPHA = (1 << 12), SI_USE_ALPHA = (1 << 12),
SI_SHOW_ALPHA = (1 << 13), SI_SHOW_ALPHA = (1 << 13),
SI_SHOW_ZBUF = (1 << 14), SI_SHOW_ZBUF = (1 << 14),
/* next two for render window display */ /* next two for render window display */
SI_PREVSPACE = (1 << 15), SI_PREVSPACE = (1 << 15),
SI_FULLWINDOW = (1 << 16), SI_FULLWINDOW = (1 << 16),
/* SI_DEPRECATED4 = (1 << 17), */ /* deprecated */ /* SI_DEPRECATED4 = (1 << 17), */ /* deprecated */
/* SI_DEPRECATED5 = (1 << 18), */ /* deprecated */ /* SI_DEPRECATED5 = (1 << 18), */ /* deprecated */
/* this means that the image is drawn until it reaches the view edge, /* this means that the image is drawn until it reaches the view edge,
* in the image view, it's unrelated to the 'tile' mode for texface * in the image view, it's unrelated to the 'tile' mode for texface
*/ */
@@ -985,13 +1014,17 @@ typedef enum eSpaceImage_Flag {
SI_SHOW_B = (1 << 29), SI_SHOW_B = (1 << 29),
} eSpaceImage_Flag; } eSpaceImage_Flag;
/* SpaceImage->other_uv_filter */ /* SpaceImage.other_uv_filter */
typedef enum eSpaceImage_OtherUVFilter { typedef enum eSpaceImage_OtherUVFilter {
SI_FILTER_SAME_IMAGE = 0, SI_FILTER_SAME_IMAGE = 0,
SI_FILTER_ALL = 1, SI_FILTER_ALL = 1,
} eSpaceImage_OtherUVFilter; } eSpaceImage_OtherUVFilter;
/* Text Editor ============================================ */ /** \} */
/* -------------------------------------------------------------------- */
/** \name Text Editor
* \{ */
/* Text Editor */ /* Text Editor */
typedef struct SpaceText { typedef struct SpaceText {
@@ -1040,20 +1073,24 @@ typedef enum eSpaceText_Flags {
/* scrollable */ /* scrollable */
ST_SCROLL_SELECT = (1 << 0), ST_SCROLL_SELECT = (1 << 0),
/* clear namespace after script execution (BPY_main.c) */ /* clear namespace after script execution (BPY_main.c) */
ST_CLEAR_NAMESPACE = (1 << 4), ST_CLEAR_NAMESPACE = (1 << 4),
ST_FIND_WRAP = (1 << 5), ST_FIND_WRAP = (1 << 5),
ST_FIND_ALL = (1 << 6), ST_FIND_ALL = (1 << 6),
ST_SHOW_MARGIN = (1 << 7), ST_SHOW_MARGIN = (1 << 7),
ST_MATCH_CASE = (1 << 8), ST_MATCH_CASE = (1 << 8),
ST_FIND_ACTIVATE = (1 << 9), ST_FIND_ACTIVATE = (1 << 9),
} eSpaceText_Flags; } eSpaceText_Flags;
/* stext->findstr/replacestr */ /* SpaceText.findstr/replacestr */
#define ST_MAX_FIND_STR 256 #define ST_MAX_FIND_STR 256
/* Script View (Obsolete) ================================== */ /** \} */
/* -------------------------------------------------------------------- */
/** \name Script View (Obsolete)
* \{ */
/* Script Runtime Data - Obsolete (pre 2.5) */ /* Script Runtime Data - Obsolete (pre 2.5) */
typedef struct Script { typedef struct Script {
@@ -1082,22 +1119,24 @@ typedef struct SpaceScript {
short flags, menunr; short flags, menunr;
int pad1; int pad1;
void *but_refs; void *but_refs;
} SpaceScript; } SpaceScript;
/* Nodes Editor =========================================== */ /** \} */
/* Node Editor */ /* -------------------------------------------------------------------- */
/** \name Nodes Editor
* \{ */
typedef struct bNodeTreePath { typedef struct bNodeTreePath {
struct bNodeTreePath *next, *prev; struct bNodeTreePath *next, *prev;
struct bNodeTree *nodetree; struct bNodeTree *nodetree;
bNodeInstanceKey parent_key; /* base key for nodes in this tree instance */ bNodeInstanceKey parent_key; /* base key for nodes in this tree instance */
int pad; int pad;
float view_center[2]; /* v2d center point, so node trees can have different offsets in editors */ float view_center[2]; /* v2d center point, so node trees can have different offsets in editors */
char node_name[64]; /* MAX_NAME */ char node_name[64]; /* MAX_NAME */
} bNodeTreePath; } bNodeTreePath;
@@ -1107,31 +1146,31 @@ typedef struct SpaceNode {
int spacetype; int spacetype;
float blockscale DNA_DEPRECATED; float blockscale DNA_DEPRECATED;
short blockhandler[8] DNA_DEPRECATED; short blockhandler[8] DNA_DEPRECATED;
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
struct ID *id, *from; /* context, no need to save in file? well... pinning... */ struct ID *id, *from; /* context, no need to save in file? well... pinning... */
short flag, pad1; /* menunr: browse id block in header */ short flag, pad1; /* menunr: browse id block in header */
float aspect, pad2; /* internal state variables */ float aspect, pad2; /* internal state variables */
float xof, yof; /* offset for drawing the backdrop */ float xof, yof; /* offset for drawing the backdrop */
float zoom; /* zoom for backdrop */ float zoom; /* zoom for backdrop */
float cursor[2]; /* mouse pos for drawing socketless link and adding nodes */ float cursor[2]; /* mouse pos for drawing socketless link and adding nodes */
/* XXX nodetree pointer info is all in the path stack now, /* XXX nodetree pointer info is all in the path stack now,
* remove later on and use bNodeTreePath instead. For now these variables are set when pushing/popping * remove later on and use bNodeTreePath instead. For now these variables are set when pushing/popping
* from path stack, to avoid having to update all the functions and operators. Can be done when * from path stack, to avoid having to update all the functions and operators. Can be done when
* design is accepted and everything is properly tested. * design is accepted and everything is properly tested.
*/ */
ListBase treepath; ListBase treepath;
struct bNodeTree *nodetree, *edittree; struct bNodeTree *nodetree, *edittree;
/* tree type for the current node tree */ /* tree type for the current node tree */
char tree_idname[64]; char tree_idname[64];
int treetype DNA_DEPRECATED; /* treetype: as same nodetree->type */ int treetype DNA_DEPRECATED; /* treetype: as same nodetree->type */
int pad3; int pad3;
short texfrom; /* texfrom object, world or brush */ short texfrom; /* texfrom object, world or brush */
short shaderfrom; /* shader from object or world */ short shaderfrom; /* shader from object or world */
short recalc; /* currently on 0/1, for auto compo */ short recalc; /* currently on 0/1, for auto compo */
@@ -1146,7 +1185,7 @@ typedef struct SpaceNode {
struct bGPdata *gpd; /* grease-pencil data */ struct bGPdata *gpd; /* grease-pencil data */
} SpaceNode; } SpaceNode;
/* snode->flag */ /* SpaceNode.flag */
typedef enum eSpaceNode_Flag { typedef enum eSpaceNode_Flag {
SNODE_BACKDRAW = (1 << 1), SNODE_BACKDRAW = (1 << 1),
SNODE_SHOW_GPENCIL = (1 << 2), SNODE_SHOW_GPENCIL = (1 << 2),
@@ -1157,13 +1196,13 @@ typedef enum eSpaceNode_Flag {
SNODE_SHOW_B = (1 << 9), SNODE_SHOW_B = (1 << 9),
SNODE_AUTO_RENDER = (1 << 5), SNODE_AUTO_RENDER = (1 << 5),
// SNODE_SHOW_HIGHLIGHT = (1 << 6), DNA_DEPRECATED // SNODE_SHOW_HIGHLIGHT = (1 << 6), DNA_DEPRECATED
// SNODE_USE_HIDDEN_PREVIEW = (1 << 10), DNA_DEPRECATED December2013 // SNODE_USE_HIDDEN_PREVIEW = (1 << 10), DNA_DEPRECATED December2013
SNODE_NEW_SHADERS = (1 << 11), SNODE_NEW_SHADERS = (1 << 11),
SNODE_PIN = (1 << 12), SNODE_PIN = (1 << 12),
SNODE_SKIP_INSOFFSET = (1 << 13), /* automatically offset following nodes in a chain on insertion */ SNODE_SKIP_INSOFFSET = (1 << 13), /* automatically offset following nodes in a chain on insertion */
} eSpaceNode_Flag; } eSpaceNode_Flag;
/* snode->texfrom */ /* SpaceNode.texfrom */
typedef enum eSpaceNode_TexFrom { typedef enum eSpaceNode_TexFrom {
SNODE_TEX_OBJECT = 0, SNODE_TEX_OBJECT = 0,
SNODE_TEX_WORLD = 1, SNODE_TEX_WORLD = 1,
@@ -1171,20 +1210,24 @@ typedef enum eSpaceNode_TexFrom {
SNODE_TEX_LINESTYLE = 3, SNODE_TEX_LINESTYLE = 3,
} eSpaceNode_TexFrom; } eSpaceNode_TexFrom;
/* snode->shaderfrom */ /* SpaceNode.shaderfrom */
typedef enum eSpaceNode_ShaderFrom { typedef enum eSpaceNode_ShaderFrom {
SNODE_SHADER_OBJECT = 0, SNODE_SHADER_OBJECT = 0,
SNODE_SHADER_WORLD = 1, SNODE_SHADER_WORLD = 1,
SNODE_SHADER_LINESTYLE = 2, SNODE_SHADER_LINESTYLE = 2,
} eSpaceNode_ShaderFrom; } eSpaceNode_ShaderFrom;
/* snode->insert_ofs_dir */ /* SpaceNode.insert_ofs_dir */
enum { enum {
SNODE_INSERTOFS_DIR_RIGHT = 0, SNODE_INSERTOFS_DIR_RIGHT = 0,
SNODE_INSERTOFS_DIR_LEFT = 1, SNODE_INSERTOFS_DIR_LEFT = 1,
}; };
/* Game Logic Editor ===================================== */ /** \} */
/* -------------------------------------------------------------------- */
/** \name Game Logic Editor
* \{ */
/* Logic Editor */ /* Logic Editor */
typedef struct SpaceLogic { typedef struct SpaceLogic {
@@ -1192,26 +1235,30 @@ typedef struct SpaceLogic {
ListBase regionbase; /* storage of regions for inactive spaces */ ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype; int spacetype;
float blockscale DNA_DEPRECATED; float blockscale DNA_DEPRECATED;
short blockhandler[8] DNA_DEPRECATED; short blockhandler[8] DNA_DEPRECATED;
short flag, scaflag; short flag, scaflag;
int pad; int pad;
struct bGPdata *gpd; /* grease-pencil data */ struct bGPdata *gpd; /* grease-pencil data */
} SpaceLogic; } SpaceLogic;
/* Console ================================================ */ /** \} */
/* -------------------------------------------------------------------- */
/** \name Console
* \{ */
/* Console content */ /* Console content */
typedef struct ConsoleLine { typedef struct ConsoleLine {
struct ConsoleLine *next, *prev; struct ConsoleLine *next, *prev;
/* keep these 3 vars so as to share free, realloc funcs */ /* keep these 3 vars so as to share free, realloc funcs */
int len_alloc; /* allocated length */ int len_alloc; /* allocated length */
int len; /* real len - strlen() */ int len; /* real len - strlen() */
char *line; char *line;
int cursor; int cursor;
int type; /* only for use when in the 'scrollback' listbase */ int type; /* only for use when in the 'scrollback' listbase */
} ConsoleLine; } ConsoleLine;
@@ -1232,7 +1279,7 @@ typedef struct SpaceConsole {
int spacetype; int spacetype;
float blockscale DNA_DEPRECATED; // XXX are these needed? float blockscale DNA_DEPRECATED; // XXX are these needed?
short blockhandler[8] DNA_DEPRECATED; // XXX are these needed? short blockhandler[8] DNA_DEPRECATED; // XXX are these needed?
/* space vars */ /* space vars */
int lheight, pad; int lheight, pad;
@@ -1240,26 +1287,32 @@ typedef struct SpaceConsole {
ListBase history; /* ConsoleLine; command history, current edited line is the first */ ListBase history; /* ConsoleLine; command history, current edited line is the first */
char prompt[256]; char prompt[256];
char language[32]; /* multiple consoles are possible, not just python */ char language[32]; /* multiple consoles are possible, not just python */
int sel_start; int sel_start;
int sel_end; int sel_end;
} SpaceConsole; } SpaceConsole;
/** \} */
/* User Preferences ======================================= */ /* -------------------------------------------------------------------- */
/** \name User Preferences
* \{ */
/* User Preferences View */
typedef struct SpaceUserPref { typedef struct SpaceUserPref {
SpaceLink *next, *prev; SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */ ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype; int spacetype;
char pad[3]; char pad[3];
char filter_type; char filter_type;
char filter[64]; /* search term for filtering in the UI */ char filter[64]; /* search term for filtering in the UI */
} SpaceUserPref; } SpaceUserPref;
/* Motion Tracking ======================================== */ /** \} */
/* -------------------------------------------------------------------- */
/** \name Motion Tracking
* \{ */
/* Clip Editor */ /* Clip Editor */
typedef struct SpaceClip { typedef struct SpaceClip {
@@ -1300,7 +1353,7 @@ typedef struct SpaceClip {
MaskSpaceInfo mask_info; MaskSpaceInfo mask_info;
} SpaceClip; } SpaceClip;
/* SpaceClip->flag */ /* SpaceClip.flag */
typedef enum eSpaceClip_Flag { typedef enum eSpaceClip_Flag {
SC_SHOW_MARKER_PATTERN = (1 << 0), SC_SHOW_MARKER_PATTERN = (1 << 0),
SC_SHOW_MARKER_SEARCH = (1 << 1), SC_SHOW_MARKER_SEARCH = (1 << 1),
@@ -1327,7 +1380,7 @@ typedef enum eSpaceClip_Flag {
SC_SHOW_METADATA = (1 << 22), SC_SHOW_METADATA = (1 << 22),
} eSpaceClip_Flag; } eSpaceClip_Flag;
/* SpaceClip->mode */ /* SpaceClip.mode */
typedef enum eSpaceClip_Mode { typedef enum eSpaceClip_Mode {
SC_MODE_TRACKING = 0, SC_MODE_TRACKING = 0,
/*SC_MODE_RECONSTRUCTION = 1,*/ /* DEPRECATED */ /*SC_MODE_RECONSTRUCTION = 1,*/ /* DEPRECATED */
@@ -1335,14 +1388,14 @@ typedef enum eSpaceClip_Mode {
SC_MODE_MASKEDIT = 3, SC_MODE_MASKEDIT = 3,
} eSpaceClip_Mode; } eSpaceClip_Mode;
/* SpaceClip->view */ /* SpaceClip.view */
typedef enum eSpaceClip_View { typedef enum eSpaceClip_View {
SC_VIEW_CLIP = 0, SC_VIEW_CLIP = 0,
SC_VIEW_GRAPH = 1, SC_VIEW_GRAPH = 1,
SC_VIEW_DOPESHEET = 2, SC_VIEW_DOPESHEET = 2,
} eSpaceClip_View; } eSpaceClip_View;
/* SpaceClip->gpencil_src */ /* SpaceClip.gpencil_src */
typedef enum eSpaceClip_GPencil_Source { typedef enum eSpaceClip_GPencil_Source {
SC_GPENCIL_SRC_CLIP = 0, SC_GPENCIL_SRC_CLIP = 0,
SC_GPENCIL_SRC_TRACK = 1, SC_GPENCIL_SRC_TRACK = 1,