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>2017-09-09 15:35:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-09-09 15:56:58 +0300
commit11a9434c2deed4f560f1c7381faf697f77b9de5c (patch)
tree2aed583aaa97d87234b72a83b11dc38a2569b388 /release/scripts/modules
parent3c3d0898b0c1a1d7da70f4a1778d4360b3cfe5c8 (diff)
Resolve T52687: Add node label shows as 'Unknown'
Add type access method, need to extend to other types for now just get node UI working properly again.
Diffstat (limited to 'release/scripts/modules')
-rw-r--r--release/scripts/modules/nodeitems_utils.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/release/scripts/modules/nodeitems_utils.py b/release/scripts/modules/nodeitems_utils.py
index 7dc456f6c98..117e35dd028 100644
--- a/release/scripts/modules/nodeitems_utils.py
+++ b/release/scripts/modules/nodeitems_utils.py
@@ -59,9 +59,9 @@ class NodeItem:
return self._label
else:
# if no custom label is defined, fall back to the node type UI name
- cls = bpy.types.Node.bl_rna_get_subclass(self.nodetype)
- if cls is not None:
- return cls.bl_rna.name
+ bl_rna = bpy.types.Node.bl_rna_get_subclass(self.nodetype)
+ if bl_rna is not None:
+ return bl_rna.name
else:
return "Unknown"
@@ -71,9 +71,9 @@ class NodeItem:
return bpy.app.translations.contexts.default
else:
# if no custom label is defined, fall back to the node type UI name
- cls = bpy.types.Node.bl_rna_get_subclass(self.nodetype)
- if cls is not None:
- return cls.bl_rna.translation_context
+ bl_rna = bpy.types.Node.bl_rna_get_subclass(self.nodetype)
+ if bl_rna is not None:
+ return bl_rna.translation_context
else:
return bpy.app.translations.contexts.default