[Bf-extensions-cvs] [6722d41b] blender-v3.0-release: Node Wrangler: fix switch menu omitting entries after separators

Scott Ramsay noreply at git.blender.org
Sat Oct 30 13:40:18 CEST 2021


Commit: 6722d41b292ae25b2ca90cc586d9b97c4b4821f7
Author: Scott Ramsay
Date:   Sat Oct 30 13:39:41 2021 +0200
Branches: blender-v3.0-release
https://developer.blender.org/rBA6722d41b292ae25b2ca90cc586d9b97c4b4821f7

Node Wrangler: fix switch menu omitting entries after separators

Differential Revision: https://developer.blender.org/D13023

===================================================================

M	node_wrangler.py

===================================================================

diff --git a/node_wrangler.py b/node_wrangler.py
index 68573302..1cfb9bbd 100644
--- a/node_wrangler.py
+++ b/node_wrangler.py
@@ -43,7 +43,7 @@ from bpy.props import (
 from bpy_extras.io_utils import ImportHelper, ExportHelper
 from gpu_extras.batch import batch_for_shader
 from mathutils import Vector
-from nodeitems_utils import node_categories_iter
+from nodeitems_utils import node_categories_iter, NodeItemCustom
 from math import cos, sin, pi, hypot
 from os import path
 from glob import glob
@@ -4986,6 +4986,9 @@ def draw_switch_category_submenu(self, context):
                 props.to_type = node.nodetype
     else:
         for node in self.category.items(context):
+            if isinstance(node, NodeItemCustom):
+                node.draw(self, layout, context)
+                continue
             props = layout.operator(NWSwitchNodeType.bl_idname, text=node.label)
             props.geo_to_type = node.nodetype



More information about the Bf-extensions-cvs mailing list