diff options
author | Joshua Leung <aligorith@gmail.com> | 2006-12-18 13:17:40 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2006-12-18 13:17:40 +0300 |
commit | dbbf45875b9e95ececaea6f0e46ce2bf479b2012 (patch) | |
tree | 9b344010df9e3be0247b693109e1d13c18846125 /source/blender/src/buttons_object.c | |
parent | 019b13b83081a8df6ff2e06f0e25e3f59e5c88c6 (diff) |
== Scaling Constraints Working in Local-Space ==
* Patch #5442: "Fix Bone SizeLimit" by Heriberto Mendez (gammarayq21)
'Limit Scale' constraint can now work on bone's local scaling too.
* I've also made the 'Copy Scale' constraint able to use the local scaling
of bones too.
Diffstat (limited to 'source/blender/src/buttons_object.c')
-rw-r--r-- | source/blender/src/buttons_object.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index bb0909e9505..ea6df7997f5 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -752,6 +752,8 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s /* Draw XYZ toggles */ uiBlockBeginAlign(block); + if (is_armature_target) + uiDefButBitS(block, TOG, CONSTRAINT_LOCAL, B_CONSTRAINT_TEST, "Local", *xco+((width/2)-98), *yco-64, 50, 18, &con->flag, 0, 24, 0, 0, "Work on a Pose's local transform"); but=uiDefButI(block, TOG|BIT|0, B_CONSTRAINT_TEST, "X", *xco+((width/2)-48), *yco-64, 32, 18, &data->flag, 0, 24, 0, 0, "Copy X component"); but=uiDefButI(block, TOG|BIT|1, B_CONSTRAINT_TEST, "Y", *xco+((width/2)-16), *yco-64, 32, 18, &data->flag, 0, 24, 0, 0, "Copy Y component"); but=uiDefButI(block, TOG|BIT|2, B_CONSTRAINT_TEST, "Z", *xco+((width/2)+16), *yco-64, 32, 18, &data->flag, 0, 24, 0, 0, "Copy Z component"); @@ -1103,7 +1105,10 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s int togButWidth = 50; int textButWidth = ((width/2)-togButWidth); - height = 78; + if (ob->type == OB_ARMATURE && (ob->flag & OB_POSEMODE)) + height = 106; + else + height = 78; uiDefBut(block, ROUNDBOX, B_DIFF, "", *xco-10, *yco-height, width+40,height-1, NULL, 5.0, 0.0, 12, rb_col, ""); /* Draw Pairs of LimitToggle+LimitValue */ @@ -1138,6 +1143,13 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s uiDefButBitS(block, TOG, LIMIT_ZMAX, B_CONSTRAINT_TEST, "maxZ", *xco+(width-(textButWidth-5)-togButWidth), *yco-72, 50, 18, &data->flag, 0, 24, 0, 0, "Use maximum z value"); uiDefButF(block, NUM, B_CONSTRAINT_TEST, "", *xco+(width-textButWidth-5), *yco-72, (textButWidth-5), 18, &(data->zmax), 0.0001, 1000, 0.1,0.5,"Highest z value to allow"); uiBlockEndAlign(block); + + if (ob->type == OB_ARMATURE && (ob->flag & OB_POSEMODE)) { + uiBlockBeginAlign(block); + uiDefBut(block, LABEL, B_CONSTRAINT_TEST,"Co-ordinate Space:",*xco, *yco-100,150,18, NULL, 0.0, 0.0, 0.0, 0.0, ""); + uiDefButBitS(block, TOG, CONSTRAINT_LOCAL, B_CONSTRAINT_TEST, "Local", *xco+160, *yco-100, 60, 18, &con->flag, 0, 24, 0, 0, "Work on a Pose's local transform"); + uiBlockEndAlign(block); + } } break; case CONSTRAINT_TYPE_RIGIDBODYJOINT: |