diff options
-rw-r--r-- | modules/extensions_framework/__init__.py | 4 | ||||
-rw-r--r-- | modules/extensions_framework/plugin.py | 17 |
2 files changed, 4 insertions, 17 deletions
diff --git a/modules/extensions_framework/__init__.py b/modules/extensions_framework/__init__.py index f842f5ae..0aabc15d 100644 --- a/modules/extensions_framework/__init__.py +++ b/modules/extensions_framework/__init__.py @@ -29,7 +29,7 @@ import time 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 @@ def ef_initialise_properties(cls): """ + 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) diff --git a/modules/extensions_framework/plugin.py b/modules/extensions_framework/plugin.py index a548a84f..b08efdd5 100644 --- a/modules/extensions_framework/plugin.py +++ b/modules/extensions_framework/plugin.py @@ -40,22 +40,6 @@ class plugin(object): """ - """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 @@ class plugin(object): """ 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) |