UI:
* Fix context.cloth, was not being set correct. * Fix errors with context pinning, scripts should not assume context.object to be there. * Always show preview even if e.g. the material is not set, to keep ID buttons from jumping while you're using them.
This commit is contained in:
@@ -7,14 +7,14 @@ class DataButtonsPanel(bpy.types.Panel):
|
||||
__context__ = "data"
|
||||
|
||||
def poll(self, context):
|
||||
return (context.object.type == 'CURVE' and context.curve)
|
||||
return (context.object and context.object.type == 'CURVE' and context.curve)
|
||||
|
||||
class DATA_PT_shape_curve(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_shape_curve"
|
||||
__label__ = "Shape"
|
||||
|
||||
def poll(self, context):
|
||||
return (context.object.type == 'CURVE')
|
||||
return (context.object and context.object.type == 'CURVE')
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
@@ -144,4 +144,4 @@ class DATA_PT_current_curve(DataButtonsPanel):
|
||||
bpy.types.register(DATA_PT_shape_curve)
|
||||
bpy.types.register(DATA_PT_geometry)
|
||||
bpy.types.register(DATA_PT_pathanim)
|
||||
bpy.types.register(DATA_PT_current_curve)
|
||||
bpy.types.register(DATA_PT_current_curve)
|
||||
|
||||
Reference in New Issue
Block a user