patch from William, panel names need to be unique
This commit is contained in:
@@ -9,8 +9,8 @@ class DataButtonsPanel(bpy.types.Panel):
|
||||
def poll(self, context):
|
||||
return (context.armature != None)
|
||||
|
||||
class DATA_PT_contextarm(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_contextarm"
|
||||
class DATA_PT_context_arm(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_context_arm"
|
||||
__label__ = " "
|
||||
|
||||
def poll(self, context):
|
||||
@@ -138,7 +138,7 @@ class DATA_PT_ghost(DataButtonsPanel):
|
||||
sub = split.column()
|
||||
sub.itemR(arm, "ghost_only_selected", text="Selected Only")
|
||||
|
||||
bpy.types.register(DATA_PT_contextarm)
|
||||
bpy.types.register(DATA_PT_context_arm)
|
||||
bpy.types.register(DATA_PT_skeleton)
|
||||
bpy.types.register(DATA_PT_display)
|
||||
bpy.types.register(DATA_PT_paths)
|
||||
|
||||
@@ -9,8 +9,8 @@ class BoneButtonsPanel(bpy.types.Panel):
|
||||
def poll(self, context):
|
||||
return (context.bone or context.edit_bone)
|
||||
|
||||
class BONE_PT_context(BoneButtonsPanel):
|
||||
__idname__ = "BONE_PT_context"
|
||||
class BONE_PT_context_bone(BoneButtonsPanel):
|
||||
__idname__ = "BONE_PT_context_bone"
|
||||
__label__ = " "
|
||||
|
||||
def draw(self, context):
|
||||
@@ -92,6 +92,6 @@ class BONE_PT_deform(BoneButtonsPanel):
|
||||
sub.itemR(bone, "cyclic_offset")
|
||||
|
||||
|
||||
bpy.types.register(BONE_PT_context)
|
||||
bpy.types.register(BONE_PT_context_bone)
|
||||
bpy.types.register(BONE_PT_bone)
|
||||
bpy.types.register(BONE_PT_deform)
|
||||
|
||||
@@ -9,8 +9,8 @@ class DataButtonsPanel(bpy.types.Panel):
|
||||
def poll(self, context):
|
||||
return (context.camera != None)
|
||||
|
||||
class DATA_PT_context(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_context"
|
||||
class DATA_PT_context_camera(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_context_camera"
|
||||
__label__ = " "
|
||||
|
||||
def poll(self, context):
|
||||
@@ -101,6 +101,6 @@ class DATA_PT_camera_display(DataButtonsPanel):
|
||||
colsub.itemR(cam, "passepartout_alpha", text="Alpha", slider=True)
|
||||
col.itemR(cam, "draw_size", text="Size")
|
||||
|
||||
bpy.types.register(DATA_PT_context)
|
||||
bpy.types.register(DATA_PT_context_camera)
|
||||
bpy.types.register(DATA_PT_camera)
|
||||
bpy.types.register(DATA_PT_camera_display)
|
||||
|
||||
@@ -10,8 +10,8 @@ class DataButtonsPanel(bpy.types.Panel):
|
||||
return (context.object and context.object.type == 'CURVE' and context.curve)
|
||||
|
||||
|
||||
class DATA_PT_context(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_context"
|
||||
class DATA_PT_context_curve(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_context_curve"
|
||||
__label__ = " "
|
||||
|
||||
def poll(self, context):
|
||||
@@ -78,9 +78,9 @@ class DATA_PT_shape_curve(DataButtonsPanel):
|
||||
# sub.itemL(text="NORMALS")
|
||||
# sub.itemR(curve, "vertex_normal_flip")
|
||||
|
||||
class DATA_PT_geometry(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_geometry"
|
||||
__label__ = "Geometry"
|
||||
class DATA_PT_geometry_curve(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_geometry_curve"
|
||||
__label__ = "Geometry "
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
@@ -92,13 +92,13 @@ class DATA_PT_geometry(DataButtonsPanel):
|
||||
sub.itemL(text="Modification:")
|
||||
sub.itemR(curve, "width")
|
||||
sub.itemR(curve, "extrude")
|
||||
sub.itemR(curve, "taper_object")
|
||||
sub.itemR(curve, "taper_object", icon="ICON_OUTLINER_OB_CURVE")
|
||||
|
||||
sub = split.column()
|
||||
sub.itemL(text="Bevel:")
|
||||
sub.itemR(curve, "bevel_depth", text="Depth")
|
||||
sub.itemR(curve, "bevel_resolution", text="Resolution")
|
||||
sub.itemR(curve, "bevel_object")
|
||||
sub.itemR(curve, "bevel_object", icon="ICON_OUTLINER_OB_CURVE")
|
||||
|
||||
class DATA_PT_pathanim(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_pathanim"
|
||||
@@ -158,8 +158,8 @@ class DATA_PT_current_curve(DataButtonsPanel):
|
||||
sub.itemR(currentcurve, "radius_interpolation", text="Tilt")
|
||||
sub.itemR(currentcurve, "smooth")
|
||||
|
||||
bpy.types.register(DATA_PT_context)
|
||||
bpy.types.register(DATA_PT_context_curve)
|
||||
bpy.types.register(DATA_PT_shape_curve)
|
||||
bpy.types.register(DATA_PT_geometry)
|
||||
bpy.types.register(DATA_PT_geometry_curve)
|
||||
bpy.types.register(DATA_PT_pathanim)
|
||||
bpy.types.register(DATA_PT_current_curve)
|
||||
|
||||
@@ -19,8 +19,8 @@ class DATA_PT_preview(DataButtonsPanel):
|
||||
lamp = context.lamp
|
||||
layout.template_preview(lamp)
|
||||
|
||||
class DATA_PT_context(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_context"
|
||||
class DATA_PT_context_lamp(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_context_lamp"
|
||||
__label__ = " "
|
||||
|
||||
def poll(self, context):
|
||||
@@ -257,7 +257,7 @@ class DATA_PT_falloff_curve(DataButtonsPanel):
|
||||
|
||||
layout.template_curve_mapping(lamp.falloff_curve)
|
||||
|
||||
bpy.types.register(DATA_PT_context)
|
||||
bpy.types.register(DATA_PT_context_lamp)
|
||||
bpy.types.register(DATA_PT_preview)
|
||||
bpy.types.register(DATA_PT_lamp)
|
||||
bpy.types.register(DATA_PT_shadow)
|
||||
|
||||
@@ -9,8 +9,8 @@ class DataButtonsPanel(bpy.types.Panel):
|
||||
def poll(self, context):
|
||||
return (context.lattice != None)
|
||||
|
||||
class DATA_PT_context(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_context"
|
||||
class DATA_PT_context_lattice(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_context_lattice"
|
||||
__label__ = " "
|
||||
|
||||
def poll(self, context):
|
||||
@@ -64,5 +64,5 @@ class DATA_PT_lattice(DataButtonsPanel):
|
||||
row.itemO("LATTICE_OT_make_regular")
|
||||
row.itemR(lat, "outside")
|
||||
|
||||
bpy.types.register(DATA_PT_context)
|
||||
bpy.types.register(DATA_PT_context_lattice)
|
||||
bpy.types.register(DATA_PT_lattice)
|
||||
|
||||
@@ -10,8 +10,8 @@ class DataButtonsPanel(bpy.types.Panel):
|
||||
return (context.mesh != None)
|
||||
|
||||
|
||||
class DATA_PT_context2(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_context2"
|
||||
class DATA_PT_context_mesh(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_context_mesh"
|
||||
__label__ = " "
|
||||
|
||||
def poll(self, context):
|
||||
@@ -222,7 +222,7 @@ class DATA_PT_vertex_colors(DataButtonsPanel):
|
||||
col.itemO("MESH_OT_vertex_color_add", icon="ICON_ZOOMIN", text="")
|
||||
col.itemO("MESH_OT_vertex_color_remove", icon="ICON_ZOOMOUT", text="")
|
||||
|
||||
bpy.types.register(DATA_PT_context2)
|
||||
bpy.types.register(DATA_PT_context_mesh)
|
||||
bpy.types.register(DATA_PT_mesh)
|
||||
bpy.types.register(DATA_PT_materials)
|
||||
bpy.types.register(DATA_PT_vertex_groups)
|
||||
|
||||
@@ -9,8 +9,8 @@ class DataButtonsPanel(bpy.types.Panel):
|
||||
def poll(self, context):
|
||||
return (context.object and context.object.type == 'TEXT' and context.curve)
|
||||
|
||||
class DATA_PT_context(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_context"
|
||||
class DATA_PT_context_text(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_context_text"
|
||||
__label__ = " "
|
||||
|
||||
def poll(self, context):
|
||||
@@ -73,8 +73,8 @@ class DATA_PT_shape_text(DataButtonsPanel):
|
||||
sub.itemL(text="Display:")
|
||||
sub.itemR(curve, "fast")
|
||||
|
||||
class DATA_PT_geometry(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_geometry"
|
||||
class DATA_PT_geometry_text(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_geometry_text"
|
||||
__label__ = "Geometry"
|
||||
|
||||
def draw(self, context):
|
||||
@@ -161,9 +161,9 @@ class DATA_PT_textboxes(DataButtonsPanel):
|
||||
text = context.curve
|
||||
"""
|
||||
|
||||
bpy.types.register(DATA_PT_context)
|
||||
bpy.types.register(DATA_PT_context_text)
|
||||
bpy.types.register(DATA_PT_shape_text)
|
||||
bpy.types.register(DATA_PT_geometry)
|
||||
bpy.types.register(DATA_PT_geometry_text)
|
||||
bpy.types.register(DATA_PT_font)
|
||||
bpy.types.register(DATA_PT_paragraph)
|
||||
#bpy.types.register(DATA_PT_textboxes)
|
||||
|
||||
@@ -22,8 +22,8 @@ class MATERIAL_PT_preview(MaterialButtonsPanel):
|
||||
|
||||
layout.template_preview(mat)
|
||||
|
||||
class MATERIAL_PT_context(MaterialButtonsPanel):
|
||||
__idname__= "MATERIAL_PT_context"
|
||||
class MATERIAL_PT_context_material(MaterialButtonsPanel):
|
||||
__idname__= "MATERIAL_PT_context_material"
|
||||
__label__ = " "
|
||||
|
||||
def poll(self, context):
|
||||
@@ -436,7 +436,7 @@ class MATERIAL_PT_halo(MaterialButtonsPanel):
|
||||
colsub.itemR(halo, "flares_sub", text="Sub")
|
||||
|
||||
|
||||
bpy.types.register(MATERIAL_PT_context)
|
||||
bpy.types.register(MATERIAL_PT_context_material)
|
||||
bpy.types.register(MATERIAL_PT_preview)
|
||||
bpy.types.register(MATERIAL_PT_material)
|
||||
bpy.types.register(MATERIAL_PT_diffuse)
|
||||
|
||||
@@ -6,8 +6,8 @@ class ObjectButtonsPanel(bpy.types.Panel):
|
||||
__region_type__ = "WINDOW"
|
||||
__context__ = "object"
|
||||
|
||||
class OBJECT_PT_context(ObjectButtonsPanel):
|
||||
__idname__ = "OBJECT_PT_context"
|
||||
class OBJECT_PT_context_object(ObjectButtonsPanel):
|
||||
__idname__ = "OBJECT_PT_context_object"
|
||||
__label__ = " "
|
||||
|
||||
def draw(self, context):
|
||||
@@ -138,7 +138,7 @@ class OBJECT_PT_animation(ObjectButtonsPanel):
|
||||
sub.itemR(ob, "up_axis", text="Up Axis")
|
||||
sub.itemR(ob, "track_rotation", text="Rotation")
|
||||
|
||||
bpy.types.register(OBJECT_PT_context)
|
||||
bpy.types.register(OBJECT_PT_context_object)
|
||||
bpy.types.register(OBJECT_PT_transform)
|
||||
bpy.types.register(OBJECT_PT_groups)
|
||||
bpy.types.register(OBJECT_PT_display)
|
||||
|
||||
@@ -22,8 +22,8 @@ class TEXTURE_PT_preview(TextureButtonsPanel):
|
||||
|
||||
layout.template_preview(tex)
|
||||
|
||||
class TEXTURE_PT_context(TextureButtonsPanel):
|
||||
__idname__= "TEXTURE_PT_context"
|
||||
class TEXTURE_PT_context_texture(TextureButtonsPanel):
|
||||
__idname__= "TEXTURE_PT_context_texture"
|
||||
__label__ = " "
|
||||
|
||||
def poll(self, context):
|
||||
@@ -539,7 +539,7 @@ class TEXTURE_PT_distortednoise(TextureButtonsPanel):
|
||||
sub = split.column()
|
||||
sub.itemR(tex, "nabla")
|
||||
|
||||
bpy.types.register(TEXTURE_PT_context)
|
||||
bpy.types.register(TEXTURE_PT_context_texture)
|
||||
bpy.types.register(TEXTURE_PT_preview)
|
||||
bpy.types.register(TEXTURE_PT_texture)
|
||||
bpy.types.register(TEXTURE_PT_clouds)
|
||||
|
||||
@@ -21,7 +21,7 @@ class WORLD_PT_preview(WorldButtonsPanel):
|
||||
|
||||
layout.template_preview(world)
|
||||
|
||||
class WORLD_PT_context(WorldButtonsPanel):
|
||||
class WORLD_PT_context_world(WorldButtonsPanel):
|
||||
__label__ = " "
|
||||
|
||||
def poll(self, context):
|
||||
@@ -186,7 +186,7 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
|
||||
col.row().itemR(ao, "color", expand=True)
|
||||
col.itemR(ao, "energy")
|
||||
|
||||
bpy.types.register(WORLD_PT_context)
|
||||
bpy.types.register(WORLD_PT_context_world)
|
||||
bpy.types.register(WORLD_PT_preview)
|
||||
bpy.types.register(WORLD_PT_world)
|
||||
bpy.types.register(WORLD_PT_ambient_occlusion)
|
||||
|
||||
Reference in New Issue
Block a user