Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwin Coumans <blender@erwincoumans.com>2008-10-10 09:12:57 +0400
committerErwin Coumans <blender@erwincoumans.com>2008-10-10 09:12:57 +0400
commit0749bf7be70e32b8fd4dd09839bce0267dbe9b29 (patch)
treed72c85ba6eb4c09cdd4dfb950c81a9d847f4239c /source/blender
parent41ad6f9d0a5923a5f4607417c607d37a10317ee1 (diff)
Fix bug in rigid body constraint buttons drawing, and while we are at it, add 'Collision' button to disable collisions between bodies, linked between constraint.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h1
-rw-r--r--source/blender/src/buttons_object.c13
2 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
index ecfb7dc7a90..fe19cf60f12 100644
--- a/source/blender/makesdna/DNA_constraint_types.h
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -520,6 +520,7 @@ typedef enum B_CONSTRAINTCHANNEL_FLAG {
/* Rigid-Body Constraint */
#define CONSTRAINT_DRAW_PIVOT 0x40
+#define CONSTRAINT_DISABLE_LINKED_COLLISION 0x80
/* important: these defines need to match up with PHY_DynamicTypes headerfile */
#define CONSTRAINT_RB_BALL 1
diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c
index 8ba56b84305..fceba115767 100644
--- a/source/blender/src/buttons_object.c
+++ b/source/blender/src/buttons_object.c
@@ -1497,16 +1497,20 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
int offsetY = 150;
int textButWidth = ((width/2)-togButWidth);
- uiDefButI(block, MENU, B_CONSTRAINT_TEST, "Joint Types%t|Ball%x1|Hinge%x2|Cone Twist%x4|Generic (experimental)%x12",//|Extra Force%x6",
- *xco, *yco-25, 150, 18, &data->type, 0, 0, 0, 0, "Choose the joint type");
height = 140;
if (data->type==CONSTRAINT_RB_GENERIC6DOF)
height = 270;
if (data->type==CONSTRAINT_RB_CONETWIST)
height = 200;
- uiDefBut(block, ROUNDBOX, B_DIFF, "", *xco-10, *yco-height, width+40,height-1, NULL, 5.0, 0.0, 12, rb_col, "");
-
+ uiDefBut(block, ROUNDBOX, B_DIFF, "", *xco-10, *yco-height, width+40,height-1, NULL, 5.0, 0.0, 12, rb_col, "");
+
+ uiDefButI(block, MENU, B_CONSTRAINT_TEST, "Joint Types%t|Ball%x1|Hinge%x2|Cone Twist%x4|Generic (experimental)%x12",//|Extra Force%x6",
+ *xco, *yco-25, 150, 18, &data->type, 0, 0, 0, 0, "Choose the joint type");
+
+ uiDefButBitS(block, TOG, CONSTRAINT_DISABLE_LINKED_COLLISION, B_CONSTRAINT_TEST, "Collision", *xco+155, *yco-25, 111, 18, &data->flag, 0, 24, 0, 0, "Enable Collision Between Linked Bodies");
+
+
uiDefIDPoinBut(block, test_obpoin_but, ID_OB, B_CONSTRAINT_CHANGETARGET, "toObject:", *xco, *yco-50, 130, 18, &data->tar, "Child Object");
uiDefButBitS(block, TOG, CONSTRAINT_DRAW_PIVOT, B_CONSTRAINT_TEST, "ShowPivot", *xco+135, *yco-50, 130, 18, &data->flag, 0, 24, 0, 0, "Show pivot position and rotation");
@@ -1586,6 +1590,7 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
uiDefButF(block, NUM, B_CONSTRAINT_TEST, "", *xco+(width-textButWidth-5), *yco-offsetY, (textButWidth), 18, &(data->maxLimit[5]), -extremeAngZ, extremeAngZ, 0.1,0.5,"max z limit");
uiBlockEndAlign(block);
}
+
}
break;
case CONSTRAINT_TYPE_CLAMPTO: