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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-08-12 15:52:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-08-12 15:54:17 +0300
commit3736dabd93418e44f2bf715d91df746525d81948 (patch)
tree236aabbc20b1ff9588cb2398aa62e762d9853a0b
parent961d43c623fd9fe1d6aa92c3067acc55b2a86843 (diff)
Fix running space_node directly
Part of T65393
-rw-r--r--release/scripts/startup/bl_ui/space_node.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index 939102bc11b..0f926e596de 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -676,7 +676,12 @@ def node_draw_tree_view(_layout, _context):
# Adapt properties editor panel to display in node editor. We have to
# copy the class rather than inherit due to the way bpy registration works.
def node_panel(cls):
- node_cls = type('NODE_' + cls.__name__, cls.__bases__, dict(cls.__dict__))
+ node_cls_dict = cls.__dict__.copy()
+
+ # Needed for re-registration.
+ node_cls_dict.pop("bl_rna", None)
+
+ node_cls = type('NODE_' + cls.__name__, cls.__bases__, node_cls_dict)
node_cls.bl_space_type = 'NODE_EDITOR'
node_cls.bl_region_type = 'UI'