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:
Diffstat (limited to 'release/scripts/startup/bl_ui/node_add_menu.py')
-rw-r--r--release/scripts/startup/bl_ui/node_add_menu.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/node_add_menu.py b/release/scripts/startup/bl_ui/node_add_menu.py
index 17bff9a5087..31b84b8f08a 100644
--- a/release/scripts/startup/bl_ui/node_add_menu.py
+++ b/release/scripts/startup/bl_ui/node_add_menu.py
@@ -6,6 +6,7 @@ from bpy.app.translations import (
contexts as i18n_contexts,
)
+
def add_node_type(layout, node_type, *, label=None):
"""Add a node type to a menu."""
bl_rna = bpy.types.Node.bl_rna_get_subclass(node_type)
@@ -33,6 +34,7 @@ def draw_node_group_add_menu(context, layout):
if node_tree:
from nodeitems_builtins import node_tree_group_type
+
def contains_group(nodetree, group):
if nodetree == group:
return True
@@ -42,9 +44,12 @@ def draw_node_group_add_menu(context, layout):
return True
return False
- groups = [group for group in context.blend_data.node_groups if group.bl_idname == node_tree.bl_idname and
- not contains_group(group, node_tree) and
- not group.name.startswith('.')]
+ groups = [
+ group for group in context.blend_data.node_groups
+ if (group.bl_idname == node_tree.bl_idname and
+ not contains_group(group, node_tree) and
+ not group.name.startswith('.'))
+ ]
if groups:
layout.separator()
for group in groups: