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

View File

@@ -42,7 +42,7 @@ def particle_panel_poll(panel, context):
return psys.settings.type in ('EMITTER', 'REACTOR', 'HAIR') and (engine in panel.COMPAT_ENGINES)
class ParticleButtonsPanel(bpy.types.Panel):
class ParticleButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "particle"
@@ -51,7 +51,7 @@ class ParticleButtonsPanel(bpy.types.Panel):
return particle_panel_poll(self, context)
class PARTICLE_PT_context_particles(ParticleButtonsPanel):
class PARTICLE_PT_context_particles(ParticleButtonsPanel, bpy.types.Panel):
bl_label = ""
bl_show_header = False
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -136,12 +136,12 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel):
split.prop(psys, "reactor_target_particle_system", text="Particle System")
class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel):
class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel, bpy.types.Panel):
COMPAT_ENGINES = {'BLENDER_RENDER'}
_context_path = "particle_system.settings"
class PARTICLE_PT_emission(ParticleButtonsPanel):
class PARTICLE_PT_emission(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Emission"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -203,7 +203,7 @@ class PARTICLE_PT_emission(ParticleButtonsPanel):
row.prop(part, "grid_resolution")
class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel):
class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Hair dynamics"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -260,7 +260,7 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel):
col.prop(cloth, "quality", text="Steps", slider=True)
class PARTICLE_PT_cache(ParticleButtonsPanel):
class PARTICLE_PT_cache(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Cache"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -283,7 +283,7 @@ class PARTICLE_PT_cache(ParticleButtonsPanel):
point_cache_ui(self, context, psys.point_cache, True, 'HAIR' if psys.hair_dynamics else 'PSYS')
class PARTICLE_PT_velocity(ParticleButtonsPanel):
class PARTICLE_PT_velocity(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Velocity"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -330,7 +330,7 @@ class PARTICLE_PT_velocity(ParticleButtonsPanel):
# sub.prop(part, "reaction_shape", slider=True)
class PARTICLE_PT_rotation(ParticleButtonsPanel):
class PARTICLE_PT_rotation(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Rotation"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -376,7 +376,7 @@ class PARTICLE_PT_rotation(ParticleButtonsPanel):
sub.prop(part, "angular_velocity_factor", text="")
class PARTICLE_PT_physics(ParticleButtonsPanel):
class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Physics"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -573,7 +573,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel):
sub.prop(key, "system", text="System")
class PARTICLE_PT_boidbrain(ParticleButtonsPanel):
class PARTICLE_PT_boidbrain(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Boid Brain"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -673,7 +673,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel):
row.prop(rule, "flee_distance")
class PARTICLE_PT_render(ParticleButtonsPanel):
class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Render"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -843,7 +843,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel):
col.label(text="")
class PARTICLE_PT_draw(ParticleButtonsPanel):
class PARTICLE_PT_draw(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Display"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -902,7 +902,7 @@ class PARTICLE_PT_draw(ParticleButtonsPanel):
#sub.label(text="Override material color")
class PARTICLE_PT_children(ParticleButtonsPanel):
class PARTICLE_PT_children(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Children"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -987,7 +987,7 @@ class PARTICLE_PT_children(ParticleButtonsPanel):
col.prop(part, "kink_shape", slider=True)
class PARTICLE_PT_field_weights(ParticleButtonsPanel):
class PARTICLE_PT_field_weights(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Field Weights"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -1000,7 +1000,7 @@ class PARTICLE_PT_field_weights(ParticleButtonsPanel):
self.layout.prop(part.effector_weights, "do_growing_hair")
class PARTICLE_PT_force_fields(ParticleButtonsPanel):
class PARTICLE_PT_force_fields(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Force Field Settings"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -1028,7 +1028,7 @@ class PARTICLE_PT_force_fields(ParticleButtonsPanel):
basic_force_field_falloff_ui(self, context, part.force_field_2)
class PARTICLE_PT_vertexgroups(ParticleButtonsPanel):
class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Vertexgroups"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -1096,35 +1096,12 @@ class PARTICLE_PT_vertexgroups(ParticleButtonsPanel):
row.prop(psys, "vertex_group_field_negate", text="")
classes = [
PARTICLE_PT_context_particles,
PARTICLE_PT_hair_dynamics,
PARTICLE_PT_cache,
PARTICLE_PT_emission,
PARTICLE_PT_velocity,
PARTICLE_PT_rotation,
PARTICLE_PT_physics,
PARTICLE_PT_boidbrain,
PARTICLE_PT_render,
PARTICLE_PT_draw,
PARTICLE_PT_children,
PARTICLE_PT_field_weights,
PARTICLE_PT_force_fields,
PARTICLE_PT_vertexgroups,
PARTICLE_PT_custom_props]
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()