#include "DNA_listBase.h"
#include "DNA_ID.h"
-#include "DNA_scriptlink_types.h"
#ifdef __cplusplus
extern "C" {
struct bPose;
struct Object;
+struct AnimData;
struct Ipo;
struct BoundBox;
struct Path;
struct FluidsimSettings;
struct ParticleSystem;
struct DerivedMesh;
+struct SculptSession;
typedef struct bDeformGroup {
struct bDeformGroup *next, *prev;
typedef struct Object {
ID id;
+ struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
+ struct SculptSession *sculpt;
+
short type, partype;
int par1, par2, par3; /* can be vertexnrs */
char parsubstr[32]; /* String describing subobject info */
/* if ob->proxy (or proxy_group), this object is proxy for object ob->proxy */
/* proxy_from is set in target back to the proxy. */
struct Object *proxy, *proxy_group, *proxy_from;
- struct Ipo *ipo;
+ struct Ipo *ipo; // XXX depreceated... old animation system
struct Path *path;
struct BoundBox *bb;
- struct bAction *action;
+ struct bAction *action; // XXX depreceated... old animation system
struct bAction *poselib;
struct bPose *pose;
void *data;
- ListBase constraintChannels;
+ ListBase constraintChannels; // XXX depreceated... old animation system
ListBase effect;
ListBase disp;
ListBase defbase;
ListBase modifiers; /* list of ModifierData structures */
-
- struct Material **mat;
+
+ /* For now just a flag for sculpt mode, eventually we make the other modes local too */
+ int mode, pad2;
+
+ /* materials */
+ struct Material **mat; /* material slots */
+ char *matbits; /* 1 if material linked to object */
+ int totcol; /* copy of mesh or curve or meta */
+ int actcol; /* currently selected material in the UI */
/* rot en drot have to be together! (transform('r' en 's')) */
float loc[3], dloc[3], orig[3];
unsigned int lay; /* copy of Base */
short flag; /* copy of Base */
- short colbits; /* when zero, from obdata */
+ short colbits; /* deprecated */
- short transflag, ipoflag; /* transformation and ipo settings */
+ short transflag, protectflag; /* transformation settings and transform locks */
short trackflag, upflag;
- short nlaflag, protectflag; /* nlaflag defines NLA override, protectflag is bits to lock transform */
+ short nlaflag, ipoflag; // xxx depreceated... old animation system
short ipowin, scaflag; /* ipowin: blocktype last ipowindow */
short scavisflag, boundtype;
int dupon, dupoff, dupsta, dupend;
- float sf, ctime; /* sf is time-offset, ctime is the objects current time */
+ float sf, ctime; /* sf is time-offset, ctime is the objects current time (XXX timing needs to be revised) */
/* during realtime */
float formfactor;
float rdamping, sizefac;
-
+ float margin;
+ float max_vel; /* clamp the maximum velocity 0.0 is disabled */
+ float min_vel; /* clamp the maximum velocity 0.0 is disabled */
+ float m_contactProcessingThreshold;
+
char dt, dtx;
- char totcol; /* copy of mesh or curve or meta */
- char actcol; /* currently selected material in the user interface */
- char empty_drawtype, pad1[3];
+ char empty_drawtype, pad1[5];
float empty_drawsize;
float dupfacesca; /* dupliface scale */
- ScriptLink scriptlink;
ListBase prop;
ListBase sensors;
ListBase controllers;
* bit 15: Always ignore activity culling
*/
int gameflag2;
- short softflag; /* softboday settings */
+ struct BulletSoftBody *bsoft; /* settings for game engine bullet soft body */
+
+ short softflag; /* softbody settings */
short recalc; /* dependency flag */
float anisotropicFriction[3];
ListBase constraints;
- ListBase nlastrips;
+ ListBase nlastrips; // XXX depreceated... old animation system
ListBase hooks;
ListBase particlesystem; /* particle systems */
short shapenr, shapeflag; /* current shape key for menu or pinned, flag for pinning */
float smoothresh; /* smoothresh is phong interpolation ray_shadow correction in render */
- short recalco, pad4; /* recalco for temp storage of ob->recalc, bad design warning */
+ short recalco; /* recalco for temp storage of ob->recalc, bad design warning */
+ short body_type; /* for now used to temporarily holds the type of collision object */
struct FluidsimSettings *fluidsimSettings; /* if fluidsim enabled, store additional settings */
struct DerivedMesh *derivedDeform, *derivedFinal;
int lastDataMask; /* the custom data layer mask that was last used to calculate derivedDeform and derivedFinal */
- int pad;
+ 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 */
+
+ int restore_mode; /* Keep track of what mode to return to after edit mode exits */
-/*#ifdef WITH_VERSE*/
- void *vnode; /* pointer at object VerseNode */
-/*#endif*/
+ ListBase gpulamp; /* runtime, for lamps only */
} Object;
/* Warning, this is not used anymore because hooks are now modifiers */
#define OB_RENDER_DUPLI 4096
/* (short) ipoflag */
+ // XXX depreceated - old animation system crap
#define OB_DRAWKEY 1
#define OB_DRAWKEYSEL 2
#define OB_OFFS_OB 4
#define OB_SHADED 4
#define OB_TEXTURE 5
-/* this condition has been made more complex since editmode can draw textures */
-#define CHECK_OB_DRAWTEXTURE(vd, dt) \
- ((vd->drawtype==OB_TEXTURE && dt>OB_SOLID) || \
- (vd->drawtype==OB_SOLID && vd->flag2 & V3D_SOLID_TEX))
-
-#define CHECK_OB_DRAWFACEDOT(sce, vd, dt) \
- ( (sce->selectmode & SCE_SELECT_FACE) && \
- (vd->drawtype<=OB_SOLID) && \
- (((vd->drawtype==OB_SOLID) && (dt>=OB_SOLID) && (vd->flag2 & V3D_SOLID_TEX) && (vd->flag & V3D_ZBUF_SELECT)) == 0) \
- )
-
-
/* dtx: flags, char! */
#define OB_AXIS 2
#define OB_TEXSPACE 4
#define BA_FROMSET 128
+#define BA_TRANSFORM_CHILD 256 /* child of a transformed object */
+
/* an initial attempt as making selection more specific! */
#define BA_DESELECT 0
#define BA_SELECT 1
#define OB_DONE 1024
#define OB_RADIO 2048
#define OB_FROMGROUP 4096
-#define OB_POSEMODE 8192
/* ob->recalc (flag bits!) */
#define OB_RECALC_OB 1
#define OB_RECALC_TIME 4
#define OB_RECALC 7
+
/* ob->gameflag */
#define OB_DYNAMIC 1
#define OB_CHILD 2
#define OB_PROP 16384
#define OB_MAINACTOR 32768
+#define OB_COLLISION 65536
+#define OB_SOFT_BODY 0x20000
+#define OB_OCCLUDER 0x40000
+#define OB_SENSOR 0x80000
+
/* ob->gameflag2 */
#define OB_NEVER_DO_ACTIVITY_CULLING 1
+#define OB_LOCK_RIGID_BODY_X_AXIS 4
+#define OB_LOCK_RIGID_BODY_Y_AXIS 8
+#define OB_LOCK_RIGID_BODY_Z_AXIS 16
+#define OB_LOCK_RIGID_BODY_X_ROT_AXIS 32
+#define OB_LOCK_RIGID_BODY_Y_ROT_AXIS 64
+#define OB_LOCK_RIGID_BODY_Z_ROT_AXIS 128
#define OB_LIFE (OB_PROP|OB_DYNAMIC|OB_ACTOR|OB_MAINACTOR|OB_CHILD)
+/* ob->body_type */
+#define OB_BODY_TYPE_NO_COLLISION 0
+#define OB_BODY_TYPE_STATIC 1
+#define OB_BODY_TYPE_DYNAMIC 2
+#define OB_BODY_TYPE_RIGID 3
+#define OB_BODY_TYPE_SOFT 4
+#define OB_BODY_TYPE_OCCLUDER 5
+#define OB_BODY_TYPE_SENSOR 6
+
/* ob->scavisflag */
#define OB_VIS_SENS 1
#define OB_VIS_CONT 2
#define OB_ADDCONT 512
#define OB_ADDACT 1024
#define OB_SHOWCONT 2048
+#define OB_SETSTBIT 4096
+#define OB_INITSTBIT 8192
+#define OB_DEBUGSTATE 16384
/* ob->restrictflag */
#define OB_RESTRICT_VIEW 1
#define OB_SHAPE_TEMPLOCK 2
/* ob->nlaflag */
-#define OB_NLA_OVERRIDE 1
-#define OB_NLA_COLLAPSED 2
+ // XXX depreceated - old animation system
+#define OB_NLA_OVERRIDE (1<<0)
+#define OB_NLA_COLLAPSED (1<<1)
+
+ /* object-channel expanded status */
+#define OB_ADS_COLLAPSED (1<<10)
+ /* object's ipo-block */
+#define OB_ADS_SHOWIPO (1<<11)
+ /* object's constraint channels */
+#define OB_ADS_SHOWCONS (1<<12)
+ /* object's material channels */
+#define OB_ADS_SHOWMATS (1<<13)
+ /* object's marticle channels */
+#define OB_ADS_SHOWPARTS (1<<14)
/* ob->protectflag */
#define OB_LOCK_LOCX 1
#define OB_LOCK_ROTX 8
#define OB_LOCK_ROTY 16
#define OB_LOCK_ROTZ 32
+#define OB_LOCK_ROT 56
#define OB_LOCK_SCALEX 64
#define OB_LOCK_SCALEY 128
#define OB_LOCK_SCALEZ 256
+#define OB_LOCK_SCALE 448
+
+/* ob->mode */
+#define OB_MODE_OBJECT 0
+#define OB_MODE_EDIT 1
+#define OB_MODE_SCULPT 2
+#define OB_MODE_VERTEX_PAINT 4
+#define OB_MODE_WEIGHT_PAINT 8
+#define OB_MODE_TEXTURE_PAINT 16
+#define OB_MODE_PARTICLE_EDIT 32
+#define OB_MODE_POSE 64
/* ob->softflag in DNA_object_force.h */