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:
authorJoshua Leung <aligorith@gmail.com>2010-05-27 14:50:06 +0400
committerJoshua Leung <aligorith@gmail.com>2010-05-27 14:50:06 +0400
commit4ebc634168e0349c07c74fdf61defaad05db70f9 (patch)
tree0b75054def0d074a4cb245fee44e2974b4a76d4d /release
parent135f8be2c7933bb06b817ae204f867aff96040cc (diff)
== Pivot Constraint ==
This constraint allows an object or bone to have their rotations applied as if their origin/pivot-point was located elsewhere. The most obvious uses include foot-roll, see-saws, but could also include more complicated rolling-box examples. == Usage Examples == === Foot Roll === 1. Add 'Pivot' Constraint to the bone without any target. 2. Set the 'Y' value of the offset to the length of the bone. Usually this should be negative (if you rig with feet facing 'forwards' along -Y axis). This gives you a pivot point relative to the bone's (preconstraint) location, which should be at the tip of the bone here. Disabling the 'Use Relative Offset' would make this offset be relative to 0,0,0 instead of to the owner/bone-head. 3. Ensure that the 'Pivot When' setting is set to '-X Rot', (default) which means that the pivot will only used when the rotation on the X-Axis is negative to get tip-toe 'roll'. === See Saw === 1. Add a 'Pivot' constraint too see-saw plank object, this time with a target that you wish to have as the pivot-point. It's possible to do this without too (as before), but is less intuitive. 2. Optionally, if you want the plank slightly raised, set the z-offset value, which should make the pivot-point used to be relative to the target with the z-offset applied. 3. Ensure that 'Pivot When' is set to 'Always', which means that the pivot will always be used, irrespective of the rotation. == Notes == * The 'Pivot When' setting has been integrated in the constraint, since this is something that will often be required for these setups. Having to set up additional drivers to drive the constraint to do this kindof beats the purpose of providing this. * The 'Offset' functionality is probably not presented as clearly as it could be. We may need to go over this again. * For foot-roll - if any scaling of the foot is required, simply set up a driver on the y-offset to make this dynamically respond to the "scale" RNA property of the bones (don't use the "Transform Channel" vartype since that won't work correct here). However, this shouldn't be common enough to warrant special treatment.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/ui/properties_object_constraint.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/release/scripts/ui/properties_object_constraint.py b/release/scripts/ui/properties_object_constraint.py
index f53bac05a7c..11527ad9bda 100644
--- a/release/scripts/ui/properties_object_constraint.py
+++ b/release/scripts/ui/properties_object_constraint.py
@@ -76,7 +76,7 @@ class ConstraintButtonsPanel(bpy.types.Panel):
else:
layout.prop_object(con, "subtarget", con.target.data, "bones", text="")
- if con.type in ('COPY_LOCATION', 'STRETCH_TO', 'TRACK_TO'):
+ if con.type in ('COPY_LOCATION', 'STRETCH_TO', 'TRACK_TO', 'PIVOT'):
row = layout.row()
row.label(text="Head/Tail:")
row.prop(con, "head_tail", text="")
@@ -730,6 +730,22 @@ class ConstraintButtonsPanel(bpy.types.Panel):
col.prop(con, "xz_scaling_mode", text="")
col.prop(con, "use_curve_radius")
+ def PIVOT(self, context, layout, con, wide_ui):
+ self.target_template(layout, con, wide_ui)
+
+ if con.target:
+ col = layout.column()
+ col.prop(con, "offset", text="Pivot Offset")
+ else:
+ col = layout.column()
+ col.prop(con, "use_relative_position")
+ if con.use_relative_position:
+ col.prop(con, "offset", text="Relative Pivot Point")
+ else:
+ col.prop(con, "offset", text="Absolute Pivot Point")
+
+ col = layout.column()
+ col.prop(con, "enabled_rotation_range", text="Pivot When")
class OBJECT_PT_constraints(ConstraintButtonsPanel):
bl_label = "Object Constraints"