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:
authorLukas Tönne <lukas.toenne@gmail.com>2014-10-13 21:51:46 +0400
committerLukas Tönne <lukas.toenne@gmail.com>2014-10-13 21:58:53 +0400
commitf9cbb908a3fbd73970920def8356993b9e016d1d (patch)
tree7d9745c33b831bd1cafbcdd610a156f5322fd916 /release/scripts/startup/bl_ui/properties_constraint.py
parentaf346f991827fef81b21fe30370d84bc338d6461 (diff)
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
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_constraint.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_constraint.py14
1 files changed, 14 insertions, 0 deletions
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:")