Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Hammond <doughammond@hamsterfight.co.uk>2011-02-11 03:43:35 +0300
committerDoug Hammond <doughammond@hamsterfight.co.uk>2011-02-11 03:43:35 +0300
commitbdfca1046394902777ebe075b37597d416d634a9 (patch)
tree9cabb75d863833837f0d478f82e32befa5618537 /modules
parent6b5ccf85a107fbce7b63b1875fb645d3d6ed32f5 (diff)
extensions_framework: required changes for removal of auto-registration
Diffstat (limited to 'modules')
-rw-r--r--modules/extensions_framework/__init__.py4
-rw-r--r--modules/extensions_framework/plugin.py17
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)