diff options
author | Roland Hess <me@harkyman.com> | 2010-03-16 15:55:56 +0300 |
---|---|---|
committer | Roland Hess <me@harkyman.com> | 2010-03-16 15:55:56 +0300 |
commit | d617294c49912b1b0473bbbe58f62a3549641482 (patch) | |
tree | bbbb6645fb501d566047a43a0222137aacd50f93 /release/scripts | |
parent | 1cf95d2494ab82af61153abc3c45fa1a4fd3a4ed (diff) |
New "Maintain Volume" constraint. When attached to a bone, you specify a "free" axis. Upon scaling, this free axis scales normally, but the constraint forces the other two axes to adjust themselves appropriately so that overall bone volume is maintained. So, setting "Y" as the free axis (the default) creates a bone that automatically squashes and stretches when scaling. Thanks to Aligorith, Fweeb, Cessen and others for the feedback.
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/ui/properties_object_constraint.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/release/scripts/ui/properties_object_constraint.py b/release/scripts/ui/properties_object_constraint.py index 30f2b1ef49f..47306dd92ac 100644 --- a/release/scripts/ui/properties_object_constraint.py +++ b/release/scripts/ui/properties_object_constraint.py @@ -461,6 +461,17 @@ class ConstraintButtonsPanel(bpy.types.Panel): self.space_template(layout, con, wide_ui) + def MAINTAIN_VOLUME(self, context, layout, con, wide_ui): + + row = layout.row() + if wide_ui: + row.label(text="Free:") + row.prop(con, "axis", expand=True) + + layout.prop(con, "volume") + + self.space_template(layout, con, wide_ui) + def COPY_TRANSFORMS(self, context, layout, con, wide_ui): self.target_template(layout, con, wide_ui) |