diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-05-27 02:22:45 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-05-27 02:22:45 +0400 |
commit | b6a9a953bc6aa7d81921a796e8ce1123fdedefc7 (patch) | |
tree | 44c587b017c6915bb750560fb56a0a7782358c07 /source/blender/makesdna | |
parent | a5152b7ca0d6d7f340b1955c0e8a15ba23fda336 (diff) | |
parent | eda0f3b1863e2e41b9913e16af82407b63e145bf (diff) |
Merged changes in the trunk up to revision 47056.
Conflicts resolved:
source/blender/bmesh/bmesh_class.h
source/blender/bmesh/intern/bmesh_construct.c
source/blender/editors/interface/resources.c
source/blender/render/intern/source/convertblender.c
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_action_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_customdata_types.h | 10 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_meshdata_types.h | 21 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_modifier_types.h | 38 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 19 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_object_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 9 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_smoke_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 1110 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_view3d_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesdna/intern/dna_genfile.c | 4 | ||||
-rw-r--r-- | source/blender/makesdna/intern/makesdna.c | 4 |
13 files changed, 721 insertions, 505 deletions
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index 889f9cf47eb..a997a655899 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -613,7 +613,7 @@ typedef enum eSAction_Flag { /* show pose-markers (local to action) in Action Editor mode */ SACTION_POSEMARKERS_SHOW = (1<<6), /* don't draw action channels using group colors (where applicable) */ - SACTION_NODRAWGCOLORS = (1<<7), // XXX depreceated... irrelevant for current groups implementation + SACTION_NODRAWGCOLORS = (1<<7), /* don't draw current frame number beside frame indicator */ SACTION_NODRAWCFRANUM = (1<<8), /* temporary flag to force channel selections to be synced with main */ diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index 5792953fe49..377af042922 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -63,12 +63,11 @@ typedef struct CustomDataExternal { * layers, each with a data type (e.g. MTFace, MDeformVert, etc.). */ typedef struct CustomData { CustomDataLayer *layers; /* CustomDataLayers, ordered by type */ - int typemap[36]; /* runtime only! - maps types to indices of first layer of that type, + int typemap[37]; /* runtime only! - maps types to indices of first layer of that type, * MUST be >= CD_NUMTYPES, but we cant use a define here. * Correct size is ensured in CustomData_update_typemap assert() */ - int totlayer, maxlayer; /* number of layers, size of layers array */ - int totsize, pad2; /* in editmode, total size of all data layers */ + int totsize; /* in editmode, total size of all data layers */ void *pool; /* Bmesh: Memory pool for allocation of blocks */ CustomDataExternal *external; /* external file storing customdata layers */ } CustomData; @@ -114,8 +113,8 @@ typedef struct CustomData { #define CD_PAINT_MASK 34 #define CD_GRID_PAINT_MASK 35 - -#define CD_NUMTYPES 36 +#define CD_MVERT_SKIN 36 +#define CD_NUMTYPES 37 /* Bits for CustomDataMask */ #define CD_MASK_MVERT (1 << CD_MVERT) @@ -156,6 +155,7 @@ typedef struct CustomData { #define CD_MASK_PAINT_MASK (1LL << CD_PAINT_MASK) #define CD_MASK_GRID_PAINT_MASK (1LL << CD_GRID_PAINT_MASK) +#define CD_MASK_MVERT_SKIN (1LL << CD_MVERT_SKIN) /* CustomData.flag */ diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index 70e9cf04b18..dc8115b556c 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -257,6 +257,27 @@ typedef struct GridPaintMask { int pad; } GridPaintMask; +typedef enum MVertSkinFlag { + /* Marks a vertex as the edge-graph root, used for calculating + rotations for all connected edges (recursively.) Also used to + choose a root when generating an armature. */ + MVERT_SKIN_ROOT = 1, + + /* Marks a branch vertex (vertex with more than two connected + edges) so that it's neighbors are directly hulled together, + rather than the default of generating intermediate frames. */ + MVERT_SKIN_LOOSE = 2 +} MVertSkinFlag; + +typedef struct MVertSkin { + /* Radii of the skin, define how big the generated frames + are. Currently only the first two elements are used. */ + float radius[3]; + + /* MVertSkinFlag */ + int flag; +} MVertSkin; + /* mvert->flag (1=SELECT) */ #define ME_SPHERETEST 2 #define ME_VERT_TMP_TAG 4 diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 971ce613edc..cf8b08549f6 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -77,6 +77,7 @@ typedef enum ModifierType { eModifierType_Ocean, eModifierType_DynamicPaint, eModifierType_Remesh, + eModifierType_Skin, NUM_MODIFIER_TYPES } ModifierType; @@ -727,11 +728,12 @@ typedef struct SolidifyModifierData { short mat_ofs_rim; } SolidifyModifierData; -#define MOD_SOLIDIFY_RIM (1<<0) -#define MOD_SOLIDIFY_EVEN (1<<1) -#define MOD_SOLIDIFY_NORMAL_CALC (1<<2) -#define MOD_SOLIDIFY_VGROUP_INV (1<<3) -#define MOD_SOLIDIFY_RIM_MATERIAL (1<<4) /* deprecated, used in do_versions */ +#define MOD_SOLIDIFY_RIM (1 << 0) +#define MOD_SOLIDIFY_EVEN (1 << 1) +#define MOD_SOLIDIFY_NORMAL_CALC (1 << 2) +#define MOD_SOLIDIFY_VGROUP_INV (1 << 3) +#define MOD_SOLIDIFY_RIM_MATERIAL (1 << 4) /* deprecated, used in do_versions */ +#define MOD_SOLIDIFY_FLIP (1 << 5) typedef struct ScrewModifierData { ModifierData modifier; @@ -1065,4 +1067,30 @@ typedef struct RemeshModifierData { char pad; } RemeshModifierData; +/* Skin modifier */ + +typedef struct SkinModifierData { + ModifierData modifier; + + float branch_smoothing; + + char flag; + + char symmetry_axes; + + char pad[2]; +} SkinModifierData; + +/* SkinModifierData.symmetry_axes */ +enum { + MOD_SKIN_SYMM_X = 1, + MOD_SKIN_SYMM_Y = 2, + MOD_SKIN_SYMM_Z = 4, +}; + +/* SkinModifierData.flag */ +enum { + MOD_SKIN_SMOOTH_SHADING = 1 +}; + #endif diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 4bbd1e20973..b2781675cbe 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -154,11 +154,13 @@ typedef struct bNode { struct bNode *next, *prev, *new_node; char name[64]; /* MAX_NAME */ - short type, flag; + int flag; + short type, pad2; short done, level; /* both for dependency and sorting */ short lasty, menunr; /* lasty: check preview render status, menunr: browse ID blocks */ short stack_index; /* for groupnode, offset in global caller stack */ short nr; /* number of this node in list, used for UI exec events */ + float color[3]; /* custom user-defined color */ ListBase inputs, outputs; struct bNode *parent; /* parent node */ @@ -168,6 +170,7 @@ typedef struct bNode { float locx, locy; /* root offset for drawing */ float width, height; /* node custom width and height */ float miniwidth; /* node width if hidden */ + float offsetx, offsety; /* additional offset from loc */ int update; /* update flags */ @@ -209,6 +212,8 @@ typedef struct bNode { #define NODE_TRANSFORM (1<<13) /* node is active texture */ #define NODE_ACTIVE_TEXTURE (1<<14) + /* use a custom color for the node */ +#define NODE_CUSTOM_COLOR (1<<15) /* node->update */ /* XXX NODE_UPDATE is a generic update flag. More fine-grained updates @@ -345,6 +350,14 @@ typedef struct bNodeSocketValueRGBA { #define CMP_NODE_LENSFLARE_CIRCLE 4 #define CMP_NODE_LENSFLARE_STREAKS 8 +#define CMP_NODE_DILATEERODE_STEP 0 +#define CMP_NODE_DILATEERODE_DISTANCE 1 + +typedef struct NodeFrame { + short flag; + short label_size; +} NodeFrame; + /* this one has been replaced with ImageUser, keep it for do_versions() */ typedef struct NodeImageAnim { int frames, sfra, nr; @@ -604,6 +617,10 @@ typedef struct TexNodeOutput { char name[64]; } TexNodeOutput; +/* frame node flags */ +#define NODE_FRAME_SHRINK 1 /* keep the bounding box minimal */ +#define NODE_FRAME_RESIZEABLE 2 /* test flag, if frame can be resized by user */ + /* comp channel matte */ #define CMP_NODE_CHANNEL_MATTE_CS_RGB 1 #define CMP_NODE_CHANNEL_MATTE_CS_HSV 2 diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 1e428bb96e0..1ea50ec9c1a 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -142,7 +142,7 @@ typedef struct Object { /* rot en drot have to be together! (transform('r' en 's')) */ float loc[3], dloc[3], orig[3]; - float size[3]; /* scale infact */ + float size[3]; /* scale in fact */ float dsize[3] DNA_DEPRECATED ; /* DEPRECATED, 2.60 and older only */ float dscale[3]; /* ack!, changing */ float rot[3], drot[3]; /* euler rotation */ diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 2a2e312c43b..f57e0a0f0da 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -711,6 +711,8 @@ typedef struct TimeMarker { /* *************************************************************** */ /* Paint Mode/Tool Data */ +#define PAINT_MAX_INPUT_SAMPLES 64 + /* Paint Tool Base */ typedef struct Paint { struct Brush *brush; @@ -719,7 +721,14 @@ typedef struct Paint { void *paint_cursor; unsigned char paint_cursor_col[4]; + /* enum PaintFlags */ int flags; + + /* Paint stroke can use up to PAINT_MAX_INPUT_SAMPLES inputs to + * smooth the stroke */ + int num_input_samples; + + int pad; } Paint; /* ------------------------------------------- */ diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h index 50e48a13835..cceb7333478 100644 --- a/source/blender/makesdna/DNA_smoke_types.h +++ b/source/blender/makesdna/DNA_smoke_types.h @@ -80,11 +80,11 @@ typedef struct SmokeDomainSettings { float tempAmb; /* ambient temperature */ float alpha; float beta; + float scale; /* largest domain size */ int res[3]; /* domain resolution */ int amplify; /* wavelet amplification */ int maxres; /* longest axis on the BB gets this resolution assigned */ int flags; /* show up-res or low res, etc */ - int pad; int viewsettings; short noise; /* noise type: wave, curl, anisotropic */ short diss_percent; diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 0bc91907d6e..8f3062655b7 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -68,12 +68,14 @@ struct wmTimer; 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,27 +84,209 @@ typedef struct SpaceLink { 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 */ -enum { - INFO_RPT_DEBUG = 1<<0, - INFO_RPT_INFO = 1<<1, - INFO_RPT_OP = 1<<2, - INFO_RPT_WARN = 1<<3, - INFO_RPT_ERR = 1<<4, -}; +typedef enum eSpaceInfo_RptMask { + INFO_RPT_DEBUG = (1 << 0), + INFO_RPT_INFO = (1 << 1), + INFO_RPT_OP = (1 << 2), + INFO_RPT_WARN = (1 << 3), + 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 { @@ -110,8 +294,8 @@ typedef struct SpaceIpo { 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) */ @@ -120,35 +304,153 @@ typedef struct SpaceIpo { 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) */ - int flag; /* settings for Graph editor */ + int flag; /* settings for Graph editor (eGraphEdit_Flag) */ float cursorVal; /* cursor value (y-value, x-value is current frame) */ 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 */ + + ListBase caches; + + int cache_display; + int flag; +} SpaceTime; - void *texuser; -} SpaceButs; +/* 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), + /* only keyframes from active/selected channels get shown */ + TIME_ONLYACTSEL = (1 << 2), +} eTimeline_Flag; + +/* time->redraws (now screen->redraws_flag) */ +typedef enum eScreen_Redraws_Flag { + TIME_REGION = (1 << 0), + TIME_ALL_3D_WIN = (1 << 1), + TIME_ALL_ANIM_WIN = (1 << 2), + TIME_ALL_BUTS_WIN = (1 << 3), + TIME_WITH_SEQ_AUDIO = (1 << 4), /* DEPRECATED */ + TIME_SEQ = (1 << 5), + TIME_ALL_IMAGE_WIN = (1 << 6), + TIME_CONTINUE_PHYSICS = (1 << 7), + TIME_NODES = (1 << 8), + TIME_CLIPS = (1 << 9), +} eScreen_Redraws_Flag; + +/* time->cache */ +typedef enum eTimeline_Cache_Flag { + TIME_CACHE_DISPLAY = (1 << 0), + TIME_CACHE_SOFTBODY = (1 << 1), + TIME_CACHE_PARTICLES = (1 << 2), + TIME_CACHE_CLOTH = (1 << 3), + TIME_CACHE_SMOKE = (1 << 4), + TIME_CACHE_DYNAMICPAINT = (1 << 5), +} eTimeline_Cache_Flag; + + +/* Sequence Editor ======================================= */ + +/* Sequencer */ typedef struct SpaceSeq { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ @@ -172,6 +474,48 @@ typedef struct SpaceSeq { struct bGPdata *gpd; /* grease-pencil data */ } SpaceSeq; + +/* sseq->mainb */ +typedef enum eSpaceSeq_RegionType { + SEQ_DRAW_SEQUENCE = 0, + SEQ_DRAW_IMG_IMBUF, + SEQ_DRAW_IMG_WAVEFORM, + SEQ_DRAW_IMG_VECTORSCOPE, + SEQ_DRAW_IMG_HISTOGRAM, +} eSpaceSeq_RegionType; + +/* sseq->flag */ +typedef enum eSpaceSeq_Flag { + SEQ_DRAWFRAMES = (1 << 0), + SEQ_MARKER_TRANS = (1 << 1), + SEQ_DRAW_COLOR_SEPARATED = (1 << 2), + SEQ_DRAW_SAFE_MARGINS = (1 << 3), + SEQ_DRAW_GPENCIL = (1 << 4), /* DEPRECATED */ + SEQ_NO_DRAW_CFRANUM = (1 << 5), +} eSpaceSeq_Flag; + +/* sseq->view */ +typedef enum eSpaceSeq_Displays { + SEQ_VIEW_SEQUENCE = 1, + SEQ_VIEW_PREVIEW, + SEQ_VIEW_SEQUENCE_PREVIEW, +} eSpaceSeq_Dispays; + +/* sseq->render_size */ +typedef enum eSpaceSeq_Proxy_RenderSize { + SEQ_PROXY_RENDER_SIZE_NONE = -1, + SEQ_PROXY_RENDER_SIZE_SCENE = 0, + SEQ_PROXY_RENDER_SIZE_25 = 25, + SEQ_PROXY_RENDER_SIZE_50 = 50, + SEQ_PROXY_RENDER_SIZE_75 = 75, + SEQ_PROXY_RENDER_SIZE_100 = 99, + SEQ_PROXY_RENDER_SIZE_FULL = 100 +} eSpaceSeq_Proxy_RenderSize; + + +/* File Selector ========================================== */ + +/* Config and Input for File Selector */ typedef struct FileSelectParams { char title[32]; /* title, also used for the text of the execute button */ char dir[1056]; /* directory, FILE_MAX_LIBEXTRA, 1024 + 32, this is for extreme case when 1023 length path @@ -200,11 +544,12 @@ typedef struct FileSelectParams { /* XXX --- end unused -- */ } FileSelectParams; - +/* File Browser */ typedef struct SpaceFile { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ int spacetype; + int scroll_offset; struct FileSelectParams *params; /* config and input for file select */ @@ -229,26 +574,91 @@ typedef struct SpaceFile { short systemnr, pad2; } SpaceFile; -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; +/* FileSelectParams.display */ +enum FileDisplayTypeE { + FILE_DEFAULTDISPLAY = 0, + FILE_SHORTDISPLAY, + FILE_LONGDISPLAY, + FILE_IMGDISPLAY +}; - View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ - - ListBase tree; - struct TreeStore *treestore; - - /* search stuff */ - char search_string[32]; - struct TreeStoreElem search_tse; +/* FileSelectParams.sort */ +enum FileSortTypeE { + FILE_SORT_NONE = 0, + FILE_SORT_ALPHA = 1, + FILE_SORT_EXTENSION, + FILE_SORT_TIME, + FILE_SORT_SIZE +}; - short flag, outlinevis, storeflag, search_flags; -} SpaceOops; +/* these values need to be hardcoded in structs, dna does not recognize defines */ +/* also defined in BKE */ +#define FILE_MAXDIR 768 +#define FILE_MAXFILE 256 +#define FILE_MAX 1024 + +#define FILE_MAX_LIBEXTRA (FILE_MAX + 32) + +/* filesel types */ +#define FILE_UNIX 8 +#define FILE_BLENDER 8 /* don't display relative paths */ +#define FILE_SPECIAL 9 +#define FILE_LOADLIB 1 +#define FILE_MAIN 2 +#define FILE_LOADFONT 3 + +/* filesel op property -> action */ +typedef enum eFileSel_Action { + FILE_OPENFILE = 0, + FILE_SAVE, +} eFileSel_Action; + +/* sfile->params->flag and simasel->flag */ +typedef enum eFileSel_Params_Flag { + FILE_SHOWSHORT = (1 << 0), + FILE_RELPATH = (1 << 1), /* was FILE_STRINGCODE */ + FILE_LINK = (1 << 2), + FILE_HIDE_DOT = (1 << 3), + FILE_AUTOSELECT = (1 << 4), + FILE_ACTIVELAY = (1 << 5), +/* FILE_ATCURSOR = (1 << 6), */ /* deprecated */ + FILE_DIRSEL_ONLY = (1 << 7), + FILE_FILTER = (1 << 8), + FILE_BOOKMARKS = (1 << 9), + FILE_GROUP_INSTANCE = (1 << 10), +} eFileSel_Params_Flag; + + +/* files in filesel list: file types */ +typedef enum eFileSel_File_Types { + BLENDERFILE = (1 << 2), + BLENDERFILE_BACKUP = (1 << 3), + IMAGEFILE = (1 << 4), + MOVIEFILE = (1 << 5), + PYSCRIPTFILE = (1 << 6), + FTFONTFILE = (1 << 7), + SOUNDFILE = (1 << 8), + TEXTFILE = (1 << 9), + MOVIEFILE_ICON = (1 << 10), /* movie file that preview can't load */ + FOLDERFILE = (1 << 11), /* represents folders for filtering */ + BTXFILE = (1 << 12), + COLLADAFILE = (1 << 13), + OPERATORFILE = (1 << 14), /* from filter_glob operator property */ +} eFileSel_File_Types; + +/* Selection Flags in filesel: struct direntry, unsigned char selflag */ +typedef enum eDirEntry_SelectFlag { +/* ACTIVE_FILE = (1 << 1), */ /* UNUSED */ + HILITED_FILE = (1 << 2), + SELECTED_FILE = (1 << 3), + EDITING_FILE = (1 << 4), +} eDirEntry_SelectFlag; + +/* Image/UV Editor ======================================== */ + +/* Image/UV Editor */ typedef struct SpaceImage { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ @@ -280,28 +690,75 @@ typedef struct SpaceImage { char around; } SpaceImage; -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; +/* SpaceImage->dt_uv */ +typedef enum eSpaceImage_UVDT { + SI_UVDT_OUTLINE = 0, + SI_UVDT_DASH, + SI_UVDT_BLACK, + SI_UVDT_WHITE, +} eSpaceImage_UVDT; - short autosnap; /* this uses the same settings as autosnap for Action Editor */ - short flag; - int pad; +/* SpaceImage->dt_uvstretch */ +typedef enum eSpaceImage_UVDT_Stretch { + SI_UVDT_STRETCH_ANGLE = 0, + SI_UVDT_STRETCH_AREA, +} eSpaceImage_UVDT_Stretch; + +/* SpaceImage->sticky + * 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_versons' */ +typedef enum eSpaceImage_Sticky { + SI_STICKY_LOC = 0, + SI_STICKY_DISABLE = 1, + SI_STICKY_VERTEX = 2, +} eSpaceImage_Sticky; + +/* SpaceImage->flag */ +typedef enum eSpaceImage_Flag { + SI_BE_SQUARE = (1 << 0), + SI_EDITTILE = (1 << 1), + SI_CLIP_UV = (1 << 2), + SI_DRAWTOOL = (1 << 3), + SI_NO_DRAWFACES = (1 << 4), + SI_DRAWSHADOW = (1 << 5), +/* SI_SELACTFACE = (1 << 6), */ /* deprecated */ + SI_DEPRECATED2 = (1 << 7), + SI_DEPRECATED3 = (1 << 8), /* stick UV selection to mesh vertex (UVs wont always be touching) */ + SI_COORDFLOATS = (1 << 9), + SI_PIXELSNAP = (1 << 10), + SI_LIVE_UNWRAP = (1 << 11), + SI_USE_ALPHA = (1 << 12), + SI_SHOW_ALPHA = (1 << 13), + SI_SHOW_ZBUF = (1 << 14), - struct bDopeSheet *ads; - View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ -} SpaceNla; + /* next two for render window display */ + SI_PREVSPACE = (1 << 15), + SI_FULLWINDOW = (1 << 16), + + SI_DEPRECATED4 = (1 << 17), + SI_DEPRECATED5 = (1 << 18), + + /* this means that the image is drawn until it reaches the view edge, + * in the image view, its unrelated to the 'tile' mode for texface + */ + SI_DRAW_TILE = (1 << 19), + SI_SMOOTH_UV = (1 << 20), + SI_DRAW_STRETCH = (1 << 21), + SI_DISPGP = (1 << 22), /* DEPRECATED */ + SI_DRAW_OTHER = (1 << 23), + + SI_COLOR_CORRECTION = (1 << 24), +} eSpaceImage_Flag; + +/* Text Editor ============================================ */ +/* Text Editor */ typedef struct SpaceText { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ int spacetype; float blockscale DNA_DEPRECATED; - short blockhandler[8] DNA_DEPRECATED; struct Text *text; @@ -334,6 +791,26 @@ typedef struct SpaceText { void *drawcache; /* cache for faster drawing */ } SpaceText; + +/* SpaceText flags (moved from DNA_text_types.h) */ +typedef enum eSpaceText_Flags { + /* scrollable */ + ST_SCROLL_SELECT = (1 << 0), + /* clear namespace after script execution (BPY_main.c) */ + ST_CLEAR_NAMESPACE = (1 << 4), + + ST_FIND_WRAP = (1 << 5), + ST_FIND_ALL = (1 << 6), + ST_SHOW_MARGIN = (1 << 7), + ST_MATCH_CASE = (1 << 8), +} eSpaceText_Flags; + +/* stext->findstr/replacestr */ +#define ST_MAX_FIND_STR 256 + +/* Script View (Obsolete) ================================== */ + +/* Script Runtime Data - Obsolete (pre 2.5) */ typedef struct Script { ID id; @@ -350,6 +827,7 @@ typedef struct Script { } Script; #define SCRIPT_SET_NULL(_script) _script->py_draw = _script->py_event = _script->py_button = _script->py_browsercallback = _script->py_globaldict = NULL; _script->flags = 0 +/* Script View - Obsolete (pre 2.5) */ typedef struct SpaceScript { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ @@ -363,33 +841,14 @@ typedef struct SpaceScript { void *but_refs; } SpaceScript; -# /* 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; - -typedef struct SpaceTime { - SpaceLink *next, *prev; - ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - float blockscale DNA_DEPRECATED; - - View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ - - ListBase caches; - - int cache_display; - int flag; -} SpaceTime; +/* Nodes Editor =========================================== */ +/* Node Editor */ typedef struct SpaceNode { 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 */ @@ -414,21 +873,30 @@ typedef struct SpaceNode { } SpaceNode; /* snode->flag */ -#define SNODE_BACKDRAW 2 -#define SNODE_DISPGP 4 -#define SNODE_USE_ALPHA 8 -#define SNODE_SHOW_ALPHA 16 -#define SNODE_AUTO_RENDER 32 +typedef enum eSpaceNode_Flag { + SNODE_BACKDRAW = (1 << 1), + SNODE_DISPGP = (1 << 2), /* XXX: Grease Pencil - deprecated? */ + SNODE_USE_ALPHA = (1 << 3), + SNODE_SHOW_ALPHA = (1 << 4), + SNODE_AUTO_RENDER = (1 << 5), +} eSpaceNode_Flag; /* snode->texfrom */ -#define SNODE_TEX_OBJECT 0 -#define SNODE_TEX_WORLD 1 -#define SNODE_TEX_BRUSH 2 +typedef enum eSpaceNode_TexFrom { + SNODE_TEX_OBJECT = 0, + SNODE_TEX_WORLD, + SNODE_TEX_BRUSH, +} eSpaceNode_TexFrom; /* snode->shaderfrom */ -#define SNODE_SHADER_OBJECT 0 -#define SNODE_SHADER_WORLD 1 +typedef enum eSpaceNode_ShaderFrom { + SNODE_SHADER_OBJECT = 0, + SNODE_SHADER_WORLD, +} eSpaceNode_ShaderFrom; + +/* Game Logic Editor ===================================== */ +/* Logic Editor */ typedef struct SpaceLogic { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ @@ -443,6 +911,9 @@ typedef struct SpaceLogic { struct bGPdata *gpd; /* grease-pencil data */ } SpaceLogic; +/* Console ================================================ */ + +/* Console content */ typedef struct ConsoleLine { struct ConsoleLine *next, *prev; @@ -456,19 +927,20 @@ typedef struct ConsoleLine { } ConsoleLine; /* ConsoleLine.type */ -enum { - CONSOLE_LINE_OUTPUT=0, +typedef enum eConsoleLine_Type { + CONSOLE_LINE_OUTPUT = 0, CONSOLE_LINE_INPUT, CONSOLE_LINE_INFO, /* autocomp feedback */ CONSOLE_LINE_ERROR -}; +} eConsoleLine_Type; + +/* Console View */ typedef struct SpaceConsole { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ int spacetype; float blockscale DNA_DEPRECATED; // XXX are these needed? - short blockhandler[8] DNA_DEPRECATED; // XXX are these needed? /* space vars */ @@ -483,17 +955,23 @@ typedef struct SpaceConsole { int sel_end; } SpaceConsole; + +/* User Preferences ======================================= */ + +/* User Preferences View */ typedef struct SpaceUserPref { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ int spacetype; - + int pad; char filter[64]; /* search term for filtering in the UI */ - } SpaceUserPref; +/* Motion Tracking ======================================== */ + +/* Clip Editor */ typedef struct SpaceClip { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ @@ -531,408 +1009,65 @@ typedef struct SpaceClip { int pad3; } SpaceClip; -/* view3d Now in DNA_view3d_types.h */ - - - -/* **************** SPACE DEFINES ********************* */ - -/* 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 */ -#define BCONTEXT_RENDER 0 -#define BCONTEXT_SCENE 1 -#define BCONTEXT_WORLD 2 -#define BCONTEXT_OBJECT 3 -#define BCONTEXT_DATA 4 -#define BCONTEXT_MATERIAL 5 -#define BCONTEXT_TEXTURE 6 -#define BCONTEXT_PARTICLE 7 -#define BCONTEXT_PHYSICS 8 -#define BCONTEXT_BONE 9 -#define BCONTEXT_MODIFIER 10 -#define BCONTEXT_CONSTRAINT 12 -#define BCONTEXT_BONE_CONSTRAINT 13 -#define BCONTEXT_TOT 14 - -/* 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 */ -#define SB_TEXC_MAT_OR_LAMP 0 -#define SB_TEXC_WORLD 1 -#define SB_TEXC_BRUSH 2 -#define SB_TEXC_PARTICLES 3 - -/* sbuts->align */ -#define BUT_FREE 0 -#define BUT_HORIZONTAL 1 -#define BUT_VERTICAL 2 -#define BUT_AUTO 3 - -/* 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 - -/* FileSelectParams.display */ -enum FileDisplayTypeE { - FILE_DEFAULTDISPLAY = 0, - FILE_SHORTDISPLAY, - FILE_LONGDISPLAY, - FILE_IMGDISPLAY -}; - -/* FileSelectParams.sort */ -enum FileSortTypeE { - FILE_SORT_NONE = 0, - FILE_SORT_ALPHA = 1, - FILE_SORT_EXTENSION, - FILE_SORT_TIME, - FILE_SORT_SIZE -}; - -/* these values need to be hardcoded in structs, dna does not recognize defines */ -/* also defined in BKE */ -#define FILE_MAXDIR 768 -#define FILE_MAXFILE 256 -#define FILE_MAX 1024 - -#define FILE_MAX_LIBEXTRA (FILE_MAX + 32) - -/* filesel types */ -#define FILE_UNIX 8 -#define FILE_BLENDER 8 /* don't display relative paths */ -#define FILE_SPECIAL 9 - -#define FILE_LOADLIB 1 -#define FILE_MAIN 2 -#define FILE_LOADFONT 3 -/* filesel op property -> action */ -#define FILE_OPENFILE 0 -#define FILE_SAVE 1 - -/* sfile->params->flag and simasel->flag */ -#define FILE_SHOWSHORT (1<<0) -#define FILE_RELPATH (1<<1) /* was FILE_STRINGCODE */ -#define FILE_LINK (1<<2) -#define FILE_HIDE_DOT (1<<3) -#define FILE_AUTOSELECT (1<<4) -#define FILE_ACTIVELAY (1<<5) -/* #define FILE_ATCURSOR (1<<6) */ /* deprecated */ -#define FILE_DIRSEL_ONLY (1<<7) -#define FILE_FILTER (1<<8) -#define FILE_BOOKMARKS (1<<9) -#define FILE_GROUP_INSTANCE (1<<10) - - -/* files in filesel list: file types */ -#define BLENDERFILE (1<<2) -#define BLENDERFILE_BACKUP (1<<3) -#define IMAGEFILE (1<<4) -#define MOVIEFILE (1<<5) -#define PYSCRIPTFILE (1<<6) -#define FTFONTFILE (1<<7) -#define SOUNDFILE (1<<8) -#define TEXTFILE (1<<9) -#define MOVIEFILE_ICON (1<<10) /* movie file that preview can't load */ -#define FOLDERFILE (1<<11) /* represents folders for filtering */ -#define BTXFILE (1<<12) -#define COLLADAFILE (1<<13) -#define OPERATORFILE (1<<14) /* from filter_glob operator property */ - - -/* Selection Flags in filesel: struct direntry, unsigned char selflag */ -/* #define ACTIVE_FILE (1<<1) */ /* UNUSED */ -#define HILITED_FILE (1<<2) -#define SELECTED_FILE (1<<3) -#define EDITING_FILE (1<<4) - -/* SpaceImage->dt_uv */ -#define SI_UVDT_OUTLINE 0 -#define SI_UVDT_DASH 1 -#define SI_UVDT_BLACK 2 -#define SI_UVDT_WHITE 3 - -/* SpaceImage->dt_uvstretch */ -#define SI_UVDT_STRETCH_ANGLE 0 -#define SI_UVDT_STRETCH_AREA 1 - -/* SpaceImage->sticky - * 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_versons' */ -#define SI_STICKY_LOC 0 -#define SI_STICKY_DISABLE 1 -#define SI_STICKY_VERTEX 2 - -/* SpaceImage->flag */ -#define SI_BE_SQUARE (1<<0) -#define SI_EDITTILE (1<<1) -#define SI_CLIP_UV (1<<2) -#define SI_DRAWTOOL (1<<3) -#define SI_NO_DRAWFACES (1<<4) -#define SI_DRAWSHADOW (1<<5) -/* #define SI_SELACTFACE (1<<6) */ /* deprecated */ -#define SI_DEPRECATED2 (1<<7) -#define SI_DEPRECATED3 (1<<8) /* stick UV selection to mesh vertex (UVs wont always be touching) */ -#define SI_COORDFLOATS (1<<9) -#define SI_PIXELSNAP (1<<10) -#define SI_LIVE_UNWRAP (1<<11) -#define SI_USE_ALPHA (1<<12) -#define SI_SHOW_ALPHA (1<<13) -#define SI_SHOW_ZBUF (1<<14) - /* next two for render window dislay */ -#define SI_PREVSPACE (1<<15) -#define SI_FULLWINDOW (1<<16) -#define SI_DEPRECATED4 (1<<17) -#define SI_DEPRECATED5 (1<<18) - /* this means that the image is drawn until it reaches the view edge, - * in the image view, its unrelated to the 'tile' mode for texface */ -#define SI_DRAW_TILE (1<<19) -#define SI_SMOOTH_UV (1<<20) -#define SI_DRAW_STRETCH (1<<21) -#define SI_DISPGP (1<<22) -#define SI_DRAW_OTHER (1<<23) - -#define SI_COLOR_CORRECTION (1<<24) - -/* SpaceIpo->flag (Graph Editor Settings) */ - /* OLD DEPRECEATED SETTING */ -#define SIPO_LOCK_VIEW (1<<0) - /* don't merge keyframes on the same frame after a transform */ -#define SIPO_NOTRANSKEYCULL (1<<1) - /* don't show any keyframe handles at all */ -#define SIPO_NOHANDLES (1<<2) - /* don't show current frame number beside indicator line */ -#define SIPO_NODRAWCFRANUM (1<<3) - /* show timing in seconds instead of frames */ -#define SIPO_DRAWTIME (1<<4) - /* only show keyframes for selected F-Curves */ -#define SIPO_SELCUVERTSONLY (1<<5) - /* draw names of F-Curves beside the respective curves */ - /* NOTE: currently not used */ -#define SIPO_DRAWNAMES (1<<6) - /* show sliders in channels list */ -#define SIPO_SLIDERS (1<<7) - /* don't show the horizontal component of the cursor */ -#define SIPO_NODRAWCURSOR (1<<8) - /* only show handles of selected keyframes */ -#define SIPO_SELVHANDLESONLY (1<<9) - /* temporary flag to force channel selections to be synced with main */ -#define SIPO_TEMP_NEEDCHANSYNC (1<<10) - /* don't perform realtime updates */ -#define SIPO_NOREALTIMEUPDATES (1<<11) - /* don't draw curves with AA ("beauty-draw") for performance */ -#define SIPO_BEAUTYDRAW_OFF (1<<12) - -/* SpaceIpo->mode (Graph Editor Mode) */ -enum { - /* all animation curves (from all over Blender) */ - SIPO_MODE_ANIMATION = 0, - /* drivers only */ - SIPO_MODE_DRIVERS, -} eGraphEdit_Mode; - -/* SpaceText flags (moved from DNA_text_types.h) */ - -#define ST_SCROLL_SELECT 0x0001 // scrollable -#define ST_CLEAR_NAMESPACE 0x0010 // clear namespace after script - // execution (see BPY_main.c) -#define ST_FIND_WRAP 0x0020 -#define ST_FIND_ALL 0x0040 -#define ST_SHOW_MARGIN 0x0080 -#define ST_MATCH_CASE 0x0100 - +/* SpaceClip->flag */ +typedef enum eSpaceClip_Flag { + SC_SHOW_MARKER_PATTERN = (1 << 0), + SC_SHOW_MARKER_SEARCH = (1 << 1), + SC_LOCK_SELECTION = (1 << 2), + SC_SHOW_TINY_MARKER = (1 << 3), + SC_SHOW_TRACK_PATH = (1 << 4), + SC_SHOW_BUNDLES = (1 << 5), + SC_MUTE_FOOTAGE = (1 << 6), + SC_HIDE_DISABLED = (1 << 7), + SC_SHOW_NAMES = (1 << 8), + SC_SHOW_GRID = (1 << 9), + SC_SHOW_STABLE = (1 << 10), + SC_MANUAL_CALIBRATION = (1 << 11), +/* SC_SHOW_GPENCIL = (1 << 12),*/ /* UNUSED */ + SC_SHOW_FILTERS = (1 << 13), + SC_SHOW_GRAPH_FRAMES = (1 << 14), + SC_SHOW_GRAPH_TRACKS = (1 << 15), +/* SC_SHOW_PYRAMID_LEVELS = (1 << 16), */ /* UNUSED */ + SC_LOCK_TIMECURSOR = (1 << 17), + SC_SHOW_SECONDS = (1 << 18), +} eSpaceClip_Flag; -/* stext->findstr/replacestr */ -#define ST_MAX_FIND_STR 256 +/* SpaceClip->mode */ +typedef enum eSpaceClip_Mode { + SC_MODE_TRACKING = 0, + SC_MODE_RECONSTRUCTION, + SC_MODE_DISTORTION, +} eSpaceClip_Mode; -/* SpaceOops->flag */ -#define SO_TESTBLOCKS 1 -#define SO_NEWSELECTED 2 -#define SO_HIDE_RESTRICTCOLS 4 -#define SO_HIDE_KEYINGSETINFO 8 +/* SpaceClip->view */ +typedef enum eSpaceClip_View { + SC_VIEW_CLIP = 0, + SC_VIEW_GRAPH, + SC_VIEW_DOPESHEET, +} eSpaceClip_View; -/* SpaceOops->outlinevis */ -#define SO_ALL_SCENES 0 -#define SO_CUR_SCENE 1 -#define SO_VISIBLE 2 -#define SO_SELECTED 3 -#define SO_ACTIVE 4 -#define SO_SAME_TYPE 5 -#define SO_GROUPS 6 -#define SO_LIBRARIES 7 -#define SO_VERSE_SESSION 8 -#define SO_VERSE_MS 9 -#define SO_SEQUENCE 10 -#define SO_DATABLOCKS 11 -#define SO_USERDEF 12 -#define SO_KEYMAP 13 +/* SpaceClip->dope_sort */ +typedef enum eSpaceClip_Dopesheet_Sort { + SC_DOPE_SORT_NAME = 0, + SC_DOPE_SORT_LONGEST, + SC_DOPE_SORT_TOTAL, +} eSpaceClip_Dopesheet_Sort; -/* SpaceOops->storeflag */ -#define SO_TREESTORE_CLEANUP 1 - /* if set, it allows redraws. gets set for some allqueue events */ -#define SO_TREESTORE_REDRAW 2 +/* SpaceClip->dope_flag */ +typedef enum eSpaceClip_Dopesheet_Flag { + SC_DOPE_SORT_INVERSE = (1 << 0), +} eSpaceClip_Dopesheet_Flag; -/* outliner search flags (SpaceOops->search_flags) */ -#define SO_FIND_CASE_SENSITIVE (1<<0) -#define SO_FIND_COMPLETE (1<<1) -#define SO_SEARCH_RECURSIVE (1<<2) +/* **************** SPACE DEFINES ********************* */ /* headerbuttons: 450-499 */ - #define B_IMASELHOME 451 #define B_IMASELREMOVEBIP 452 -/* nla->flag */ -/* flags (1<<0), (1<<1), and (1<<3) are depreceated flags from old blenders */ - /* draw timing in seconds instead of frames */ -#define SNLA_DRAWTIME (1<<2) - /* don't draw frame number beside frame indicator */ -#define SNLA_NODRAWCFRANUM (1<<4) - /* don't draw influence curves on strips */ -#define SNLA_NOSTRIPCURVES (1<<5) - /* don't perform realtime updates */ -#define SNLA_NOREALTIMEUPDATES (1<<6) - -/* time->flag */ - /* show timing in frames instead of in seconds */ -#define TIME_DRAWFRAMES 1 - /* show time indicator box beside the frame number */ -#define TIME_CFRA_NUM 2 - /* only keyframes from active/selected channels get shown */ -#define TIME_ONLYACTSEL 4 - -/* time->redraws (now screen->redraws_flag) */ -#define TIME_REGION 1 -#define TIME_ALL_3D_WIN 2 -#define TIME_ALL_ANIM_WIN 4 -#define TIME_ALL_BUTS_WIN 8 -#define TIME_WITH_SEQ_AUDIO 16 // deprecated -#define TIME_SEQ 32 -#define TIME_ALL_IMAGE_WIN 64 -#define TIME_CONTINUE_PHYSICS 128 -#define TIME_NODES 256 -#define TIME_CLIPS 512 - -/* time->cache */ -#define TIME_CACHE_DISPLAY 1 -#define TIME_CACHE_SOFTBODY 2 -#define TIME_CACHE_PARTICLES 4 -#define TIME_CACHE_CLOTH 8 -#define TIME_CACHE_SMOKE 16 -#define TIME_CACHE_DYNAMICPAINT 32 - -/* sseq->mainb */ -#define SEQ_DRAW_SEQUENCE 0 -#define SEQ_DRAW_IMG_IMBUF 1 -#define SEQ_DRAW_IMG_WAVEFORM 2 -#define SEQ_DRAW_IMG_VECTORSCOPE 3 -#define SEQ_DRAW_IMG_HISTOGRAM 4 - -/* sseq->flag */ -#define SEQ_DRAWFRAMES 1 -#define SEQ_MARKER_TRANS 2 -#define SEQ_DRAW_COLOR_SEPARATED 4 -#define SEQ_DRAW_SAFE_MARGINS 8 -#define SEQ_DRAW_GPENCIL 16 -#define SEQ_NO_DRAW_CFRANUM 32 - -/* sseq->view */ -#define SEQ_VIEW_SEQUENCE 1 -#define SEQ_VIEW_PREVIEW 2 -#define SEQ_VIEW_SEQUENCE_PREVIEW 3 - -/* sseq->render_size */ -#define SEQ_PROXY_RENDER_SIZE_NONE -1 -#define SEQ_PROXY_RENDER_SIZE_SCENE 0 -#define SEQ_PROXY_RENDER_SIZE_25 25 -#define SEQ_PROXY_RENDER_SIZE_50 50 -#define SEQ_PROXY_RENDER_SIZE_75 75 -#define SEQ_PROXY_RENDER_SIZE_100 99 -#define SEQ_PROXY_RENDER_SIZE_FULL 100 - -/* SpaceClip->flag */ -#define SC_SHOW_MARKER_PATTERN (1<<0) -#define SC_SHOW_MARKER_SEARCH (1<<1) -#define SC_LOCK_SELECTION (1<<2) -#define SC_SHOW_TINY_MARKER (1<<3) -#define SC_SHOW_TRACK_PATH (1<<4) -#define SC_SHOW_BUNDLES (1<<5) -#define SC_MUTE_FOOTAGE (1<<6) -#define SC_HIDE_DISABLED (1<<7) -#define SC_SHOW_NAMES (1<<8) -#define SC_SHOW_GRID (1<<9) -#define SC_SHOW_STABLE (1<<10) -#define SC_MANUAL_CALIBRATION (1<<11) -/*#define SC_SHOW_GPENCIL (1<<12)*/ /* UNUSED */ -#define SC_SHOW_FILTERS (1<<13) -#define SC_SHOW_GRAPH_FRAMES (1<<14) -#define SC_SHOW_GRAPH_TRACKS (1<<15) -/*#define SC_SHOW_PYRAMID_LEVELS (1<<16) */ /* UNUSED */ -#define SC_LOCK_TIMECURSOR (1<<17) -#define SC_SHOW_SECONDS (1<<18) - -/* SpaceClip->mode */ -#define SC_MODE_TRACKING 0 -#define SC_MODE_RECONSTRUCTION 1 -#define SC_MODE_DISTORTION 2 - -/* SpaceClip->view */ -#define SC_VIEW_CLIP 0 -#define SC_VIEW_GRAPH 1 -#define SC_VIEW_DOPESHEET 2 - -/* SpaceClip->dope_sort */ -#define SC_DOPE_SORT_NAME 0 -#define SC_DOPE_SORT_LONGEST 1 -#define SC_DOPE_SORT_TOTAL 2 - -/* SpaceClip->dope_flag */ -#define SC_DOPE_SORT_INVERSE 1 /* space types, moved from DNA_screen_types.h */ /* Do NOT change order, append on end. types are hardcoded needed */ -enum { +typedef enum eSpace_Type { SPACE_EMPTY, SPACE_VIEW3D, SPACE_IPO, @@ -954,7 +1089,8 @@ enum { SPACE_CONSOLE, SPACE_USERPREF, SPACE_CLIP, + SPACEICONMAX = SPACE_CLIP -}; +} eSpace_Type; #endif diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 9f8409e4e79..fb490a72370 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -262,6 +262,10 @@ typedef struct ThemeSpace { char match[4]; /* outliner - filter match */ char selected_highlight[4]; /* outliner - selected item */ + + char skin_root[4]; /* Skin modifier root color */ + + int pad4; } ThemeSpace; diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index fb4d4202b31..e89cc751a69 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -266,6 +266,7 @@ typedef struct View3D { #define V3D_SHOW_RECONSTRUCTION 128 #define V3D_SHOW_CAMERAPATH 256 #define V3D_SHOW_BUNDLENAME 512 +#define V3D_BACKFACE_CULLING 1024 /* View3D->around */ #define V3D_CENTER 0 diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index 80c80d02e06..231dd521f07 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -952,7 +952,7 @@ static void reconstruct_struct(SDNA *newsdna, SDNA *oldsdna, elen = elementsize(newsdna, spc[0], spc[1]); /* test: is type a struct? */ - if (spc[0] >= firststructtypenr && !ispointer(name)) { + if (spc[0] >= firststructtypenr && !ispointer(name)) { /* where does the old struct data start (and is there an old one?) */ cpo = find_elem(oldsdna, type, name, spo, data, &sppo); @@ -1020,7 +1020,7 @@ void DNA_struct_switch_endian(SDNA *oldsdna, int oldSDNAnr, char *data) elen = elementsize(oldsdna, spc[0], spc[1]); /* test: is type a struct? */ - if (spc[0] >= firststructtypenr && !ispointer(name)) { + if (spc[0] >= firststructtypenr && !ispointer(name)) { /* where does the old data start (is there one?) */ cpo = find_elem(oldsdna, type, name, spo, data, NULL); if (cpo) { diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 58880be6f5f..bea9916c704 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -146,7 +146,7 @@ static int nr_structs = 0; static char **names, *namedata; /* at address names[a] is string a */ static char **types, *typedata; /* at address types[a] is string a */ static short *typelens; /* at typelens[a] is de length of type a */ -static short *alphalens; /* contains sizes as they are calculated on the DEC Alpha (64 bits), infact any 64bit system */ +static short *alphalens; /* contains sizes as they are calculated on the DEC Alpha (64 bits), in fact any 64bit system */ static short **structs, *structdata; /* at sp= structs[a] is the first address of a struct definition * sp[0] is type number * sp[1] is amount of elements @@ -287,7 +287,7 @@ static int add_name(const char *str) additional_slen_offset = 0; - if (str[0] == 0 /* || (str[1]==0) */) return -1; + if (str[0] == 0 /* || (str[1] == 0) */) return -1; if (str[0] == '(' && str[1] == '*') { /* we handle function pointer and special array cases here, e.g. |