import hou cwd = hou.selectedItems()[0].parent() node = cwd.createNode('User::base_texture_mtl::1.0', 'base_texture_mtl') node.setGenericFlag(hou.nodeFlag.Material, True)
chongsongfathom out! 侯哥牛逼
In the ‘material libray’ node, there is a parameter called ‘Tab Menu Mask’. It seems to define what kind of nodes can be displayed in the menu. I ended the name of my node with ‘builder’, and it successfully appeared in the menu.
Regarding ‘nodeFlag’, I use Python in ‘OnCreate’ to control it.
This may not be the best solution, but it has indeed solved some problems.Image Not FoundImage Not FoundImage Not Found