diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index a7acf096448..1e0ece1c5e6 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1107,7 +1107,6 @@ Object *add_only_object(int type, const char *name) ob->obstacleRad = 1.; /* NT fluid sim defaults */ - ob->fluidsimFlag = 0; ob->fluidsimSettings = NULL; ob->pc_ids.first = ob->pc_ids.last = NULL; diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 678d0e1406f..fc0f3028a0e 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -8245,7 +8245,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) if(main->versionfile <= 233) { bScreen *sc; Material *ma= main->mat.first; - Object *ob= main->object.first; + /* Object *ob= main->object.first; */ while(ma) { if(ma->rampfac_col==0.0f) ma->rampfac_col= 1.0; @@ -8255,11 +8255,12 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } /* this should have been done loooong before! */ +#if 0 /* deprecated in 2.5+ */ while(ob) { if(ob->ipowin==0) ob->ipowin= ID_OB; ob= ob->id.next; } - +#endif for (sc= main->screen.first; sc; sc= sc->id.next) { ScrArea *sa; for (sa= sc->areabase.first; sa; sa= sa->next) { diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index d3473225095..f2997dc743d 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -1182,7 +1182,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event) base->object->min_vel= ob->min_vel; base->object->max_vel= ob->max_vel; if (ob->gameflag & OB_BOUNDS) { - base->object->boundtype = ob->boundtype; + base->object->collision_boundtype = ob->collision_boundtype; } base->object->margin= ob->margin; base->object->bsoft= copy_bulletsoftbody(ob->bsoft); diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 6a8e850a4ea..cb3bc2954e1 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -107,7 +107,7 @@ ((vd->drawtype==OB_TEXTURE && dt>OB_SOLID) || \ (vd->drawtype==OB_SOLID && vd->flag2 & V3D_SOLID_TEX)) -static void draw_bounding_volume(Scene *scene, Object *ob, short type); +static void draw_bounding_volume(Scene *scene, Object *ob, char type); static void drawcube_size(float size); static void drawcircle_size(float size); @@ -5469,7 +5469,7 @@ static void get_local_bounds(Object *ob, float center[3], float size[3]) } #endif -static void draw_bb_quadric(BoundBox *bb, short type) +static void draw_bb_quadric(BoundBox *bb, char type) { float size[3], cent[3]; GLUquadricObj *qobj = gluNewQuadric(); @@ -5508,7 +5508,7 @@ static void draw_bb_quadric(BoundBox *bb, short type) gluDeleteQuadric(qobj); } -static void draw_bounding_volume(Scene *scene, Object *ob, short type) +static void draw_bounding_volume(Scene *scene, Object *ob, char type) { BoundBox *bb= NULL; diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index d158f227df5..c5fd17e1bdb 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -164,9 +164,10 @@ typedef struct Object { short transflag, protectflag; /* transformation settings and transform locks */ short trackflag, upflag; short nlaflag, ipoflag; // xxx depreceated... old animation system - short ipowin, scaflag; /* ipowin: blocktype last ipowindow */ - short scavisflag, boundtype; - + short scaflag; /* ipowin: blocktype last ipowindow */ + char scavisflag; + char pad5; + int dupon, dupoff, dupsta, dupend; float sf, ctime; /* sf is time-offset, ctime is the objects current time (XXX timing needs to be revised) */ @@ -193,12 +194,16 @@ typedef struct Object { float min_vel; /* clamp the maximum velocity 0.0 is disabled */ float m_contactProcessingThreshold; float obstacleRad; - char pad0[4]; - + short rotmode; /* rotation mode - uses defines set out in DNA_action_types.h for PoseChannel rotations... */ - + + char boundtype; /* bounding box use for drawing */ + char collision_boundtype; /* bounding box type used for collision */ + + char restrictflag; /* for restricting view, select, render etc. accessible in outliner */ + char dt, dtx; - char empty_drawtype, pad1[3]; + char empty_drawtype; float empty_drawsize; float dupfacesca; /* dupliface scale */ @@ -206,7 +211,7 @@ typedef struct Object { ListBase sensors; ListBase controllers; ListBase actuators; - + float bbsize[3]; short index; /* custom index, for renderpasses */ unsigned short actdef; /* current deformation group, note: index starts at 1 */ @@ -242,16 +247,12 @@ typedef struct Object { struct PartDeflect *pd; /* particle deflector/attractor/collision data */ struct SoftBody *soft; /* if exists, saved in file */ struct Group *dup_group; /* object duplicator for group */ - - short fluidsimFlag; /* NT toggle fluidsim participation on/off */ - - short restrictflag; /* for restricting view, select, render etc. accessible in outliner */ - short shapenr, shapeflag; /* current shape key for menu or pinned, flag for pinning */ + char body_type; /* for now used to temporarily holds the type of collision object */ + char shapeflag; /* flag for pinning */ + short shapenr; /* current shape key for menu or pinned */ float smoothresh; /* smoothresh is phong interpolation ray_shadow correction in render */ - 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; @@ -265,9 +266,6 @@ typedef struct Object { ListBase *duplilist; /* for temporary dupli list storage, only for use by RNA API */ float ima_ofs[2]; /* offset for image empties */ - - short collision_boundtype; /* bounding box type used for collision */ - char pad3[6]; } Object; /* Warning, this is not used anymore because hooks are now modifiers */ diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 779d794cc10..57611d65e14 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -1648,7 +1648,7 @@ void BL_CreatePhysicsObjectNew(KX_GameObject* gameobj, } - objprop.m_concave = (blenderobject->boundtype & 4) != 0; + objprop.m_concave = (blenderobject->collision_boundtype == OB_BOUND_TRIANGLE_MESH); switch (physics_engine) {