Skip to content
Snippets Groups Projects
Commit bdfca104 authored by Doug Hammond's avatar Doug Hammond
Browse files

extensions_framework: required changes for removal of auto-registration

parent 6b5ccf85
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment