[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1568] trunk/py/scripts/addons/modules/ extensions_framework: extensions_framework: required changes for removal of auto-registration
Doug Hammond
doughammond at hamsterfight.co.uk
Fri Feb 11 01:43:36 CET 2011
Revision: 1568
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1568
Author: dougal2
Date: 2011-02-11 00:43:35 +0000 (Fri, 11 Feb 2011)
Log Message:
-----------
extensions_framework: required changes for removal of auto-registration
Modified Paths:
--------------
trunk/py/scripts/addons/modules/extensions_framework/__init__.py
trunk/py/scripts/addons/modules/extensions_framework/plugin.py
Modified: trunk/py/scripts/addons/modules/extensions_framework/__init__.py
===================================================================
--- trunk/py/scripts/addons/modules/extensions_framework/__init__.py 2011-02-10 23:13:59 UTC (rev 1567)
+++ trunk/py/scripts/addons/modules/extensions_framework/__init__.py 2011-02-11 00:43:35 UTC (rev 1568)
@@ -29,7 +29,7 @@
import bpy
from extensions_framework.ui import EF_OT_msg
-bpy.types.register(EF_OT_msg)
+bpy.utils.register_class(EF_OT_msg)
del EF_OT_msg
def log(str, popup=False, module_name='EF'):
@@ -124,6 +124,8 @@
"""
+ bpy.utils.register_class(cls)
+
for property_group_parent in cls.ef_attach_to:
if property_group_parent is not None:
prototype = getattr(bpy.types, property_group_parent)
Modified: trunk/py/scripts/addons/modules/extensions_framework/plugin.py
===================================================================
--- trunk/py/scripts/addons/modules/extensions_framework/plugin.py 2011-02-10 23:13:59 UTC (rev 1567)
+++ trunk/py/scripts/addons/modules/extensions_framework/plugin.py 2011-02-11 00:43:35 UTC (rev 1568)
@@ -40,22 +40,6 @@
"""
- """The property_groups defines a list of declarative_property_group
- types to create in specified types during the initialisation of the
- plugin.
- Item format:
- ('bpy.type prototype to attach to', <declarative_property_group>)
-
- Example item:
- ('Scene', myaddon_property_group)
- In this example, a new property group will be attached to
- bpy.types.Scene and all of the properties described in that group
- will be added to it.
- See extensions_framework.declarative_property_group.
-
- """
- property_groups = []
-
@classmethod
def install(r_class):
"""Initialise this plugin. So far, all this does is to create
@@ -64,6 +48,7 @@
"""
for property_group_parent, property_group in r_class.property_groups:
+ bpy.utils.register_class(property_group)
call_init = False
if property_group_parent is not None:
prototype = getattr(bpy.types, property_group_parent)
More information about the Bf-extensions-cvs
mailing list