How we created a mantrasurface in python ?

   2341   5   0
User Avatar
Member
11 posts
Joined: Nov. 2013
Offline
Hy

I am a beginner

hou.node(“/shop”).createNode(“mantrasurface”) does not work….

How we created a mantrasurface in python ?

Thanks
User Avatar
Member
606 posts
Joined: May 2007
Offline
Mantrasurface is not a node type, it's a gallery entry - in essence a (complicated) preset for the basic Material Shader Builder node.

hou.galleries.galleryEntries(“mantrasurface”).createChildNode(hou.node(“/shop”))
Edited by - July 5, 2014 15:24:14
User Avatar
Member
11 posts
Joined: Nov. 2013
Offline
OK I'm starting to understand. I now know what direction work with doc.

Thanks much for your quick reply
User Avatar
Member
11 posts
Joined: Nov. 2013
Offline
For now I get to do what I wanted except that I get not a rename my mantrasurface that comes to be create. ops:

I get a set with set()

hou.parm('/shop/mantrasurface/diff_int').set(0.9)

hou.parmTuple('/shop/mantrasurface/baseColor').set((1,0.786,0.663))

hou.parm('/shop/mantrasurface/useColorMap').set(1)

or hou.parm('/shop/mantrasurface/useColorMap').set(0)

hou.parm('/shop/mantrasurface/baseColorMap').set(“$HIP/Textures/skin.jpg”)

I can't seem to settle with setParms({“diff_int”: 0.9}) for examples
User Avatar
Member
606 posts
Joined: May 2007
Offline
n = hou.node(“/shop/mantrasurface”)
n.setName(“oink”)
n.setParms({“diff_int”:0.9})
User Avatar
Member
11 posts
Joined: Nov. 2013
Offline
Thank you very much
  • Quick Links