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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-06-03 04:17:35 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-06-03 04:17:35 +0400
commitdc7d0ef474d235b59c4889b8fdb2eb1551f3df83 (patch)
tree343e9f02b6080c1f00a6708995ea0238df95ecd5 /release/ui/buttons_object_constraint.py
parentabfc3daaf4dc6234ac4a48e72747a0b3fa559d2c (diff)
UI:
* Add Lamp Fallof Curve and Texture Color Ramp panels. * Use button space context data. * A few other minor python layout script updates.
Diffstat (limited to 'release/ui/buttons_object_constraint.py')
-rw-r--r--release/ui/buttons_object_constraint.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/release/ui/buttons_object_constraint.py b/release/ui/buttons_object_constraint.py
index 593010128a2..5b32124ff33 100644
--- a/release/ui/buttons_object_constraint.py
+++ b/release/ui/buttons_object_constraint.py
@@ -43,8 +43,8 @@ class ConstraintButtonsPanel(bpy.types.Panel):
self.stretch_to(box, con)
elif con.type == "FLOOR":
self.floor(box, con)
- #elif con.type == "RIGID_BODY_JOINT":
- # self.rigid_body(box, con)
+ elif con.type == "RIGID_BODY_JOINT":
+ self.rigid_body(box, con)
elif con.type == "CLAMP_TO":
self.clamp_to(box, con)
elif con.type == "TRANSFORM":
@@ -512,11 +512,10 @@ class OBJECT_PT_constraints(ConstraintButtonsPanel):
__context__ = "object"
def poll(self, context):
- ob = context.active_object
- return (ob != None)
+ return (context.object != None)
def draw(self, context):
- ob = context.active_object
+ ob = context.object
layout = self.layout
row = layout.row()
@@ -532,12 +531,12 @@ class BONE_PT_constraints(ConstraintButtonsPanel):
__context__ = "bone"
def poll(self, context):
- ob = context.active_object
+ ob = context.object
return (ob and ob.type == "ARMATURE")
def draw(self, context):
- ob = context.active_object
- pchan = ob.pose.pose_channels[0]
+ ob = context.object
+ pchan = ob.pose.pose_channels[0] # XXX
layout = self.layout
#row = layout.row()
@@ -548,4 +547,5 @@ class BONE_PT_constraints(ConstraintButtonsPanel):
self.draw_constraint(con)
bpy.types.register(OBJECT_PT_constraints)
-bpy.types.register(BONE_PT_constraints) \ No newline at end of file
+bpy.types.register(BONE_PT_constraints)
+