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:
authorThomas Dinges <blender@dingto.org>2009-06-02 13:40:24 +0400
committerThomas Dinges <blender@dingto.org>2009-06-02 13:40:24 +0400
commitbfbb7d5d73b228c6eff7b94190ee30a0da6e526f (patch)
treea1cbf3988120618e864572c857479879d875afed /release/ui
parentad545fd9f6d0b6d8fd8aa3ba1e0a6f29a5a284cc (diff)
2.5 Constraints:
Wrapped IK and Rigid Body Joint constraint to Python. Note: Couldn't test Rigid constraint due to crash.
Diffstat (limited to 'release/ui')
-rw-r--r--release/ui/buttons_object_constraint.py53
1 files changed, 46 insertions, 7 deletions
diff --git a/release/ui/buttons_object_constraint.py b/release/ui/buttons_object_constraint.py
index a4ac6dfff86..593010128a2 100644
--- a/release/ui/buttons_object_constraint.py
+++ b/release/ui/buttons_object_constraint.py
@@ -15,8 +15,8 @@ class ConstraintButtonsPanel(bpy.types.Panel):
self.child_of(box, con)
elif con.type == "TRACK_TO":
self.track_to(box, con)
- #elif con.type == "IK":
- # self.ik(box, con)
+ elif con.type == "IK":
+ self.ik(box, con)
elif con.type == "FOLLOW_PATH":
self.follow_path(box, con)
elif con.type == "LIMIT_ROTATION":
@@ -43,7 +43,7 @@ class ConstraintButtonsPanel(bpy.types.Panel):
self.stretch_to(box, con)
elif con.type == "FLOOR":
self.floor(box, con)
- #elif con.type == "RIGID_BODY_JOINT"
+ #elif con.type == "RIGID_BODY_JOINT":
# self.rigid_body(box, con)
elif con.type == "CLAMP_TO":
self.clamp_to(box, con)
@@ -126,13 +126,30 @@ class ConstraintButtonsPanel(bpy.types.Panel):
self.space_template(layout, con)
- #def ik(self, layout, con):
-
+ def ik(self, layout, con):
+ self.target_template(layout, con)
+
+ layout.itemR(con, "pole_target")
+ layout.itemR(con, "pole_subtarget")
+
+ col = layout.column_flow()
+ col.itemR(con, "iterations")
+ col.itemR(con, "pole_angle")
+ col.itemR(con, "weight")
+ col.itemR(con, "orient_weight")
+ col.itemR(con, "chain_length")
+
+ col = layout.column_flow()
+ col.itemR(con, "tail")
+ col.itemR(con, "rotation")
+ col.itemR(con, "targetless")
+ col.itemR(con, "stretch")
+
def follow_path(self, layout, con):
self.target_template(layout, con)
row = layout.row()
- row.itemR(con, "curve_follow", toggle=True)
+ row.itemR(con, "curve_follow")
row.itemR(con, "offset")
row = layout.row()
@@ -394,7 +411,29 @@ class ConstraintButtonsPanel(bpy.types.Panel):
row.itemL(text="Min/Max:")
row.itemR(con, "floor_location", expand=True)
- #def rigid_body(self, layout, con):
+ def rigid_body(self, layout, con):
+ self.target_template(layout, con)
+
+ layout.itemR(con, "pivot_type")
+ layout.itemR(con, "child")
+
+ row = layout.row()
+ row.itemR(con, "disable_linked_collision", text="No Collision")
+ row.itemR(con, "draw_pivot")
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(con, "pivot_x")
+ col.itemR(con, "pivot_y")
+ col.itemR(con, "pivot_z")
+
+ col = split.column()
+ col.itemR(con, "axis_x")
+ col.itemR(con, "axis_y")
+ col.itemR(con, "axis_z")
+
+ #Missing: Limit arrays (not wrapped in RNA yet)
def clamp_to(self, layout, con):
self.target_template(layout, con)