Atom Posted December 12, 2014 Share Posted December 12, 2014 (edited) Hi All, I am trying to create a mantra node and I am guessing at the syntax. I tried this code but is does not work. mantra_surface = hou.node("/shop").createNode('mantrasurface','my_surface', run_init_scripts=False) What is the syntax for creating a mantra surface node? Edited December 12, 2014 by Atom Quote Link to comment Share on other sites More sharing options...
michael Posted December 12, 2014 Share Posted December 12, 2014 'mantrasurface' is not a valid type - go into shop and then hot TAB to see the list of valid types...for eg put a "Mantra Shader Builder" down, then MMB on the node and you'll see Operator Type: vopmaterial then this will work: mantra_surface = hou.node("/shop").createNode('vopmaterial','my_surface') Quote Link to comment Share on other sites More sharing options...
eetu Posted December 12, 2014 Share Posted December 12, 2014 Hi, Mantra Surface is actually not a node type, but a gallery entry. Essentially a preset for the vopmaterial node type. You first need to create a vopmaterial node and then apply the preset. mantra_surface = hou.node("/shop").createNode('vopmaterial','my_surface', run_init_scripts=False) hou.galleries.galleryEntries("mantrasurface")[0].applyToNode(mantra_surface) Quote Link to comment Share on other sites More sharing options...
Mandrake0 Posted December 12, 2014 Share Posted December 12, 2014 it doesn't work this way because the material is in the gallery. this will Help: http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=17884&view=previous&sid=ba551930a34b14134fc4810dded192c2 gal_entry = hou.galleries.galleryEntries('mantrasurface')[0] gal_entry.createChildNode(hou.node("/shop")) Quote Link to comment Share on other sites More sharing options...
Mandrake0 Posted December 12, 2014 Share Posted December 12, 2014 haha Help over loaded :-) Quote Link to comment Share on other sites More sharing options...
Atom Posted December 12, 2014 Author Share Posted December 12, 2014 (edited) Thanks eetu that worked! @Mandrake0: Indeed, that is the fastest turn around yet! Edited December 12, 2014 by Atom Quote Link to comment Share on other sites More sharing options...
eetu Posted December 12, 2014 Share Posted December 12, 2014 Yeah BTW Atom/Enivob, you do not need to crosspost your questions on both forums - pretty much the same people frequent both, and it feels a bit cluttered to read the same messages on both.. Quote Link to comment Share on other sites More sharing options...
eetu Posted December 12, 2014 Share Posted December 12, 2014 To clarify, the established "rule" is to post on one forum only, and if in a couple of days you get no answer then you can post to the other. Also, if you get good advice or solutions on both forums, it might be a good idea to provide a link from one to the other, so future help seekers can easier find all the good stuff.. Quote Link to comment Share on other sites More sharing options...
Atom Posted December 12, 2014 Author Share Posted December 12, 2014 Got it, I wondered about that? I check both daily myself. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.