diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-11 02:48:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-11 02:48:22 +0300 |
commit | 4612034cf45f2534b01bb038f80b7795e8b8e20d (patch) | |
tree | ba47ff0cb8d4916faa8fb2ff06dbf08883fae9b3 /release/scripts/io | |
parent | 46bb5643b7660033bc0d15c5fcc752324a1b519f (diff) |
patch [#25809] Auto-Registration as utility function.
This removes auto-registration, committed by Martin r30961.
Realize this is a contentious topic but Brecht and myself both would rather opt-in registration.
TODO:
- addons need updating.
- class list will be modified to use weakrefs (should have been done for existing system too).
- will move bpy.types.(un)register functions into bpy.utils.(un)register_class, currently including these functions in a type list is internally ugly, scripts which loop over types also need to check for these.
Diffstat (limited to 'release/scripts/io')
-rw-r--r-- | release/scripts/io/netrender/ui.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/release/scripts/io/netrender/ui.py b/release/scripts/io/netrender/ui.py index 0581e054dff..1583dee427f 100644 --- a/release/scripts/io/netrender/ui.py +++ b/release/scripts/io/netrender/ui.py @@ -363,16 +363,21 @@ class RENDER_PT_network_output(NeedValidAddress, NetRenderButtonsPanel, bpy.type draw = properties_render.RENDER_PT_output.draw -class NetRenderSettings(bpy.types.IDPropertyGroup): - pass -class NetRenderSlave(bpy.types.IDPropertyGroup): - pass +def addProperties(): + class NetRenderSettings(bpy.types.IDPropertyGroup): + pass -class NetRenderJob(bpy.types.IDPropertyGroup): - pass + class NetRenderSlave(bpy.types.IDPropertyGroup): + pass + + class NetRenderJob(bpy.types.IDPropertyGroup): + pass + + bpy.types.register(NetRenderSettings) + bpy.types.register(NetRenderSlave) + bpy.types.register(NetRenderJob) -def addProperties(): from bpy.props import PointerProperty, StringProperty, BoolProperty, EnumProperty, IntProperty, CollectionProperty bpy.types.Scene.network_render = PointerProperty(type=NetRenderSettings, name="Network Render", description="Network Render Settings") |