Skip to content
Snippets Groups Projects
  • Scott Ramsay's avatar
    c27fd9ec
    Node Wrangler: use utility function to populate switch menu · c27fd9ec
    Scott Ramsay authored
    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.
    c27fd9ec
    History
    Node Wrangler: use utility function to populate switch menu
    Scott Ramsay authored
    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.