From f9cbb908a3fbd73970920def8356993b9e016d1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20T=C3=B6nne?= Date: Mon, 13 Oct 2014 19:51:46 +0200 Subject: Integrated limits for volume preservation in stretch-to constraints. Currently the volume variation feature in stretch constraints is unlimited. This has to be compensated by riggers by adding scale limit constraints, but these are unaware of the stretch orientation and can lead to flipping. Also the stretch calculation itself is not working properly and can lead to collapsing volume. The patch fixes this with several modifications: - Interpret the volume variation factor as exponent, which works better with large values for artistic purposes. - Add integrated limits to the volume "bulge" factor, so secondary constraints for compensation become unnecessary - Add a smoothness factor to make limits less visible. Eventually a generic volume preservation constraint would be nicer, because multiple constraints currently implement volume variation of their own. This feature could actually work very nicely independent from other constraint features. Differential Revision: https://developer.blender.org/D826 --- release/scripts/startup/bl_ui/properties_constraint.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'release/scripts/startup/bl_ui/properties_constraint.py') diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py index 4baf31a591b..e6b62cae6ef 100644 --- a/release/scripts/startup/bl_ui/properties_constraint.py +++ b/release/scripts/startup/bl_ui/properties_constraint.py @@ -502,6 +502,20 @@ class ConstraintButtonsPanel(): row.operator("constraint.stretchto_reset", text="Reset") layout.prop(con, "bulge", text="Volume Variation") + split = layout.split() + col = split.column(align=True) + col.prop(con, "use_bulge_min", text="Volume Min") + sub = col.column() + sub.active = con.use_bulge_min + sub.prop(con, "bulge_min", text="") + col = split.column(align=True) + col.prop(con, "use_bulge_max", text="Volume Max") + sub = col.column() + sub.active = con.use_bulge_max + sub.prop(con, "bulge_max", text="") + col = layout.column() + col.active = con.use_bulge_min or con.use_bulge_max + col.prop(con, "bulge_smooth", text="Smooth") row = layout.row() row.label(text="Volume:") -- cgit v1.2.3