diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-05-06 21:47:51 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-05-06 21:55:20 +0300 |
commit | 50999f7fb0964839225f05f0f23cbd6e806226d4 (patch) | |
tree | 8d45ffe36f0b44bdb82f50f4492b78dd6fb7a1fb /release/scripts/startup | |
parent | df1d990b6831fbc0b84363947fe2ef6c7d21c457 (diff) |
Maintain Volume: introduce an option switching between modes.
After a lot of thinking about this, I decided that all operation modes
that I've tried over the past couple of years, including the original
2.79 one, have their uses after all. Thus the only reasonable solution
is to add yet another option.
The modes are:
- Strict: The current 2.80 mode, which overrides the original scaling
of the non-free axes to strictly preserve the volume. This is the most
obvious way one would expect a 'Maintain Volume' constraint to work.
- Uniform: The original 2.79 mode, which assumes that all axes have been
scaled the same as the free one when computing the volume. This seems
strange, but the net effect is that when simply scaling the object
uniformly with S, the volume is preserved; however, scaling the non-
free axes individually allows deviating from the locked volume.
This was obviously intended as a more or less convenient UI tool.
- Single Axis: My own variant of the intent of the Uniform scale, which
does volume-preserving if the object is scaled just on the Free axis,
while passing the non-free axis scaling through. I.e. instead of
uniform S scaling, the user has to scale the object just on its
primary axis to achieve constant volume. This can allow reducing the
number of animation curves when only constant volume scaling is needed,
or be an easier to control tool inside a complex rig.
Diffstat (limited to 'release/scripts/startup')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_constraint.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py index a5353a4e29e..fec90fef590 100644 --- a/release/scripts/startup/bl_ui/properties_constraint.py +++ b/release/scripts/startup/bl_ui/properties_constraint.py @@ -430,6 +430,8 @@ class ConstraintButtonsPanel: def MAINTAIN_VOLUME(self, _context, layout, con): + layout.prop(con, "mode") + row = layout.row() row.label(text="Free:") row.prop(con, "free_axis", expand=True) |