[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40994] trunk/blender/source: rename confusing constants (no functional change)
Campbell Barton
ideasman42 at gmail.com
Fri Oct 14 00:14:42 CEST 2011
Revision: 40994
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40994
Author: campbellbarton
Date: 2011-10-13 22:14:41 +0000 (Thu, 13 Oct 2011)
Log Message:
-----------
rename confusing constants (no functional change)
- OB_BOUND_POLYT --> OB_BOUND_CONVEX_HULL
- OB_BOUND_POLYH --> OB_BOUND_TRIANGLE_MESH
Modified Paths:
--------------
trunk/blender/source/blender/makesdna/DNA_object_types.h
trunk/blender/source/blender/makesrna/intern/rna_object.c
trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp
Modified: trunk/blender/source/blender/makesdna/DNA_object_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_object_types.h 2011-10-13 21:43:02 UTC (rev 40993)
+++ trunk/blender/source/blender/makesdna/DNA_object_types.h 2011-10-13 22:14:41 UTC (rev 40994)
@@ -412,14 +412,14 @@
#define OB_EMPTY_IMAGE 8
/* boundtype */
-#define OB_BOUND_BOX 0
-#define OB_BOUND_SPHERE 1
-#define OB_BOUND_CYLINDER 2
-#define OB_BOUND_CONE 3
-#define OB_BOUND_POLYH 4
-#define OB_BOUND_POLYT 5
+#define OB_BOUND_BOX 0
+#define OB_BOUND_SPHERE 1
+#define OB_BOUND_CYLINDER 2
+#define OB_BOUND_CONE 3
+#define OB_BOUND_TRIANGLE_MESH 4
+#define OB_BOUND_CONVEX_HULL 5
/* #define OB_BOUND_DYN_MESH 6 */ /*UNUSED*/
-#define OB_BOUND_CAPSULE 7
+#define OB_BOUND_CAPSULE 7
/* **************** BASE ********************* */
Modified: trunk/blender/source/blender/makesrna/intern/rna_object.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_object.c 2011-10-13 21:43:02 UTC (rev 40993)
+++ trunk/blender/source/blender/makesrna/intern/rna_object.c 2011-10-13 22:14:41 UTC (rev 40994)
@@ -83,8 +83,8 @@
{OB_BOUND_SPHERE, "SPHERE", 0, "Sphere", ""},
{OB_BOUND_CYLINDER, "CYLINDER", 0, "Cylinder", ""},
{OB_BOUND_CONE, "CONE", 0, "Cone", ""},
- {OB_BOUND_POLYT, "CONVEX_HULL", 0, "Convex Hull", ""},
- {OB_BOUND_POLYH, "TRIANGLE_MESH", 0, "Triangle Mesh", ""},
+ {OB_BOUND_CONVEX_HULL, "CONVEX_HULL", 0, "Convex Hull", ""},
+ {OB_BOUND_TRIANGLE_MESH, "TRIANGLE_MESH", 0, "Triangle Mesh", ""},
{OB_BOUND_CAPSULE, "CAPSULE", 0, "Capsule", ""},
//{OB_DYN_MESH, "DYNAMIC_MESH", 0, "Dynamic Mesh", ""},
{0, NULL, 0, NULL, NULL}};
@@ -430,8 +430,8 @@
EnumPropertyItem *item= NULL;
int totitem= 0;
- RNA_enum_items_add_value(&item, &totitem, collision_bounds_items, OB_BOUND_POLYH);
- RNA_enum_items_add_value(&item, &totitem, collision_bounds_items, OB_BOUND_POLYT);
+ RNA_enum_items_add_value(&item, &totitem, collision_bounds_items, OB_BOUND_TRIANGLE_MESH);
+ RNA_enum_items_add_value(&item, &totitem, collision_bounds_items, OB_BOUND_CONVEX_HULL);
if(ob->body_type!=OB_BODY_TYPE_SOFT) {
RNA_enum_items_add_value(&item, &totitem, collision_bounds_items, OB_BOUND_CONE);
@@ -934,9 +934,9 @@
ob->gameflag &= ~(OB_RIGID_BODY|OB_OCCLUDER|OB_SENSOR|OB_NAVMESH);
/* assume triangle mesh, if no bounds chosen for soft body */
- if ((ob->gameflag & OB_BOUNDS) && (ob->boundtype<OB_BOUND_POLYH))
+ if ((ob->gameflag & OB_BOUNDS) && (ob->boundtype<OB_BOUND_TRIANGLE_MESH))
{
- ob->boundtype=OB_BOUND_POLYH;
+ ob->boundtype= OB_BOUND_TRIANGLE_MESH;
}
/* create a BulletSoftBody structure if not already existing */
if (!ob->bsoft)
@@ -1804,7 +1804,7 @@
{OB_BOUND_SPHERE, "SPHERE", 0, "Sphere", "Draw bounds as sphere"},
{OB_BOUND_CYLINDER, "CYLINDER", 0, "Cylinder", "Draw bounds as cylinder"},
{OB_BOUND_CONE, "CONE", 0, "Cone", "Draw bounds as cone"},
- {OB_BOUND_POLYH, "POLYHEDRON", 0, "Polyhedron", "Draw bounds as polyhedron"},
+ {OB_BOUND_TRIANGLE_MESH, "POLYHEDRON", 0, "Polyhedron", "Draw bounds as polyhedron"},
{OB_BOUND_CAPSULE, "CAPSULE", 0, "Capsule", "Draw bounds as capsule"},
{0, NULL, 0, NULL, NULL}};
Modified: trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp
===================================================================
--- trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp 2011-10-13 21:43:02 UTC (rev 40993)
+++ trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp 2011-10-13 22:14:41 UTC (rev 40994)
@@ -1590,7 +1590,7 @@
objprop.m_boundobject.box.m_extends[1]=2.f*bb.m_extends[1];
objprop.m_boundobject.box.m_extends[2]=2.f*bb.m_extends[2];
break;
- case OB_BOUND_POLYT:
+ case OB_BOUND_CONVEX_HULL:
if (blenderobject->type == OB_MESH)
{
objprop.m_boundclass = KX_BOUNDPOLYTOPE;
@@ -1598,7 +1598,7 @@
}
// Object is not a mesh... fall through OB_BOUND_POLYH to
// OB_BOUND_SPHERE
- case OB_BOUND_POLYH:
+ case OB_BOUND_TRIANGLE_MESH:
if (blenderobject->type == OB_MESH)
{
objprop.m_boundclass = KX_BOUNDMESH;
More information about the Bf-blender-cvs
mailing list