UI:
* Add Lamp Fallof Curve and Texture Color Ramp panels. * Use button space context data. * A few other minor python layout script updates.
This commit is contained in:
@@ -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)
|
||||
bpy.types.register(BONE_PT_constraints)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user