diff options
Diffstat (limited to 'source/blender/makesdna')
22 files changed, 611 insertions, 382 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 33d1445fb93..64543709252 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -44,54 +44,65 @@ struct FileData; struct ID; struct PackedFile; struct GPUTexture; - + typedef struct IDPropertyData { void *pointer; ListBase group; - int val, val2; /*note, we actually fit a double into these two ints*/ + int val, val2; /* note, we actually fit a double into these two ints */ } IDPropertyData; typedef struct IDProperty { struct IDProperty *next, *prev; char type, subtype; short flag; - char name[64]; /* MAX_IDPROP_NAME */ - int saved; /* saved is used to indicate if this struct has been saved yet. - * seemed like a good idea as a pad var was needed anyway :)*/ - IDPropertyData data; /* note, alignment for 64 bits */ - int len; /* array length, also (this is important!) string length + 1. - * the idea is to be able to reuse array realloc functions on strings.*/ + char name[64]; /* MAX_IDPROP_NAME */ + + /* saved is used to indicate if this struct has been saved yet. + * seemed like a good idea as a pad var was needed anyway :) */ + int saved; + IDPropertyData data; /* note, alignment for 64 bits */ + + /* array length, also (this is important!) string length + 1. + * the idea is to be able to reuse array realloc functions on strings.*/ + int len; + + /* Strings and arrays are both buffered, though the buffer isn't saved. */ /* totallen is total length of allocated array/string, including a buffer. - * Note that the buffering is mild; the code comes from python's list implementation.*/ - int totallen; /*strings and arrays are both buffered, though the buffer isn't saved.*/ + * Note that the buffering is mild; the code comes from python's list implementation. */ + int totallen; } IDProperty; -#define MAX_IDPROP_NAME 64 -#define DEFAULT_ALLOC_FOR_NULL_STRINGS 64 +#define MAX_IDPROP_NAME 64 +#define DEFAULT_ALLOC_FOR_NULL_STRINGS 64 /*->type*/ -#define IDP_STRING 0 -#define IDP_INT 1 -#define IDP_FLOAT 2 -#define IDP_ARRAY 5 -#define IDP_GROUP 6 -/* the ID link property type hasn't been implemented yet, this will require - * some cleanup of blenkernel, most likely.*/ -#define IDP_ID 7 -#define IDP_DOUBLE 8 -#define IDP_IDPARRAY 9 -#define IDP_NUMTYPES 10 +enum { + IDP_STRING = 0, + IDP_INT = 1, + IDP_FLOAT = 2, + IDP_ARRAY = 5, + IDP_GROUP = 6, + /* the ID link property type hasn't been implemented yet, this will require + * some cleanup of blenkernel, most likely. */ + IDP_ID = 7, + IDP_DOUBLE = 8, + IDP_IDPARRAY = 9, + IDP_NUMTYPES = 10, +}; /*->subtype */ /* IDP_STRING */ -#define IDP_STRING_SUB_UTF8 0 /* default */ -#define IDP_STRING_SUB_BYTE 1 /* arbitrary byte array, _not_ null terminated */ -/*->flag*/ -#define IDP_FLAG_GHOST (1<<7) /* this means the property is set but RNA will return - * false when checking 'RNA_property_is_set', - * currently this is a runtime flag */ +enum { + IDP_STRING_SUB_UTF8 = 0, /* default */ + IDP_STRING_SUB_BYTE = 1, /* arbitrary byte array, _not_ null terminated */ +}; +/*->flag*/ +enum { + IDP_FLAG_GHOST = 1 << 7, /* this means the property is set but RNA will return false when checking + * 'RNA_property_is_set', currently this is a runtime flag */ +}; /* add any future new id property types here.*/ @@ -102,7 +113,7 @@ typedef struct IDProperty { * */ /* 2 characters for ID code and 64 for actual name */ -#define MAX_ID_NAME 66 +#define MAX_ID_NAME 66 /* There's a nasty circular dependency here.... 'void *' to the rescue! I * really wonder why this is needed. */ @@ -129,14 +140,14 @@ typedef struct Library { ID id; ID *idblock; struct FileData *filedata; - char name[1024]; /* path name used for reading, can be relative and edited in the outliner */ - char filepath[1024]; /* absolute filepath, this is only for convenience, - * 'name' is the real path used on file read but in - * some cases its useful to access the absolute one, - * This is set on file read. - * Use BKE_library_filepath_set() rather than - * setting 'name' directly and it will be kept in - * sync - campbell */ + char name[1024]; /* path name used for reading, can be relative and edited in the outliner */ + + /* absolute filepath, this is only for convenience, 'name' is the real path used on file read but in + * some cases its useful to access the absolute one. + * This is set on file read. + * Use BKE_library_filepath_set() rather than setting 'name' directly and it will be kept in sync - campbell */ + char filepath[1024]; + struct Library *parent; /* set for indirectly linked libs, used in the outliner and while reading */ struct PackedFile *packedfile; @@ -239,26 +250,28 @@ typedef struct PreviewImage { #define ID_NEW_US(a) if ( (a)->id.newid) { (a) = (void *)(a)->id.newid; (a)->id.us++; } #define ID_NEW_US2(a) if (((ID *)a)->newid) { (a) = ((ID *)a)->newid; ((ID *)a)->us++; } -/* id->flag: set frist 8 bits always at zero while reading */ -#define LIB_LOCAL 0 -#define LIB_EXTERN 1 -#define LIB_INDIRECT 2 -#define LIB_NEED_EXPAND 8 -#define LIB_TESTEXT (LIB_NEED_EXPAND | LIB_EXTERN) -#define LIB_TESTIND (LIB_NEED_EXPAND | LIB_INDIRECT) -#define LIB_READ 16 -#define LIB_NEED_LINK 32 - -#define LIB_NEW 256 -#define LIB_FAKEUSER 512 -/* free test flag */ -#define LIB_DOIT 1024 -/* tag existing data before linking so we know what is new */ -#define LIB_PRE_EXISTING 2048 -/* runtime */ -#define LIB_ID_RECALC 4096 -#define LIB_ID_RECALC_DATA 8192 -#define LIB_ANIM_NO_RECALC 16384 +/* id->flag: set first 8 bits always at zero while reading */ +enum { + LIB_LOCAL = 0, + LIB_EXTERN = 1 << 0, + LIB_INDIRECT = 1 << 1, + LIB_NEED_EXPAND = 1 << 3, + LIB_TESTEXT = (LIB_NEED_EXPAND | LIB_EXTERN), + LIB_TESTIND = (LIB_NEED_EXPAND | LIB_INDIRECT), + LIB_READ = 1 << 4, + LIB_NEED_LINK = 1 << 5, + + LIB_NEW = 1 << 8, + LIB_FAKEUSER = 1 << 9, + /* free test flag */ + LIB_DOIT = 1 << 10, + /* tag existing data before linking so we know what is new */ + LIB_PRE_EXISTING = 1 << 11, + /* runtime */ + LIB_ID_RECALC = 1 << 12, + LIB_ID_RECALC_DATA = 1 << 13, + LIB_ANIM_NO_RECALC = 1 << 14, +}; #ifdef __cplusplus } diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index dab825c856e..243e747c006 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -250,6 +250,7 @@ typedef enum ePchan_Flag { POSE_ROT = (1 << 1), POSE_SIZE = (1 << 2), /* old IK/cache stuff... */ +#if 0 POSE_IK_MAT = (1 << 3), POSE_UNUSED2 = (1 << 4), POSE_UNUSED3 = (1 << 5), @@ -257,6 +258,7 @@ typedef enum ePchan_Flag { POSE_UNUSED5 = (1 << 7), /* has Standard IK */ POSE_HAS_IK = (1 << 8), +#endif /* IK/Pose solving*/ POSE_CHAIN = (1 << 9), POSE_DONE = (1 << 10), @@ -265,8 +267,10 @@ typedef enum ePchan_Flag { POSE_STRIDE = (1 << 12), /* standard IK solving */ POSE_IKTREE = (1 << 13), +#if 0 /* has Spline IK */ POSE_HAS_IKS = (1 << 14), +#endif /* spline IK solving */ POSE_IKSPLINE = (1 << 15) } ePchan_Flag; @@ -541,7 +545,7 @@ typedef enum eDopeSheet_FilterFlag { ADS_FILTER_ONLYNLA = (1 << 2), /* for 'NLA' editor - only include NLA data from AnimData */ ADS_FILTER_SELEDIT = (1 << 3), /* for Graph Editor - used to indicate whether to include a filtering flag or not */ - /* general filtering 2 */ + /* general filtering */ ADS_FILTER_SUMMARY = (1 << 4), /* for 'DopeSheet' Editors - include 'summary' line */ ADS_FILTER_ONLYOBGROUP = (1 << 5), /* only the objects in the specified object group get used */ @@ -564,6 +568,8 @@ typedef enum eDopeSheet_FilterFlag { ADS_FILTER_NOSPK = (1 << 21), ADS_FILTER_NOLINESTYLE = (1 << 22), ADS_FILTER_NOMODIFIERS = (1 << 23), + ADS_FILTER_NOGPENCIL = (1 << 24), + /* NOTE: all new datablock filters will have to go in filterflag2 (see below) */ /* NLA-specific filters */ ADS_FILTER_NLA_NOACT = (1 << 25), /* if the AnimData block has no NLA data, don't include to just show Action-line */ @@ -581,6 +587,8 @@ typedef enum eDopeSheet_FilterFlag { typedef enum eDopeSheet_Flag { ADS_FLAG_SUMMARY_COLLAPSED = (1 << 0), /* when summary is shown, it is collapsed, so all other channels get hidden */ ADS_FLAG_SHOW_DBFILTERS = (1 << 1) /* show filters for datablocks */ + + /* NOTE: datablock filter flags continued (1 << 10) onwards... */ } eDopeSheet_Flag; diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index dcde9007cd8..bdf1b62646d 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -57,7 +57,7 @@ typedef struct bActionActuator { short blendin; /* Number of frames of blending */ short priority; /* Execution priority */ short layer; /* Animation layer */ - short end_reset; /* Ending the actuator (negative pulse) wont reset the the action to its starting frame */ + short end_reset; /* Ending the actuator (negative pulse) wont reset the action to its starting frame */ short strideaxis; /* Displacement axis */ short blend_mode; /* Layer blending mode */ float stridelength; /* Displacement incurred by cycle */ // not in use diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h index b14861fcf47..2fce2be8eaf 100644 --- a/source/blender/makesdna/DNA_brush_types.h +++ b/source/blender/makesdna/DNA_brush_types.h @@ -102,7 +102,7 @@ typedef struct Brush { char vertexpaint_tool; /* active vertex/weight paint blend mode (poorly named) */ char imagepaint_tool; /* active image paint tool */ char mask_tool; /* enum BrushMaskTool, only used if sculpt_tool is SCULPT_TOOL_MASK */ - + float autosmooth_factor; float crease_pinch_factor; diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index 87496fb491f..288743d5e2f 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -270,86 +270,101 @@ typedef struct Curve { /* **************** CURVE ********************* */ -/* texflag */ -#define CU_AUTOSPACE 1 - -/* drawflag */ -#define CU_HIDE_HANDLES (1 << 0) -#define CU_HIDE_NORMALS (1 << 1) - -/* flag */ -#define CU_3D 1 -#define CU_FRONT 2 -#define CU_BACK 4 -#define CU_PATH 8 -#define CU_FOLLOW 16 -#define CU_UV_ORCO 32 -#define CU_DEFORM_BOUNDS_OFF 64 -#define CU_STRETCH 128 -/* #define CU_OFFS_PATHDIST 256 */ /* DEPRECATED */ -#define CU_FAST 512 /* Font: no filling inside editmode */ -/* #define CU_RETOPO 1024 */ /* DEPRECATED */ -#define CU_DS_EXPAND 2048 -#define CU_PATH_RADIUS 4096 /* make use of the path radius if this is enabled (default for new curves) */ -#define CU_DEFORM_FILL 8192 /* fill 2d curve after deformation */ -#define CU_FILL_CAPS 16384 /* fill bevel caps */ -#define CU_MAP_TAPER 32768 /* map taper object to beveled area */ - -/* twist mode */ -#define CU_TWIST_Z_UP 0 -// #define CU_TWIST_Y_UP 1 // not used yet -// #define CU_TWIST_X_UP 2 -#define CU_TWIST_MINIMUM 3 -#define CU_TWIST_TANGENT 4 - -/* bevel factor mapping */ +/* Curve.texflag */ enum { - CU_BEVFAC_MAP_RESOLU = 0, + CU_AUTOSPACE = 1, +}; + +/* Curve.drawflag */ +enum { + CU_HIDE_HANDLES = 1 << 0, + CU_HIDE_NORMALS = 1 << 1, +}; + +/* Curve.flag */ +enum { + CU_3D = 1 << 0, + CU_FRONT = 1 << 1, + CU_BACK = 1 << 2, + CU_PATH = 1 << 3, + CU_FOLLOW = 1 << 4, + CU_UV_ORCO = 1 << 5, + CU_DEFORM_BOUNDS_OFF = 1 << 6, + CU_STRETCH = 1 << 7, + /* CU_OFFS_PATHDIST = 1 << 8, */ /* DEPRECATED */ + CU_FAST = 1 << 9, /* Font: no filling inside editmode */ + /* CU_RETOPO = 1 << 10, */ /* DEPRECATED */ + CU_DS_EXPAND = 1 << 11, + CU_PATH_RADIUS = 1 << 12, /* make use of the path radius if this is enabled (default for new curves) */ + CU_DEFORM_FILL = 1 << 13, /* fill 2d curve after deformation */ + CU_FILL_CAPS = 1 << 14, /* fill bevel caps */ + CU_MAP_TAPER = 1 << 15, /* map taper object to beveled area */ +}; + +/* Curve.twist_mode */ +enum { + CU_TWIST_Z_UP = 0, + /* CU_TWIST_Y_UP = 1, */ /* not used yet */ + /* CU_TWIST_X_UP = 2, */ + CU_TWIST_MINIMUM = 3, + CU_TWIST_TANGENT = 4, +}; + +/* Curve.bevfac1_mapping, Curve.bevfac2_mapping, bevel factor mapping */ +enum { + CU_BEVFAC_MAP_RESOLU = 0, CU_BEVFAC_MAP_SEGMENT = 1, - CU_BEVFAC_MAP_SPLINE = 2 + CU_BEVFAC_MAP_SPLINE = 2, +}; + +/* Curve.spacemode */ +enum { + CU_LEFT = 0, + CU_MIDDLE = 1, + CU_RIGHT = 2, + CU_JUSTIFY = 3, + CU_FLUSH = 4, }; -/* spacemode */ -#define CU_LEFT 0 -#define CU_MIDDLE 1 -#define CU_RIGHT 2 -#define CU_JUSTIFY 3 -#define CU_FLUSH 4 - -/* flag (nurb) */ -#define CU_SMOOTH 1 -#define CU_2D 8 /* moved from type since 2.4x */ - -/* type (nurb) */ -#define CU_POLY 0 -#define CU_BEZIER 1 -#define CU_BSPLINE 2 -#define CU_CARDINAL 3 -#define CU_NURBS 4 -#define CU_TYPE (CU_POLY|CU_BEZIER|CU_BSPLINE|CU_CARDINAL|CU_NURBS) - - /* only for adding */ -#define CU_PRIMITIVE 0xF00 - - /* 2 or 4 points */ -#define CU_PRIM_CURVE 0x100 - /* 8 points circle */ -#define CU_PRIM_CIRCLE 0x200 - /* 4x4 patch Nurb */ -#define CU_PRIM_PATCH 0x300 -#define CU_PRIM_TUBE 0x400 -#define CU_PRIM_SPHERE 0x500 -#define CU_PRIM_DONUT 0x600 - /* 5 points, 5th order straight line (for anim path) */ -#define CU_PRIM_PATH 0x700 - - -/* flagu flagv (nurb) */ -#define CU_NURB_CYCLIC 1 -#define CU_NURB_ENDPOINT 2 -#define CU_NURB_BEZIER 4 - -#define CU_ACT_NONE -1 +/* Nurb.flag */ +enum { + CU_SMOOTH = 1 << 0, + CU_2D = 1 << 3, /* moved from type since 2.4x */ +}; + +/* Nurb.type */ +enum { + CU_POLY = 0, + CU_BEZIER = 1, + CU_BSPLINE = 2, + CU_CARDINAL = 3, + CU_NURBS = 4, + CU_TYPE = (CU_POLY | CU_BEZIER | CU_BSPLINE | CU_CARDINAL | CU_NURBS), + + /* only for adding */ + CU_PRIMITIVE = 0xF00, + + /* 2 or 4 points */ + CU_PRIM_CURVE = 0x100, + /* 8 points circle */ + CU_PRIM_CIRCLE = 0x200, + /* 4x4 patch Nurb */ + CU_PRIM_PATCH = 0x300, + CU_PRIM_TUBE = 0x400, + CU_PRIM_SPHERE = 0x500, + CU_PRIM_DONUT = 0x600, + /* 5 points, 5th order straight line (for anim path) */ + CU_PRIM_PATH = 0x700, +}; + +/* Nurb.flagu, Nurb.flagv */ +enum { + CU_NURB_CYCLIC = 1 << 0, + CU_NURB_ENDPOINT = 1 << 1, + CU_NURB_BEZIER = 1 << 2, +}; + +#define CU_ACT_NONE -1 /* *************** BEZTRIPLE **************** */ @@ -366,9 +381,9 @@ typedef enum eBezTriple_Handle { /* interpolation modes (used only for BezTriple->ipo) */ typedef enum eBezTriple_Interpolation { /* traditional interpolation */ - BEZT_IPO_CONST = 0, /* constant interpolation */ - BEZT_IPO_LIN = 1, /* linear interpolation */ - BEZT_IPO_BEZ = 2, /* bezier interpolation */ + BEZT_IPO_CONST = 0, /* constant interpolation */ + BEZT_IPO_LIN = 1, /* linear interpolation */ + BEZT_IPO_BEZ = 2, /* bezier interpolation */ /* easing equations */ BEZT_IPO_BACK = 3, @@ -380,7 +395,7 @@ typedef enum eBezTriple_Interpolation { BEZT_IPO_QUAD = 9, BEZT_IPO_QUART = 10, BEZT_IPO_QUINT = 11, - BEZT_IPO_SINE = 12 + BEZT_IPO_SINE = 12, } eBezTriple_Interpolation; /* easing modes (used only for Keyframes - BezTriple->easing) */ @@ -389,15 +404,15 @@ typedef enum eBezTriple_Easing { BEZT_IPO_EASE_IN = 1, BEZT_IPO_EASE_OUT = 2, - BEZT_IPO_EASE_IN_OUT = 3 + BEZT_IPO_EASE_IN_OUT = 3, } eBezTriple_Easing; /* types of keyframe (used only for BezTriple->hide when BezTriple is used in F-Curves) */ typedef enum eBezTriple_KeyframeType { - BEZT_KEYTYPE_KEYFRAME = 0, /* default - 'proper' Keyframe */ - BEZT_KEYTYPE_EXTREME = 1, /* 'extreme' keyframe */ - BEZT_KEYTYPE_BREAKDOWN = 2, /* 'breakdown' keyframe */ - BEZT_KEYTYPE_JITTER = 3, /* 'jitter' keyframe (for adding 'filler' secondary motion) */ + BEZT_KEYTYPE_KEYFRAME = 0, /* default - 'proper' Keyframe */ + BEZT_KEYTYPE_EXTREME = 1, /* 'extreme' keyframe */ + BEZT_KEYTYPE_BREAKDOWN = 2, /* 'breakdown' keyframe */ + BEZT_KEYTYPE_JITTER = 3, /* 'jitter' keyframe (for adding 'filler' secondary motion) */ } eBezTriple_KeyframeType; /* checks if the given BezTriple is selected */ @@ -406,14 +421,16 @@ typedef enum eBezTriple_KeyframeType { /* *************** CHARINFO **************** */ -/* flag */ -/* note: CU_CHINFO_WRAP and CU_CHINFO_SMALLCAPS_TEST are set dynamically */ -#define CU_CHINFO_BOLD (1<<0) -#define CU_CHINFO_ITALIC (1<<1) -#define CU_CHINFO_UNDERLINE (1<<2) -#define CU_CHINFO_WRAP (1<<3) /* wordwrap occurred here */ -#define CU_CHINFO_SMALLCAPS (1<<4) -#define CU_CHINFO_SMALLCAPS_CHECK (1<<5) /* set at runtime, checks if case switching is needed */ +/* CharInfo.flag */ +enum { + /* note: CU_CHINFO_WRAP and CU_CHINFO_SMALLCAPS_TEST are set dynamically */ + CU_CHINFO_BOLD = 1 << 0, + CU_CHINFO_ITALIC = 1 << 1, + CU_CHINFO_UNDERLINE = 1 << 2, + CU_CHINFO_WRAP = 1 << 3, /* wordwrap occurred here */ + CU_CHINFO_SMALLCAPS = 1 << 4, + CU_CHINFO_SMALLCAPS_CHECK = 1 << 5, /* set at runtime, checks if case switching is needed */ +}; /* mixed with KEY_LINEAR but define here since only curve supports */ #define KEY_CU_EASE 3 diff --git a/source/blender/makesdna/DNA_dynamicpaint_types.h b/source/blender/makesdna/DNA_dynamicpaint_types.h index d2b95c959b3..dece93af122 100644 --- a/source/blender/makesdna/DNA_dynamicpaint_types.h +++ b/source/blender/makesdna/DNA_dynamicpaint_types.h @@ -33,55 +33,71 @@ struct CurveMapping; struct PaintSurfaceData; /* surface format */ -#define MOD_DPAINT_SURFACE_F_PTEX 0 -#define MOD_DPAINT_SURFACE_F_VERTEX 1 -#define MOD_DPAINT_SURFACE_F_IMAGESEQ 2 +enum { + MOD_DPAINT_SURFACE_F_PTEX = 0, + MOD_DPAINT_SURFACE_F_VERTEX = 1, + MOD_DPAINT_SURFACE_F_IMAGESEQ = 2, +}; /* surface type */ -#define MOD_DPAINT_SURFACE_T_PAINT 0 -#define MOD_DPAINT_SURFACE_T_DISPLACE 1 -#define MOD_DPAINT_SURFACE_T_WEIGHT 2 -#define MOD_DPAINT_SURFACE_T_WAVE 3 +enum { + MOD_DPAINT_SURFACE_T_PAINT = 0, + MOD_DPAINT_SURFACE_T_DISPLACE = 1, + MOD_DPAINT_SURFACE_T_WEIGHT = 2, + MOD_DPAINT_SURFACE_T_WAVE = 3, +}; /* surface flags */ -#define MOD_DPAINT_ACTIVE (1<<0) /* Is surface enabled */ +enum { + MOD_DPAINT_ACTIVE = 1 << 0, /* Is surface enabled */ -#define MOD_DPAINT_ANTIALIAS (1<<1) /* do antialiasing */ -#define MOD_DPAINT_DISSOLVE (1<<2) /* do dissolve */ -#define MOD_DPAINT_MULALPHA (1<<3) /* Multiply color by alpha when saving image */ -#define MOD_DPAINT_DISSOLVE_LOG (1<<4) /* Use 1/x for surface dissolve */ -#define MOD_DPAINT_DRY_LOG (1<<5) /* Use 1/x for drying paint */ -#define MOD_DPAINT_PREVIEW (1<<6) /* preview this surface on viewport*/ + MOD_DPAINT_ANTIALIAS = 1 << 1, /* do antialiasing */ + MOD_DPAINT_DISSOLVE = 1 << 2, /* do dissolve */ + MOD_DPAINT_MULALPHA = 1 << 3, /* Multiply color by alpha when saving image */ + MOD_DPAINT_DISSOLVE_LOG = 1 << 4, /* Use 1/x for surface dissolve */ + MOD_DPAINT_DRY_LOG = 1 << 5, /* Use 1/x for drying paint */ + MOD_DPAINT_PREVIEW = 1 << 6, /* preview this surface on viewport*/ -#define MOD_DPAINT_WAVE_OPEN_BORDERS (1<<7) /* passes waves through mesh edges */ -#define MOD_DPAINT_DISP_INCREMENTAL (1<<8) /* builds displace on top of earlier values */ -#define MOD_DPAINT_USE_DRYING (1<<9) /* use drying */ + MOD_DPAINT_WAVE_OPEN_BORDERS = 1 << 7, /* passes waves through mesh edges */ + MOD_DPAINT_DISP_INCREMENTAL = 1 << 8, /* builds displace on top of earlier values */ + MOD_DPAINT_USE_DRYING = 1 << 9, /* use drying */ -#define MOD_DPAINT_OUT1 (1<<10) /* output primary surface */ -#define MOD_DPAINT_OUT2 (1<<11) /* output secondary surface */ + MOD_DPAINT_OUT1 = 1 << 10, /* output primary surface */ + MOD_DPAINT_OUT2 = 1 << 11, /* output secondary surface */ +}; /* image_fileformat */ -#define MOD_DPAINT_IMGFORMAT_PNG 0 -#define MOD_DPAINT_IMGFORMAT_OPENEXR 1 +enum { + MOD_DPAINT_IMGFORMAT_PNG = 0, + MOD_DPAINT_IMGFORMAT_OPENEXR = 1, +}; /* disp_format */ -#define MOD_DPAINT_DISP_DISPLACE 0 /* displacement output displace map */ -#define MOD_DPAINT_DISP_DEPTH 1 /* displacement output depth data */ +enum { + MOD_DPAINT_DISP_DISPLACE = 0, /* displacement output displace map */ + MOD_DPAINT_DISP_DEPTH = 1, /* displacement output depth data */ +}; /* effect */ -#define MOD_DPAINT_EFFECT_DO_SPREAD (1<<0) /* do spread effect */ -#define MOD_DPAINT_EFFECT_DO_DRIP (1<<1) /* do drip effect */ -#define MOD_DPAINT_EFFECT_DO_SHRINK (1<<2) /* do shrink effect */ +enum { + MOD_DPAINT_EFFECT_DO_SPREAD = 1 << 0, /* do spread effect */ + MOD_DPAINT_EFFECT_DO_DRIP = 1 << 1, /* do drip effect */ + MOD_DPAINT_EFFECT_DO_SHRINK = 1 << 2, /* do shrink effect */ +}; /* preview_id */ -#define MOD_DPAINT_SURFACE_PREV_PAINT 0 -#define MOD_DPAINT_SURFACE_PREV_WETMAP 1 +enum { + MOD_DPAINT_SURFACE_PREV_PAINT = 0, + MOD_DPAINT_SURFACE_PREV_WETMAP = 1, +}; /* init_color_type */ -#define MOD_DPAINT_INITIAL_NONE 0 -#define MOD_DPAINT_INITIAL_COLOR 1 -#define MOD_DPAINT_INITIAL_TEXTURE 2 -#define MOD_DPAINT_INITIAL_VERTEXCOLOR 3 +enum { + MOD_DPAINT_INITIAL_NONE = 0, + MOD_DPAINT_INITIAL_COLOR = 1, + MOD_DPAINT_INITIAL_TEXTURE = 2, + MOD_DPAINT_INITIAL_VERTEXCOLOR = 3, +}; typedef struct DynamicPaintSurface { @@ -136,11 +152,14 @@ typedef struct DynamicPaintSurface { } DynamicPaintSurface; /* canvas flags */ -#if 0 /* This should not be needed, having a valid WEIGHT_MCOL layer should be enough. - * And if not, should be a general flag. But seems unnecessary for now... */ -#define MOD_DPAINT_PREVIEW_READY (1<<0) /* if viewport preview is ready */ +enum { + /* This should not be needed, having a valid WEIGHT_MCOL layer should be enough. + * And if not, should be a general flag. But seems unnecessary for now... */ +#if 0 + MOD_DPAINT_PREVIEW_READY = 1 << 0, /* if viewport preview is ready */ #endif -#define MOD_DPAINT_BAKING (1<<1) /* surface is already baking, so it wont get updated (loop) */ + MOD_DPAINT_BAKING = 1 << 1, /* surface is already baking, so it wont get updated (loop) */ +}; /* Canvas settings */ typedef struct DynamicPaintCanvasSettings { @@ -157,47 +176,56 @@ typedef struct DynamicPaintCanvasSettings { /* flags */ -#define MOD_DPAINT_PART_RAD (1<<0) /* use particle radius */ -#define MOD_DPAINT_USE_MATERIAL (1<<1) /* use object material */ -#define MOD_DPAINT_ABS_ALPHA (1<<2) /* don't increase alpha unless - * paint alpha is higher than existing */ -#define MOD_DPAINT_ERASE (1<<3) /* removes paint */ - -#define MOD_DPAINT_RAMP_ALPHA (1<<4) /* only read falloff ramp alpha */ -#define MOD_DPAINT_PROX_PROJECT (1<<5) /* do proximity check only in defined dir */ -#define MOD_DPAINT_INVERSE_PROX (1<<6) /* inverse proximity painting */ -#define MOD_DPAINT_NEGATE_VOLUME (1<<7) /* negates volume influence on "volume + prox" mode */ - -#define MOD_DPAINT_DO_SMUDGE (1<<8) /* brush smudges existing paint */ -#define MOD_DPAINT_VELOCITY_ALPHA (1<<9) /* multiply brush influence by velocity */ -#define MOD_DPAINT_VELOCITY_COLOR (1<<10) /* replace brush color by velocity color ramp */ -#define MOD_DPAINT_VELOCITY_DEPTH (1<<11) /* multiply brush intersection depth by velocity */ - -#define MOD_DPAINT_USES_VELOCITY ((1<<8)|(1<<9)|(1<<10)|(1<<11)) +enum { + MOD_DPAINT_PART_RAD = 1 << 0, /* use particle radius */ + MOD_DPAINT_USE_MATERIAL = 1 << 1, /* use object material */ + MOD_DPAINT_ABS_ALPHA = 1 << 2, /* don't increase alpha unless paint alpha is higher than existing */ + MOD_DPAINT_ERASE = 1 << 3, /* removes paint */ + + MOD_DPAINT_RAMP_ALPHA = 1 << 4, /* only read falloff ramp alpha */ + MOD_DPAINT_PROX_PROJECT = 1 << 5, /* do proximity check only in defined dir */ + MOD_DPAINT_INVERSE_PROX = 1 << 6, /* inverse proximity painting */ + MOD_DPAINT_NEGATE_VOLUME = 1 << 7, /* negates volume influence on "volume + prox" mode */ + + MOD_DPAINT_DO_SMUDGE = 1 << 8, /* brush smudges existing paint */ + MOD_DPAINT_VELOCITY_ALPHA = 1 << 9, /* multiply brush influence by velocity */ + MOD_DPAINT_VELOCITY_COLOR = 1 << 10, /* replace brush color by velocity color ramp */ + MOD_DPAINT_VELOCITY_DEPTH = 1 << 11, /* multiply brush intersection depth by velocity */ + + MOD_DPAINT_USES_VELOCITY = (MOD_DPAINT_DO_SMUDGE | MOD_DPAINT_VELOCITY_ALPHA | + MOD_DPAINT_VELOCITY_COLOR | MOD_DPAINT_VELOCITY_DEPTH), +}; /* collision type */ -#define MOD_DPAINT_COL_VOLUME 0 /* paint with mesh volume */ -#define MOD_DPAINT_COL_DIST 1 /* paint using distance to mesh surface */ -#define MOD_DPAINT_COL_VOLDIST 2 /* use both volume and distance */ -#define MOD_DPAINT_COL_PSYS 3 /* use particle system */ -#define MOD_DPAINT_COL_POINT 4 /* use distance to object center point */ +enum { + MOD_DPAINT_COL_VOLUME = 0, /* paint with mesh volume */ + MOD_DPAINT_COL_DIST = 1, /* paint using distance to mesh surface */ + MOD_DPAINT_COL_VOLDIST = 2, /* use both volume and distance */ + MOD_DPAINT_COL_PSYS = 3, /* use particle system */ + MOD_DPAINT_COL_POINT = 4, /* use distance to object center point */ +}; /* proximity_falloff */ -#define MOD_DPAINT_PRFALL_CONSTANT 0 /* no-falloff */ -#define MOD_DPAINT_PRFALL_SMOOTH 1 /* smooth, linear falloff */ -#define MOD_DPAINT_PRFALL_RAMP 2 /* use color ramp */ +enum { + MOD_DPAINT_PRFALL_CONSTANT = 0, /* no-falloff */ + MOD_DPAINT_PRFALL_SMOOTH = 1, /* smooth, linear falloff */ + MOD_DPAINT_PRFALL_RAMP = 2, /* use color ramp */ +}; /* wave_brush_type */ -#define MOD_DPAINT_WAVEB_DEPTH 0 /* use intersection depth */ -#define MOD_DPAINT_WAVEB_FORCE 1 /* act as a force on intersection area */ -#define MOD_DPAINT_WAVEB_REFLECT 2 /* obstacle that reflects waves */ -#define MOD_DPAINT_WAVEB_CHANGE 3 /* use change of intersection depth from previous frame */ +enum { + MOD_DPAINT_WAVEB_DEPTH = 0, /* use intersection depth */ + MOD_DPAINT_WAVEB_FORCE = 1, /* act as a force on intersection area */ + MOD_DPAINT_WAVEB_REFLECT = 2, /* obstacle that reflects waves */ + MOD_DPAINT_WAVEB_CHANGE = 3, /* use change of intersection depth from previous frame */ +}; /* brush ray_dir */ -#define MOD_DPAINT_RAY_CANVAS 0 -#define MOD_DPAINT_RAY_BRUSH_AVG 1 -#define MOD_DPAINT_RAY_ZPLUS 2 - +enum { + MOD_DPAINT_RAY_CANVAS = 0, + MOD_DPAINT_RAY_BRUSH_AVG = 1, + MOD_DPAINT_RAY_ZPLUS = 2, +}; /* Brush settings */ typedef struct DynamicPaintBrushSettings { diff --git a/source/blender/makesdna/DNA_freestyle_types.h b/source/blender/makesdna/DNA_freestyle_types.h index d099511a088..2359d1e9738 100644 --- a/source/blender/makesdna/DNA_freestyle_types.h +++ b/source/blender/makesdna/DNA_freestyle_types.h @@ -44,60 +44,74 @@ struct Group; struct Text; /* FreestyleConfig::flags */ -#define FREESTYLE_SUGGESTIVE_CONTOURS_FLAG (1 << 0) -#define FREESTYLE_RIDGES_AND_VALLEYS_FLAG (1 << 1) -#define FREESTYLE_MATERIAL_BOUNDARIES_FLAG (1 << 2) -#define FREESTYLE_FACE_SMOOTHNESS_FLAG (1 << 3) -#define FREESTYLE_ADVANCED_OPTIONS_FLAG (1 << 4) -#define FREESTYLE_CULLING (1 << 5) -#define FREESTYLE_VIEW_MAP_CACHE (1 << 6) +enum { + FREESTYLE_SUGGESTIVE_CONTOURS_FLAG = 1 << 0, + FREESTYLE_RIDGES_AND_VALLEYS_FLAG = 1 << 1, + FREESTYLE_MATERIAL_BOUNDARIES_FLAG = 1 << 2, + FREESTYLE_FACE_SMOOTHNESS_FLAG = 1 << 3, + FREESTYLE_ADVANCED_OPTIONS_FLAG = 1 << 4, + FREESTYLE_CULLING = 1 << 5, + FREESTYLE_VIEW_MAP_CACHE = 1 << 6, +}; /* FreestyleConfig::mode */ -#define FREESTYLE_CONTROL_SCRIPT_MODE 1 -#define FREESTYLE_CONTROL_EDITOR_MODE 2 +enum { + FREESTYLE_CONTROL_SCRIPT_MODE = 1, + FREESTYLE_CONTROL_EDITOR_MODE = 2, +}; /* FreestyleLineSet::flags */ -#define FREESTYLE_LINESET_CURRENT (1 << 0) -#define FREESTYLE_LINESET_ENABLED (1 << 1) -#define FREESTYLE_LINESET_FE_NOT (1 << 2) -#define FREESTYLE_LINESET_FE_AND (1 << 3) -#define FREESTYLE_LINESET_GR_NOT (1 << 4) -#define FREESTYLE_LINESET_FM_NOT (1 << 5) -#define FREESTYLE_LINESET_FM_BOTH (1 << 6) +enum { + FREESTYLE_LINESET_CURRENT = 1 << 0, + FREESTYLE_LINESET_ENABLED = 1 << 1, + FREESTYLE_LINESET_FE_NOT = 1 << 2, + FREESTYLE_LINESET_FE_AND = 1 << 3, + FREESTYLE_LINESET_GR_NOT = 1 << 4, + FREESTYLE_LINESET_FM_NOT = 1 << 5, + FREESTYLE_LINESET_FM_BOTH = 1 << 6, +}; /* FreestyleLineSet::selection */ -#define FREESTYLE_SEL_VISIBILITY (1 << 0) -#define FREESTYLE_SEL_EDGE_TYPES (1 << 1) -#define FREESTYLE_SEL_GROUP (1 << 2) -#define FREESTYLE_SEL_IMAGE_BORDER (1 << 3) -#define FREESTYLE_SEL_FACE_MARK (1 << 4) +enum { + FREESTYLE_SEL_VISIBILITY = 1 << 0, + FREESTYLE_SEL_EDGE_TYPES = 1 << 1, + FREESTYLE_SEL_GROUP = 1 << 2, + FREESTYLE_SEL_IMAGE_BORDER = 1 << 3, + FREESTYLE_SEL_FACE_MARK = 1 << 4, +}; /* FreestyleLineSet::edge_types, exclude_edge_types */ -#define FREESTYLE_FE_SILHOUETTE (1 << 0) -#define FREESTYLE_FE_BORDER (1 << 1) -#define FREESTYLE_FE_CREASE (1 << 2) -#define FREESTYLE_FE_RIDGE_VALLEY (1 << 3) -/* Note: FREESTYLE_FE_VALLEY = (1 << 4) is no longer used */ -#define FREESTYLE_FE_SUGGESTIVE_CONTOUR (1 << 5) -#define FREESTYLE_FE_MATERIAL_BOUNDARY (1 << 6) -#define FREESTYLE_FE_CONTOUR (1 << 7) -#define FREESTYLE_FE_EXTERNAL_CONTOUR (1 << 8) -#define FREESTYLE_FE_EDGE_MARK (1 << 9) +enum { + FREESTYLE_FE_SILHOUETTE = 1 << 0, + FREESTYLE_FE_BORDER = 1 << 1, + FREESTYLE_FE_CREASE = 1 << 2, + FREESTYLE_FE_RIDGE_VALLEY = 1 << 3, + /* FREESTYLE_FE_VALLEY = 1 << 4, */ /* No longer used */ + FREESTYLE_FE_SUGGESTIVE_CONTOUR = 1 << 5, + FREESTYLE_FE_MATERIAL_BOUNDARY = 1 << 6, + FREESTYLE_FE_CONTOUR = 1 << 7, + FREESTYLE_FE_EXTERNAL_CONTOUR = 1 << 8, + FREESTYLE_FE_EDGE_MARK = 1 << 9, +}; /* FreestyleLineSet::qi */ -#define FREESTYLE_QI_VISIBLE 1 -#define FREESTYLE_QI_HIDDEN 2 -#define FREESTYLE_QI_RANGE 3 +enum { + FREESTYLE_QI_VISIBLE = 1, + FREESTYLE_QI_HIDDEN = 2, + FREESTYLE_QI_RANGE = 3, +}; /* FreestyleConfig::raycasting_algorithm */ /* Defines should be replaced with ViewMapBuilder::visibility_algo */ -#define FREESTYLE_ALGO_REGULAR 1 -#define FREESTYLE_ALGO_FAST 2 -#define FREESTYLE_ALGO_VERYFAST 3 -#define FREESTYLE_ALGO_CULLED_ADAPTIVE_TRADITIONAL 4 -#define FREESTYLE_ALGO_ADAPTIVE_TRADITIONAL 5 -#define FREESTYLE_ALGO_CULLED_ADAPTIVE_CUMULATIVE 6 -#define FREESTYLE_ALGO_ADAPTIVE_CUMULATIVE 7 +enum { + FREESTYLE_ALGO_REGULAR = 1, + FREESTYLE_ALGO_FAST = 2, + FREESTYLE_ALGO_VERYFAST = 3, + FREESTYLE_ALGO_CULLED_ADAPTIVE_TRADITIONAL = 4, + FREESTYLE_ALGO_ADAPTIVE_TRADITIONAL = 5, + FREESTYLE_ALGO_CULLED_ADAPTIVE_CUMULATIVE = 6, + FREESTYLE_ALGO_ADAPTIVE_CUMULATIVE = 7, +}; typedef struct FreestyleLineSet { struct FreestyleLineSet *next, *prev; diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h index 2bf874d3a85..3fb047ebbe7 100644 --- a/source/blender/makesdna/DNA_gpencil_types.h +++ b/source/blender/makesdna/DNA_gpencil_types.h @@ -33,6 +33,9 @@ #include "DNA_listBase.h" #include "DNA_ID.h" +struct AnimData; + + /* Grease-Pencil Annotations - 'Stroke Point' * -> Coordinates may either be 2d or 3d depending on settings at the time * -> Coordinates of point on stroke, in proportions of window size @@ -42,8 +45,15 @@ typedef struct bGPDspoint { float x, y, z; /* co-ordinates of point (usually 2d, but can be 3d as well) */ float pressure; /* pressure of input device (from 0 to 1) at this point */ float time; /* seconds since start of stroke */ + int flag; /* additional options (NOTE: can shrink this field down later if needed) */ } bGPDspoint; +/* bGPDspoint->flag */ +typedef enum eGPDspoint_Flag { + /* stroke point is selected (for editing) */ + GP_SPOINT_SELECT = (1 << 0) +} eGPSPoint_Flag; + /* Grease-Pencil Annotations - 'Stroke' * -> A stroke represents a (simplified version) of the curve * drawn by the user in one 'mousedown'->'mouseup' operation @@ -61,15 +71,18 @@ typedef struct bGPDstroke { } bGPDstroke; /* bGPDstroke->flag */ +typedef enum eGPDstroke_Flag { /* stroke is in 3d-space */ -#define GP_STROKE_3DSPACE (1<<0) + GP_STROKE_3DSPACE = (1 << 0), /* stroke is in 2d-space */ -#define GP_STROKE_2DSPACE (1<<1) + GP_STROKE_2DSPACE = (1 << 1), /* stroke is in 2d-space (but with special 'image' scaling) */ -#define GP_STROKE_2DIMAGE (1<<2) + GP_STROKE_2DIMAGE = (1 << 2), + /* stroke is selected */ + GP_STROKE_SELECT = (1 << 3), /* only for use with stroke-buffer (while drawing eraser) */ -#define GP_STROKE_ERASER (1<<15) - + GP_STROKE_ERASER = (1 << 15) +} eGPDstroke_Flag; /* Grease-Pencil Annotations - 'Frame' * -> Acts as storage for the 'image' formed by strokes @@ -80,15 +93,18 @@ typedef struct bGPDframe { ListBase strokes; /* list of the simplified 'strokes' that make up the frame's data */ int framenum; /* frame number of this frame */ - int flag; /* temp settings */ + + short flag; /* temp settings */ + short key_type; /* keyframe type (eBezTriple_KeyframeType) */ } bGPDframe; -/* bGPDframe->flag */ +/* bGPDframe->flag */ +typedef enum eGPDframe_Flag { /* frame is being painted on */ -#define GP_FRAME_PAINT (1<<0) + GP_FRAME_PAINT = (1 << 0), /* for editing in Action Editor */ -#define GP_FRAME_SELECT (1<<1) - + GP_FRAME_SELECT = (1 << 1) +} eGPDframe_Flag; /* Grease-Pencil Annotations - 'Layer' */ typedef struct bGPDlayer { @@ -97,38 +113,52 @@ typedef struct bGPDlayer { ListBase frames; /* list of annotations to display for frames (bGPDframe list) */ bGPDframe *actframe; /* active frame (should be the frame that is currently being displayed) */ - int flag; /* settings for layer */ + short flag; /* settings for layer */ short thickness; /* current thickness to apply to strokes */ - short gstep; /* max number of frames between active and ghost to show (0=only those on either side) */ + + short gstep; /* Ghosts Before: max number of ghost frames to show between active frame and the one before it (0 = only the ghost itself) */ + short gstep_next; /* Ghosts After: max number of ghost frames to show after active frame and the following it (0 = only the ghost itself) */ + + float gcolor_prev[3]; /* optional color for ghosts before the active frame */ + float gcolor_next[3]; /* optional color for ghosts after the active frame */ float color[4]; /* color that should be used to draw all the strokes in this layer */ + float fill[4]; /* color that should be used for drawing "fills" for strokes */ char info[128]; /* optional reference info about this layer (i.e. "director's comments, 12/3") * this is used for the name of the layer too and kept unique. */ } bGPDlayer; /* bGPDlayer->flag */ +typedef enum eGPDlayer_Flag { /* don't display layer */ -#define GP_LAYER_HIDE (1<<0) + GP_LAYER_HIDE = (1 << 0), /* protected from further editing */ -#define GP_LAYER_LOCKED (1<<1) + GP_LAYER_LOCKED = (1 << 1), /* layer is 'active' layer being edited */ -#define GP_LAYER_ACTIVE (1<<2) + GP_LAYER_ACTIVE = (1 << 2), /* draw points of stroke for debugging purposes */ -#define GP_LAYER_DRAWDEBUG (1<<3) - /* do onionskinning */ -#define GP_LAYER_ONIONSKIN (1<<4) + GP_LAYER_DRAWDEBUG = (1 << 3), + /* do onion skinning */ + GP_LAYER_ONIONSKIN = (1 << 4), /* for editing in Action Editor */ -#define GP_LAYER_SELECT (1<<5) + GP_LAYER_SELECT = (1 << 5), /* current frame for layer can't be changed */ -#define GP_LAYER_FRAMELOCK (1<<6) + GP_LAYER_FRAMELOCK = (1 << 6), /* don't render xray (which is default) */ -#define GP_LAYER_NO_XRAY (1<<7) - + GP_LAYER_NO_XRAY = (1 << 7), + /* use custom color for ghosts before current frame */ + GP_LAYER_GHOST_PREVCOL = (1 << 8), + /* use custom color for ghosts after current frame */ + GP_LAYER_GHOST_NEXTCOL = (1 << 9), + /* "volumetric" strokes (i.e. GLU Quadric discs in 3D) */ + GP_LAYER_VOLUMETRIC = (1 << 10), +} eGPDlayer_Flag; /* Grease-Pencil Annotations - 'DataBlock' */ typedef struct bGPdata { - ID id; /* Grease Pencil data is */ + ID id; /* Grease Pencil data is a datablock */ + struct AnimData *adt; /* animation data - for animating draw settings */ /* saved Grease-Pencil data */ ListBase layers; /* bGPDlayers */ @@ -144,23 +174,33 @@ typedef struct bGPdata { } bGPdata; /* bGPdata->flag */ -// XXX many of these flags should be deprecated for more general ideas in 2.5 +/* NOTE: A few flags have been deprecated since early 2.5, + * since they have been made redundant by interaction + * changes made during the porting process. + */ +typedef enum eGPdata_Flag { /* don't allow painting to occur at all */ - // XXX is deprecated - not well understood -// #define GP_DATA_LMBPLOCK (1<<0) + /* GP_DATA_LMBPLOCK = (1 << 0), */ + /* show debugging info in viewport (i.e. status print) */ -#define GP_DATA_DISPINFO (1<<1) + GP_DATA_DISPINFO = (1 << 1), /* in Action Editor, show as expanded channel */ -#define GP_DATA_EXPAND (1<<2) + GP_DATA_EXPAND = (1 << 2), + /* is the block overriding all clicks? */ - // XXX is deprecated - nasty old concept -// #define GP_DATA_EDITPAINT (1<<3) + /* GP_DATA_EDITPAINT = (1 << 3), */ + /* new strokes are added in viewport space */ -#define GP_DATA_VIEWALIGN (1<<4) - /* Project into the screens Z values */ -#define GP_DATA_DEPTH_VIEW (1<<5) -#define GP_DATA_DEPTH_STROKE (1<<6) + GP_DATA_VIEWALIGN = (1 << 4), + + /* Project into the screen's Z values */ + GP_DATA_DEPTH_VIEW = (1 << 5), + GP_DATA_DEPTH_STROKE = (1 << 6), -#define GP_DATA_DEPTH_STROKE_ENDPOINTS (1<<7) + GP_DATA_DEPTH_STROKE_ENDPOINTS = (1 << 7), + + /* Stroke Editing Mode - Toggle to enable alternative keymap for easier editing of stroke points */ + GP_DATA_STROKE_EDITMODE = (1 << 8) +} eGPdata_Flag; #endif /* __DNA_GPENCIL_TYPES_H__ */ diff --git a/source/blender/makesdna/DNA_key_types.h b/source/blender/makesdna/DNA_key_types.h index f5ce3c8d8c1..16e40fa52e1 100644 --- a/source/blender/makesdna/DNA_key_types.h +++ b/source/blender/makesdna/DNA_key_types.h @@ -92,7 +92,7 @@ typedef struct Key { ID *from; short type; /* absolute or relative shape key */ - short totkey; /* (totkey == BLI_countlist(&key->block)) */ + short totkey; /* (totkey == BLI_listbase_count(&key->block)) */ short slurph; /* quaint feature to delay moving points based on their order (Key->type == KEY_NORMAL) only */ short flag; diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index e535e6012b3..8067fa5db2d 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -148,16 +148,20 @@ typedef struct TFace { /* **************** MESH ********************* */ /* texflag */ -#define ME_AUTOSPACE 1 +enum { + ME_AUTOSPACE = 1, +}; /* me->editflag */ -#define ME_EDIT_MIRROR_X (1 << 0) -#define ME_EDIT_MIRROR_Y (1 << 1) // unused so far -#define ME_EDIT_MIRROR_Z (1 << 2) // unused so far +enum { + ME_EDIT_MIRROR_X = 1 << 0, + ME_EDIT_MIRROR_Y = 1 << 1, /* unused so far */ + ME_EDIT_MIRROR_Z = 1 << 2, /* unused so far */ -#define ME_EDIT_PAINT_FACE_SEL (1 << 3) -#define ME_EDIT_MIRROR_TOPO (1 << 4) -#define ME_EDIT_PAINT_VERT_SEL (1 << 5) + ME_EDIT_PAINT_FACE_SEL = 1 << 3, + ME_EDIT_MIRROR_TOPO = 1 << 4, + ME_EDIT_PAINT_VERT_SEL = 1 << 5, +}; /* we cant have both flags enabled at once, * flags defined in DNA_scene_types.h */ @@ -168,57 +172,65 @@ typedef struct TFace { ) /* me->flag */ -/* #define ME_ISDONE 1 */ -/* #define ME_DEPRECATED 2 */ -#define ME_TWOSIDED 4 -#define ME_UVEFFECT 8 -#define ME_VCOLEFFECT 16 -#define ME_AUTOSMOOTH 32 -#define ME_SMESH 64 -#define ME_SUBSURF 128 -#define ME_OPT_EDGES 256 -#define ME_DS_EXPAND 512 -#define ME_SCULPT_DYNAMIC_TOPOLOGY 1024 +enum { +/* ME_ISDONE = 1 << 0, */ +/* ME_DEPRECATED = 1 << 1, */ + ME_TWOSIDED = 1 << 2, + ME_UVEFFECT = 1 << 3, + ME_VCOLEFFECT = 1 << 4, + ME_AUTOSMOOTH = 1 << 5, + ME_SMESH = 1 << 6, + ME_SUBSURF = 1 << 7, + ME_OPT_EDGES = 1 << 8, + ME_DS_EXPAND = 1 << 9, + ME_SCULPT_DYNAMIC_TOPOLOGY = 1 << 10, +}; /* me->cd_flag */ -#define ME_CDFLAG_VERT_BWEIGHT (1 << 0) -#define ME_CDFLAG_EDGE_BWEIGHT (1 << 1) -#define ME_CDFLAG_EDGE_CREASE (1 << 2) +enum { + ME_CDFLAG_VERT_BWEIGHT = 1 << 0, + ME_CDFLAG_EDGE_BWEIGHT = 1 << 1, + ME_CDFLAG_EDGE_CREASE = 1 << 2, +}; /* me->drawflag, short */ -#define ME_DRAWEDGES (1 << 0) -#define ME_DRAWFACES (1 << 1) -#define ME_DRAWNORMALS (1 << 2) -#define ME_DRAW_VNORMALS (1 << 3) +enum { + ME_DRAWEDGES = 1 << 0, + ME_DRAWFACES = 1 << 1, + ME_DRAWNORMALS = 1 << 2, + ME_DRAW_VNORMALS = 1 << 3, -#define ME_DRAWEIGHT (1 << 4) -#define ME_HIDDENEDGES (1 << 5) + ME_DRAWEIGHT = 1 << 4, + /* ME_HIDDENEDGES = 1 << 5, */ /* DEPRECATED */ -#define ME_DRAWCREASES (1 << 6) -#define ME_DRAWSEAMS (1 << 7) -#define ME_DRAWSHARP (1 << 8) -#define ME_DRAWBWEIGHTS (1 << 9) + ME_DRAWCREASES = 1 << 6, + ME_DRAWSEAMS = 1 << 7, + ME_DRAWSHARP = 1 << 8, + ME_DRAWBWEIGHTS = 1 << 9, -#define ME_DRAWEXTRA_EDGELEN (1 << 10) -#define ME_DRAWEXTRA_FACEAREA (1 << 11) -#define ME_DRAWEXTRA_FACEANG (1 << 12) -#define ME_DRAWEXTRA_EDGEANG (1 << 13) + ME_DRAWEXTRA_EDGELEN = 1 << 10, + ME_DRAWEXTRA_FACEAREA = 1 << 11, + ME_DRAWEXTRA_FACEANG = 1 << 12, + ME_DRAWEXTRA_EDGEANG = 1 << 13, /* debug only option */ -#define ME_DRAWEXTRA_INDICES (1 << 14) + ME_DRAWEXTRA_INDICES = 1 << 14, -#define ME_DRAW_FREESTYLE_EDGE (1 << 15) -#define ME_DRAW_FREESTYLE_FACE (1 << 16) + ME_DRAW_FREESTYLE_EDGE = 1 << 15, + ME_DRAW_FREESTYLE_FACE = 1 << 16, /* draw stats */ -#define ME_DRAW_STATVIS (1 << 17) + ME_DRAW_STATVIS = 1 << 17, /* draw loop normals */ -#define ME_DRAW_LNORMALS (1 << 18) + ME_DRAW_LNORMALS = 1 << 18, +}; /* Subsurf Type */ -#define ME_CC_SUBSURF 0 -#define ME_SIMPLE_SUBSURF 1 +enum { + ME_CC_SUBSURF = 0, + ME_SIMPLE_SUBSURF = 1, +}; #define MESH_MAX_VERTS 2000000000L @@ -229,6 +241,6 @@ typedef struct TFace { #define USE_BMESH_SAVE_WITHOUT_MFACE /* enable this so meshes get tessfaces calculated by default */ -// #define USE_TESSFACE_DEFAULT +/* #define USE_TESSFACE_DEFAULT */ #endif diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index a7d067cd1ff..39700257413 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -976,6 +976,36 @@ typedef struct NodeSunBeams { #define SHD_NORMAL_MAP_BLENDER_OBJECT 3 #define SHD_NORMAL_MAP_BLENDER_WORLD 4 +/* math node clamp */ +#define SHD_MATH_CLAMP 1 + +/* Math node operation/ */ +enum { + NODE_MATH_ADD = 0, + NODE_MATH_SUB = 1, + NODE_MATH_MUL = 2, + NODE_MATH_DIVIDE = 3, + NODE_MATH_SIN = 4, + NODE_MATH_COS = 5, + NODE_MATH_TAN = 6, + NODE_MATH_ASIN = 7, + NODE_MATH_ACOS = 8, + NODE_MATH_ATAN = 9, + NODE_MATH_POW = 10, + NODE_MATH_LOG = 11, + NODE_MATH_MIN = 12, + NODE_MATH_MAX = 13, + NODE_MATH_ROUND = 14, + NODE_MATH_LESS = 15, + NODE_MATH_GREATER = 16, + NODE_MATH_MOD = 17, + NODE_MATH_ABS = 18, +}; + +/* mix rgb node flags */ +#define SHD_MIXRGB_USE_ALPHA 1 +#define SHD_MIXRGB_CLAMP 2 + /* subsurface */ enum { SHD_SUBSURFACE_COMPATIBLE = 0, // Deprecated diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h index a2a724b6a32..dd25a49c476 100644 --- a/source/blender/makesdna/DNA_particle_types.h +++ b/source/blender/makesdna/DNA_particle_types.h @@ -293,7 +293,7 @@ typedef struct ParticleSystem { short vgroup[12], vg_neg, rt3; /* vertex groups, 0==disable, 1==starting index */ /* temporary storage during render */ - void *renderdata; + struct ParticleRenderData *renderdata; /* point cache */ struct PointCache *pointcache; diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index f8f962107f6..27b5da90d55 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1093,9 +1093,10 @@ typedef struct ToolSettings { short autoik_chainlen; /* runtime only */ /* Grease Pencil */ - char gpencil_flags; + char gpencil_flags; /* flags/options for how the tool works */ + char gpencil_src; /* for main 3D view Grease Pencil, where data comes from */ - char pad[5]; + char pad[4]; /* Image Paint (8 byttse aligned please!) */ struct ImagePaintSettings imapaint; @@ -1484,7 +1485,10 @@ enum { /* sequencer seq_prev_type seq_rend_type */ - +/* scene->r.engine (scene.c) */ +extern const char *RE_engine_id_BLENDER_RENDER; +extern const char *RE_engine_id_BLENDER_GAME; +extern const char *RE_engine_id_CYCLES; /* **************** SCENE ********************* */ @@ -1766,6 +1770,12 @@ typedef enum ImagePaintMode { /* toolsettings->gpencil_flags */ #define GP_TOOL_FLAG_PAINTSESSIONS_ON (1<<0) +/* toolsettings->gpencil_src */ +typedef enum eGPencil_Source_3D { + GP_TOOL_SOURCE_SCENE = 0, + GP_TOOL_SOURCE_OBJECT = 1 +} eGPencil_Source_3d; + /* toolsettings->particle flag */ #define PE_KEEP_LENGTHS 1 #define PE_LOCK_FIRST 2 diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index 8a900c3946e..47a08c62f95 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -60,7 +60,7 @@ typedef struct bScreen { int redraws_flag; /* user-setting for which editors get redrawn during anim playback (used to be time->redraws) */ int pad1; - short full; /* temp screen for image render display or fileselect */ + short state; /* temp screen for image render display or fileselect */ short temp; /* temp screen in a temp window, don't save (like user prefs) */ short winid; /* winid from WM, starts with 1 */ short do_draw; /* notifier for drawing edges */ @@ -247,7 +247,8 @@ typedef struct ARegion { short do_draw_overlay; /* private, cached notifier events */ short swap; /* private, indicator to survive swap-exchange */ short overlap; /* private, set for indicate drawing overlapped */ - short pad[2]; + short flagfullscreen; /* temporary copy of flag settings for clean fullscreen */ + short pad; struct ARegionType *type; /* callbacks for this region type */ @@ -287,9 +288,12 @@ typedef struct ARegion { #define HEADERDOWN 1 #define HEADERTOP 2 -/* screen->full */ -#define SCREENNORMAL 0 -#define SCREENFULL 1 +/* screen->state */ +enum { + SCREENNORMAL = 0, + SCREENMAXIMIZED = 1, /* one editor taking over the screen */ + SCREENFULL = 2, /* one editor taking over the screen with no bare-minimum UI elements */ +}; /* Panel->flag */ enum { diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index 4795048d346..20678bdae49 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -131,10 +131,11 @@ typedef struct Sequence { int flag, type; /*flags bitmap (see below) and the type of sequence*/ int len; /* the length of the contents of this strip - before handles are applied */ - int start, startofs, endofs; - int startstill, endstill; + int start; /* start frame of contents of strip in absolute frame coordinates. For metastrips start of first strip startdisp */ + int startofs, endofs; /* frames after the first frame where display starts, frames before the last frame where display ends */ + int startstill, endstill; /* frames that use the first frame before data begins, frames that use the last frame after data ends */ int machine, depth; /*machine - the strip channel, depth - the depth in the sequence when dealing with metastrips */ - int startdisp, enddisp; /*starting and ending points in the sequence*/ + int startdisp, enddisp; /* starting and ending points of the strip in the sequence*/ float sat; float mul, handsize; @@ -193,6 +194,8 @@ typedef struct MetaStack { struct MetaStack *next, *prev; ListBase *oldbasep; Sequence *parseq; + /* the startdisp/enddisp when entering the meta */ + int disp_range[2]; } MetaStack; typedef struct Editing { @@ -360,6 +363,9 @@ enum { SEQ_AUDIO_PITCH_ANIMATED = (1 << 25), SEQ_AUDIO_PAN_ANIMATED = (1 << 26), SEQ_AUDIO_DRAW_WAVEFORM = (1 << 27), + + /* don't include Grease Pencil in OpenGL previews of Scene strips */ + SEQ_SCENE_NO_GPENCIL = (1 << 28), SEQ_INVALID_EFFECT = (1 << 31), }; diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h index d7a51359777..4ab22e4f7b7 100644 --- a/source/blender/makesdna/DNA_sound_types.h +++ b/source/blender/makesdna/DNA_sound_types.h @@ -95,6 +95,8 @@ typedef struct bSound { */ void *playback_handle; + /* mutex for asynchronous loading of sounds */ + void *mutex; /* XXX unused currently (SOUND_TYPE_LIMITER) */ /* float start, end; */ } bSound; @@ -116,9 +118,10 @@ enum { }; enum { - SOUND_FLAGS_3D = (1 << 3), /* deprecated! used for sound actuator loading */ - SOUND_FLAGS_CACHING = (1 << 4), - SOUND_FLAGS_MONO = (1 << 5), + SOUND_FLAGS_3D = (1 << 3), /* deprecated! used for sound actuator loading */ + SOUND_FLAGS_CACHING = (1 << 4), + SOUND_FLAGS_MONO = (1 << 5), + SOUND_FLAGS_WAVEFORM_LOADING = (1 << 6), }; #if (DNA_DEPRECATED_GCC_POISON == 1) diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index a267217abf6..339b232f8a0 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -497,6 +497,8 @@ typedef struct SpaceSeq { float zoom DNA_DEPRECATED; /* deprecated, handled by View2D now */ int view; /* see SEQ_VIEW_* below */ int overlay_type; + int draw_flag; /* overlay an image of the editing on below the strips */ + int pad; struct bGPdata *gpd; /* grease-pencil data */ @@ -513,6 +515,13 @@ typedef enum eSpaceSeq_RegionType { SEQ_DRAW_IMG_HISTOGRAM = 4, } eSpaceSeq_RegionType; +/* sseq->draw_flag */ +typedef enum eSpaceSeq_DrawFlag { + SEQ_DRAW_BACKDROP = (1 << 0), + SEQ_DRAW_OFFSET_EXT = (1 << 1), +} eSpaceSeq_DrawFlag; + + /* sseq->flag */ typedef enum eSpaceSeq_Flag { SEQ_DRAWFRAMES = (1 << 0), @@ -522,6 +531,8 @@ typedef enum eSpaceSeq_Flag { SEQ_SHOW_GPENCIL = (1 << 4), SEQ_NO_DRAW_CFRANUM = (1 << 5), SEQ_USE_ALPHA = (1 << 6), /* use RGBA display mode for preview */ + SEQ_ALL_WAVEFORMS = (1 << 7), /* draw all waveforms */ + SEQ_NO_WAVEFORMS = (1 << 8), /* draw no waveforms */ } eSpaceSeq_Flag; /* sseq->view */ @@ -565,8 +576,9 @@ typedef enum eSpaceSeq_OverlayType { /* Config and Input for File Selector */ typedef struct FileSelectParams { char title[96]; /* 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 + char dir[1090]; /* directory, FILE_MAX_LIBEXTRA, 1024 + 66, this is for extreme case when 1023 length path * needs to be linked in, where foo.blend/Armature need adding */ + char pad_c1[2]; char file[256]; /* file */ char renamefile[256]; char renameedit[256]; /* annoying but the first is only used for initialization */ @@ -809,7 +821,7 @@ typedef enum eSpaceImage_Flag { SI_COLOR_CORRECTION = (1 << 24), - SI_NO_DRAW_TEXPAINT = (1 << 25) + SI_NO_DRAW_TEXPAINT = (1 << 25), } eSpaceImage_Flag; /* Text Editor ============================================ */ diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 769e2573aa4..73902e9c090 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -168,11 +168,13 @@ typedef struct ThemeUI { uiPanelColors panel; /* depricated, but we keep it for do_versions (2.66.1) */ + char widget_emboss[4]; + /* fac: 0 - 1 for blend factor, width in pixels */ float menu_shadow_fac; short menu_shadow_width; - short pad; + short pad[3]; char iconfile[256]; // FILE_MAXFILE length float icon_alpha; diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 3efba488299..0eee28e73d9 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -201,7 +201,9 @@ typedef struct View3D { char gridflag; /* transform widget info */ - char twtype, twmode, twflag, pad2[2]; + char twtype, twmode, twflag; + + short flag3; /* afterdraw, for xray & transparent */ struct ListBase afterdraw_transp; @@ -267,21 +269,24 @@ typedef struct View3D { ((view >= RV3D_VIEW_FRONT) && (view <= RV3D_VIEW_BOTTOM)) /* View3d->flag2 (short) */ -#define V3D_RENDER_OVERRIDE 4 -#define V3D_SOLID_TEX 8 -#define V3D_SHOW_GPENCIL 16 -#define V3D_LOCK_CAMERA 32 -#define V3D_RENDER_SHADOW 64 /* This is a runtime only flag that's used to tell draw_mesh_object() that we're doing a shadow pass instead of a regular draw */ -#define V3D_SHOW_RECONSTRUCTION 128 -#define V3D_SHOW_CAMERAPATH 256 -#define V3D_SHOW_BUNDLENAME 512 -#define V3D_BACKFACE_CULLING 1024 -#define V3D_RENDER_BORDER 2048 -#define V3D_SOLID_MATCAP 4096 /* user flag */ -#define V3D_SHOW_SOLID_MATCAP 8192 /* runtime flag */ -#define V3D_OCCLUDE_WIRE 16384 -#define V3D_SHADELESS_TEX 32768 - +#define V3D_RENDER_OVERRIDE (1 << 2) +#define V3D_SOLID_TEX (1 << 3) +#define V3D_SHOW_GPENCIL (1 << 4) +#define V3D_LOCK_CAMERA (1 << 5) +#define V3D_RENDER_SHADOW (1 << 6) /* This is a runtime only flag that's used to tell draw_mesh_object() that we're doing a shadow pass instead of a regular draw */ +#define V3D_SHOW_RECONSTRUCTION (1 << 7) +#define V3D_SHOW_CAMERAPATH (1 << 8) +#define V3D_SHOW_BUNDLENAME (1 << 9) +#define V3D_BACKFACE_CULLING (1 << 10) +#define V3D_RENDER_BORDER (1 << 11) +#define V3D_SOLID_MATCAP (1 << 12) /* user flag */ +#define V3D_SHOW_SOLID_MATCAP (1 << 13) /* runtime flag */ +#define V3D_OCCLUDE_WIRE (1 << 14) +#define V3D_SHADELESS_TEX (1 << 15) + + +/* View3d->flag3 (short) */ +#define V3D_SHOW_WORLD (1 << 0) /* View3D->around */ #define V3D_CENTER 0 diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 4cf6bfe9a8f..1a0562ae8c5 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -165,6 +165,13 @@ enum { WM_INIT_KEYMAP = (1<<1), }; +/* IME is win32 only! */ +#ifndef WIN32 +# ifdef __GNUC__ +# define ime_data ime_data __attribute__ ((deprecated)) +# endif +#endif + /* the savable part, rest of data is local in ghostwinlay */ typedef struct wmWindow { struct wmWindow *next, *prev; @@ -197,6 +204,10 @@ typedef struct wmWindow { struct wmGesture *tweak; /* internal for wm_operators.c */ + /* Input Method Editor data - complex character input (esp. for asian character input) + * Currently WIN32, runtime-only data */ + struct wmIMEData *ime_data; + int drawmethod, drawfail; /* internal for wm_draw.c only */ void *drawdata; /* internal for wm_draw.c only */ @@ -208,6 +219,10 @@ typedef struct wmWindow { ListBase gesture; /* gesture stuff */ } wmWindow; +#ifdef ime_data +# undef ime_data +#endif + /* These two Lines with # tell makesdna this struct can be excluded. */ /* should be something like DNA_EXCLUDE * but the preprocessor first removes all comments, spaces etc */ @@ -352,13 +367,22 @@ enum { OPERATOR_RUNNING_MODAL = (1 << 0), OPERATOR_CANCELLED = (1 << 1), OPERATOR_FINISHED = (1 << 2), -/* add this flag if the event should pass through */ + /* add this flag if the event should pass through */ OPERATOR_PASS_THROUGH = (1 << 3), -/* in case operator got executed outside WM code... like via fileselect */ + /* in case operator got executed outside WM code... like via fileselect */ OPERATOR_HANDLED = (1 << 4), + /* used for operators that act indirectly (eg. popup menu) + * note: this isn't great design (using operators to trigger UI) avoid where possible. */ + OPERATOR_INTERFACE = (1 << 5), }; -#define OPERATOR_FLAGS_ALL (OPERATOR_RUNNING_MODAL | OPERATOR_CANCELLED | OPERATOR_FINISHED | \ - OPERATOR_PASS_THROUGH | OPERATOR_HANDLED) +#define OPERATOR_FLAGS_ALL ( \ + OPERATOR_RUNNING_MODAL | \ + OPERATOR_CANCELLED | \ + OPERATOR_FINISHED | \ + OPERATOR_PASS_THROUGH | \ + OPERATOR_HANDLED | \ + OPERATOR_INTERFACE | \ + 0) /* sanity checks for debug mode only */ #define OPERATOR_RETVAL_CHECK(ret) (void)ret, BLI_assert(ret != 0 && (ret & OPERATOR_FLAGS_ALL) == ret) diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h index 50542797f0b..2a9bcc20a9f 100644 --- a/source/blender/makesdna/DNA_world_types.h +++ b/source/blender/makesdna/DNA_world_types.h @@ -128,6 +128,7 @@ typedef struct World { /* nodes */ struct bNodeTree *nodetree; + ListBase gpumaterial; /* runtime */ } World; /* **************** WORLD ********************* */ diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index f60562f1ac9..4615a1ce9e4 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -92,7 +92,7 @@ * * While writing a file, the names of a struct is indicated with a type number, * to be found with: ``type = DNA_struct_find_nr(SDNA *, const char *)`` - * The value of ``type`` corresponds with the the index within the structs array + * The value of ``type`` corresponds with the index within the structs array * * For the moment: the complete DNA file is included in a .blend file. For * the future we can think of smarter methods, like only included the used |