RNA Types metaclass registration
See mailing list posts for details [1][2][3] Addons still need to be fixed; Campbell said he'd do it today. See any of the py files (outside netrender) in this commit for how to do it (it's rather simple). [1] http://lists.blender.org/pipermail/bf-committers/2010-February/026328.html [2] http://lists.blender.org/pipermail/bf-committers/2010-August/028311.html [3] http://lists.blender.org/pipermail/bf-committers/2010-August/028321.html
This commit is contained in:
@@ -49,7 +49,7 @@ class MESH_MT_shape_key_specials(bpy.types.Menu):
|
||||
layout.operator("object.shape_key_mirror", icon='ARROW_LEFTRIGHT')
|
||||
|
||||
|
||||
class DataButtonsPanel(bpy.types.Panel):
|
||||
class DataButtonsPanel():
|
||||
bl_space_type = 'PROPERTIES'
|
||||
bl_region_type = 'WINDOW'
|
||||
bl_context = "data"
|
||||
@@ -59,7 +59,7 @@ class DataButtonsPanel(bpy.types.Panel):
|
||||
return context.mesh and (engine in self.COMPAT_ENGINES)
|
||||
|
||||
|
||||
class DATA_PT_context_mesh(DataButtonsPanel):
|
||||
class DATA_PT_context_mesh(DataButtonsPanel, bpy.types.Panel):
|
||||
bl_label = ""
|
||||
bl_show_header = False
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
@@ -87,12 +87,12 @@ class DATA_PT_context_mesh(DataButtonsPanel):
|
||||
layout.template_ID(space, "pin_id")
|
||||
|
||||
|
||||
class DATA_PT_custom_props_mesh(DataButtonsPanel, PropertyPanel):
|
||||
class DATA_PT_custom_props_mesh(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
_context_path = "object.data"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
||||
|
||||
class DATA_PT_normals(DataButtonsPanel):
|
||||
class DATA_PT_normals(DataButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Normals"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
||||
@@ -117,7 +117,7 @@ class DATA_PT_normals(DataButtonsPanel):
|
||||
col.prop(mesh, "double_sided")
|
||||
|
||||
|
||||
class DATA_PT_settings(DataButtonsPanel):
|
||||
class DATA_PT_settings(DataButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Settings"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
||||
@@ -129,7 +129,7 @@ class DATA_PT_settings(DataButtonsPanel):
|
||||
layout.prop(mesh, "texture_mesh")
|
||||
|
||||
|
||||
class DATA_PT_vertex_groups(DataButtonsPanel):
|
||||
class DATA_PT_vertex_groups(DataButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Vertex Groups"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
||||
@@ -176,7 +176,7 @@ class DATA_PT_vertex_groups(DataButtonsPanel):
|
||||
layout.prop(context.tool_settings, "vertex_group_weight", text="Weight")
|
||||
|
||||
|
||||
class DATA_PT_shape_keys(DataButtonsPanel):
|
||||
class DATA_PT_shape_keys(DataButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Shape Keys"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
||||
@@ -274,7 +274,7 @@ class DATA_PT_shape_keys(DataButtonsPanel):
|
||||
row.prop(key, "slurph")
|
||||
|
||||
|
||||
class DATA_PT_uv_texture(DataButtonsPanel):
|
||||
class DATA_PT_uv_texture(DataButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "UV Texture"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
||||
@@ -344,7 +344,7 @@ class DATA_PT_texface(DataButtonsPanel):
|
||||
col.label(text="No UV Texture")
|
||||
|
||||
|
||||
class DATA_PT_vertex_colors(DataButtonsPanel):
|
||||
class DATA_PT_vertex_colors(DataButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Vertex Colors"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
||||
@@ -367,32 +367,12 @@ class DATA_PT_vertex_colors(DataButtonsPanel):
|
||||
layout.prop(lay, "name")
|
||||
|
||||
|
||||
classes = [
|
||||
MESH_MT_vertex_group_specials,
|
||||
MESH_MT_shape_key_specials,
|
||||
|
||||
DATA_PT_context_mesh,
|
||||
DATA_PT_normals,
|
||||
DATA_PT_settings,
|
||||
DATA_PT_vertex_groups,
|
||||
DATA_PT_shape_keys,
|
||||
DATA_PT_uv_texture,
|
||||
DATA_PT_texface,
|
||||
DATA_PT_vertex_colors,
|
||||
|
||||
DATA_PT_custom_props_mesh]
|
||||
|
||||
|
||||
def register():
|
||||
register = bpy.types.register
|
||||
for cls in classes:
|
||||
register(cls)
|
||||
pass
|
||||
|
||||
|
||||
def unregister():
|
||||
unregister = bpy.types.unregister
|
||||
for cls in classes:
|
||||
unregister(cls)
|
||||
pass
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
||||
|
Reference in New Issue
Block a user