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:
authorLukas Tönne <lukas.toenne@gmail.com>2015-07-17 12:45:02 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2015-07-17 12:59:24 +0300
commit9bcf1bb266e09f92a50033d1c9c4c42bd69290e3 (patch)
tree0cf38af380c6f59c34d44848f1ae4c2d2f787b34 /release/scripts/startup/bl_ui/space_node.py
parent4052384be30444aa732532ebe698218d876b6723 (diff)
Fix for nodeitems module using the NODE_MT_add menu types from bl_ui.
This is basically a bad-level call: ui scripts are registered *after* the modules. It only works for addons because those are loaded even later. Now the nodeitems_utils module just defines a function which is then called by the UI script, rather than the other way around.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_node.py')
-rw-r--r--release/scripts/startup/bl_ui/space_node.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index d0d1376fe05..4fc93fafc4d 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -18,6 +18,7 @@
# <pep8 compliant>
import bpy
+import nodeitems_utils
from bpy.types import Header, Menu, Panel
from bpy.app.translations import pgettext_iface as iface_
from bl_ui.properties_grease_pencil_common import (
@@ -154,7 +155,8 @@ class NODE_MT_add(bpy.types.Menu):
props = layout.operator("node.add_search", text="Search ...")
props.use_transform = True
- # actual node submenus are added by draw functions from node categories
+ # actual node submenus are defined by draw functions from node categories
+ nodeitems_utils.draw_node_categories_menu(self, context)
class NODE_MT_view(Menu):