parrotdolphin opened this issue on Jan 17, 2013 · 4 posts
parrotdolphin posted Thu, 17 January 2013 at 9:30 PM
I am trying to set a displacement amount and add a Spots node to the displacement. My script works to connect the Spots node to the displacement but I am not sure how to set the displacement amount or the Base_Color on the Spots node, or to tell it whether the Noise_Type is Improved or Original on the Spots node.
Does someone know? I would be grateful.
Thanks,
Janet
Here is the script:
import poser
def addDISP(mat):
scene = poser.Scene()
tree = mat.ShaderTree()
root = tree.Node(0)
if (root.Type() != poser.kNodeTypeCodePOSERSURFACE):
print "Select a material first"
return
displacein = root.InputByInternalName("Displacement")
dispin = displacein.InNode()
#SetDisplacment(0.06) #trying to set the amount of displacement
furry = tree.CreateNode(poser.kNodeTypeCodeSPOTS)
#furry.Input(0).Set???(0,0,0) #trying to set the Base_Color on Spots node to black
furry.Input(2).SetFloat(0.01)
furry.Input(3).SetFloat(0.5)
furry.Input(4).SetFloat(0.5)
#furry,Input(6).Set???(1) #trying to set Noise_Type to Improved
furry.ConnectToInput(displacein)
furry.SetLocation(400, 400)
tree.UpdatePreview()
mat = poser.Scene().CurrentMaterial()
addDISP(mat)