Skip to content
Snippets Groups Projects
Commit c27fd9ec authored by Scott Ramsay's avatar Scott Ramsay Committed by Brecht Van Lommel
Browse files

Node Wrangler: use utility function to populate switch menu

Currently, the nodes in the Switch menu (Shift+S) are generated from Node
Wrangler's own long static list of categories and nodes, which often goes
out of sync when Blender changes.

This changes to using the node_categories_iter utility which uses the correct
list of available nodes from nodeitems_builtins.py.

The submenu classes are now procedurally generated and registered in the same
fashion as the add menu, but just with a different operator in their draw
function.

Removing the static lists required a couple changes outside of the Switch menu.
Mostly having to compare types using the verbose node.rna_type.identifier.

Includes improvements on the original patch by Benni Merz.
parent a228560f
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment