diff options
Diffstat (limited to 'source/blender/makesdna/DNA_object_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_object_types.h | 88 |
1 files changed, 62 insertions, 26 deletions
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index e0b4d117bd1..0b7dccee9ab 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -67,6 +67,31 @@ typedef struct bDeformGroup { /* need this flag for locking weights */ char flag, pad[7]; } bDeformGroup; + +/* Face Maps*/ +typedef struct bFaceMap { + struct bFaceMap *next, *prev; + char name[64]; /* MAX_VGROUP_NAME */ + char flag; + char pad[7]; +} bFaceMap; + +/* Object Runtime display data */ +struct ObjectEngineData; +typedef void (*ObjectEngineDataInitCb)(struct ObjectEngineData *engine_data); +typedef void (*ObjectEngineDataFreeCb)(struct ObjectEngineData *engine_data); + +# +# +typedef struct ObjectEngineData { + struct ObjectEngineData *next, *prev; + struct DrawEngineType *engine_type; + /* Only nested data, NOT the engine data itself. */ + ObjectEngineDataFreeCb free; + /* Accumulated recalc flags, which corresponds to ID->recalc flags. */ + int recalc; +} ObjectEngineData; + #define MAX_VGROUP_NAME 64 /* bDeformGroup->flag */ @@ -145,9 +170,7 @@ typedef struct Object { ListBase effect DNA_DEPRECATED; // XXX deprecated... keep for readfile ListBase defbase; /* list of bDeformGroup (vertex groups) names and flag only */ ListBase modifiers; /* list of ModifierData structures */ - - int mode; /* Local object mode */ - int restore_mode; /* Keep track of what mode to return to after toggling a mode */ + ListBase fmaps; /* list of facemaps */ /* materials */ struct Material **mat; /* material slots */ @@ -188,11 +211,11 @@ typedef struct Object { short nlaflag; /* used for DopeSheet filtering settings (expanded/collapsed) */ short scaflag; /* ui state for game logic */ char scavisflag; /* more display settings for game logic */ - char depsflag; + char pad; /* did last modifier stack generation need mapping support? */ char lastNeedMapping; /* bool */ - char pad; + char duplicator_visibility_flag; /* dupli-frame settings */ int dupon, dupoff, dupsta, dupend; @@ -226,7 +249,10 @@ typedef struct Object { float jump_speed; float fall_speed; unsigned char max_jumps; - char pad2[3]; + char pad2; + + /* Depsgraph */ + short base_flag; /* used by depsgraph, flushed from base */ /** Collision mask settings */ unsigned short col_group, col_mask; @@ -251,13 +277,15 @@ typedef struct Object { short index; /* custom index, for renderpasses */ unsigned short actdef; /* current deformation group, note: index starts at 1 */ + unsigned short actfmap; /* current face map, note: index starts at 1 */ + unsigned char pad5[6]; float col[4]; /* object color */ int gameflag; int gameflag2; char restrictflag; /* for restricting view, select, render etc. accessible in outliner */ - char recalc; /* dependency flag */ + char pad3; short softflag; /* softbody settings */ float anisotropicFriction[3]; @@ -278,15 +306,16 @@ typedef struct Object { struct FluidsimSettings *fluidsimSettings; /* if fluidsim enabled, store additional settings */ - /* Runtime valuated curve-specific data, not stored in the file */ - struct CurveCache *curve_cache; - struct DerivedMesh *derivedDeform, *derivedFinal; + void *pad7; uint64_t lastDataMask; /* the custom data layer mask that was last used to calculate derivedDeform and derivedFinal */ uint64_t customdata_mask; /* (extra) custom data layer mask to use for creating derivedmesh, set by depsgraph */ unsigned int state; /* bit masks of game controllers that are active */ unsigned int init_state; /* bit masks of initial state as recorded by the users */ + /* Runtime valuated curve-specific data, not stored in the file */ + struct CurveCache *curve_cache; + ListBase gpulamp; /* runtime, for glsl lamp display only */ ListBase pc_ids; ListBase *duplilist; /* for temporary dupli list storage, only for use by RNA API */ @@ -296,12 +325,23 @@ typedef struct Object { float ima_ofs[2]; /* offset for image empties */ ImageUser *iuser; /* must be non-null when oject is an empty image */ - void *pad3; + void *pad4; ListBase lodlevels; /* contains data for levels of detail */ LodLevel *currentlod; struct PreviewImage *preview; + + struct IDProperty *base_collection_properties; /* used by depsgraph, flushed from base */ + + ListBase drawdata; /* runtime, ObjectEngineData */ + int pad6; + int select_color; + + /* Mesh structure createrd during object evaluaiton. + * It has all modifiers applied. + */ + struct Mesh *mesh_evaluated; } Object; /* Warning, this is not used anymore because hooks are now modifiers */ @@ -340,6 +380,7 @@ typedef struct DupliObject { struct ParticleSystem *particle_system; unsigned int random_id; unsigned int pad; + struct IDProperty *collection_properties; } DupliObject; /* **************** OBJECT ********************* */ @@ -360,6 +401,7 @@ enum { OB_CAMERA = 11, OB_SPEAKER = 12, + OB_LIGHTPROBE = 13, /* OB_WAVE = 21, */ OB_LATTICE = 22, @@ -380,10 +422,10 @@ enum { /* is this ID type used as object data */ #define OB_DATA_SUPPORT_ID(_id_type) \ - (ELEM(_id_type, ID_ME, ID_CU, ID_MB, ID_LA, ID_SPK, ID_CA, ID_LT, ID_AR)) + (ELEM(_id_type, ID_ME, ID_CU, ID_MB, ID_LA, ID_SPK, ID_LP, ID_CA, ID_LT, ID_AR)) #define OB_DATA_SUPPORT_ID_CASE \ - ID_ME: case ID_CU: case ID_MB: case ID_LA: case ID_SPK: case ID_CA: case ID_LT: case ID_AR + ID_ME: case ID_CU: case ID_MB: case ID_LA: case ID_SPK: case ID_LP: case ID_CA: case ID_LT: case ID_AR /* partype: first 4 bits: type */ enum { @@ -515,12 +557,6 @@ enum { #define BA_TRANSFORM_CHILD (1 << 8) /* child of a transformed object */ #define BA_TRANSFORM_PARENT (1 << 13) /* parent of a transformed object */ - -/* an initial attempt as making selection more specific! */ -#define BA_DESELECT 0 -#define BA_SELECT 1 - - #define OB_FROMDUPLI (1 << 9) #define OB_DONE (1 << 10) /* unknown state, clear before use */ /* #define OB_RADIO (1 << 11) */ /* deprecated */ @@ -600,12 +636,6 @@ enum { OB_BODY_TYPE_CHARACTER = 8, }; -/* ob->depsflag */ -enum { - OB_DEPS_EXTRA_OB_RECALC = 1 << 0, - OB_DEPS_EXTRA_DATA_RECALC = 1 << 1, -}; - /* ob->scavisflag */ enum { OB_VIS_SENS = 1 << 0, @@ -673,7 +703,13 @@ enum { OB_LOCK_ROTW = 1 << 9, OB_LOCK_ROT4D = 1 << 10, }; - + +/* ob->duplicator_visibility_flag */ +enum { + OB_DUPLI_FLAG_VIEWPORT = 1 << 0, + OB_DUPLI_FLAG_RENDER = 1 << 1, +}; + #define MAX_DUPLI_RECUR 8 #ifdef __cplusplus |