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:
2010-08-02 02:55:12 +00:00
parent 9f575e5446
commit 5b345524ea
84 changed files with 689 additions and 1603 deletions

View File

@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
narrowui = bpy.context.user_preferences.view.properties_width_check
class DataButtonsPanel(bpy.types.Panel):
class DataButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "data"
@@ -47,7 +47,7 @@ class DataButtonsPanelActive(DataButtonsPanel):
return (curve and type(curve) is not bpy.types.TextCurve and curve.splines.active)
class DATA_PT_context_curve(DataButtonsPanel):
class DATA_PT_context_curve(DataButtonsPanel, bpy.types.Panel):
bl_label = ""
bl_show_header = False
@@ -73,11 +73,11 @@ class DATA_PT_context_curve(DataButtonsPanel):
layout.template_ID(ob, "data")
class DATA_PT_custom_props_curve(DataButtonsPanel, PropertyPanel):
class DATA_PT_custom_props_curve(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
_context_path = "object.data"
class DATA_PT_shape_curve(DataButtonsPanel):
class DATA_PT_shape_curve(DataButtonsPanel, bpy.types.Panel):
bl_label = "Shape"
def draw(self, context):
@@ -130,7 +130,7 @@ class DATA_PT_shape_curve(DataButtonsPanel):
col.prop(curve, "auto_texspace")
class DATA_PT_geometry_curve(DataButtonsPanel):
class DATA_PT_geometry_curve(DataButtonsPanel, bpy.types.Panel):
bl_label = "Geometry"
def poll(self, context):
@@ -164,7 +164,7 @@ class DATA_PT_geometry_curve(DataButtonsPanel):
col.prop(curve, "bevel_object", text="")
class DATA_PT_pathanim(DataButtonsPanelCurve):
class DATA_PT_pathanim(DataButtonsPanelCurve, bpy.types.Panel):
bl_label = "Path Animation"
def draw_header(self, context):
@@ -196,7 +196,7 @@ class DATA_PT_pathanim(DataButtonsPanelCurve):
col.prop(curve, "use_time_offset", text="Offset Children")
class DATA_PT_active_spline(DataButtonsPanelActive):
class DATA_PT_active_spline(DataButtonsPanelActive, bpy.types.Panel):
bl_label = "Active Spline"
def draw(self, context):
@@ -267,7 +267,7 @@ class DATA_PT_active_spline(DataButtonsPanelActive):
layout.prop(act_spline, "smooth")
class DATA_PT_font(DataButtonsPanel):
class DATA_PT_font(DataButtonsPanel, bpy.types.Panel):
bl_label = "Font"
def poll(self, context):
@@ -329,7 +329,7 @@ class DATA_PT_font(DataButtonsPanel):
col.prop(char, "use_small_caps")
class DATA_PT_paragraph(DataButtonsPanel):
class DATA_PT_paragraph(DataButtonsPanel, bpy.types.Panel):
bl_label = "Paragraph"
def poll(self, context):
@@ -362,7 +362,7 @@ class DATA_PT_paragraph(DataButtonsPanel):
col.prop(text, "offset_y", text="Y")
class DATA_PT_textboxes(DataButtonsPanel):
class DATA_PT_textboxes(DataButtonsPanel, bpy.types.Panel):
bl_label = "Text Boxes"
def poll(self, context):
@@ -404,29 +404,12 @@ class DATA_PT_textboxes(DataButtonsPanel):
row.operator("font.textbox_remove", text='', icon='X', emboss=False).index = i
classes = [
DATA_PT_context_curve,
DATA_PT_shape_curve,
DATA_PT_geometry_curve,
DATA_PT_pathanim,
DATA_PT_active_spline,
DATA_PT_font,
DATA_PT_paragraph,
DATA_PT_textboxes,
DATA_PT_custom_props_curve]
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()