So I posted this in they python forum at RDNA as well, but I'm not sure how alive that forum is anymore, so I figured I'd give a shot at trying here as well, and maybe livening up this sub forum.
I'm trying to create a script that takes a material set up for FireFly, and creates a new SuperFly Poser Surface Node for it. For a while now I've had several little scripts I've run that change the FireFly mat to render better in SuperFly, but they 'break' the Firefly mat because there is still just one surface node.
I've got this so far:
Here's the error I get:
sTree.setRendererRootNode(sfRoot,0)
AttributeError: setRendererRootNode
So I'm sure I'm passing the wrong thing into setRendererRootNode, but I can't seem to figure out what I *should* be passing in. The Poser Python documentation says this:
SetRendererRootNode
Explanation
Set output node for desired renderer.
Arguments
None
Syntax
<NoneType> SetRendererRootNode(<ShaderNodeType> node, <EnumType> renderer)
But no variation I've tried so far has worked.
I'm trying to create a script that takes a material set up for FireFly, and creates a new SuperFly Poser Surface Node for it. For a while now I've had several little scripts I've run that change the FireFly mat to render better in SuperFly, but they 'break' the Firefly mat because there is still just one surface node.
I've got this so far:
Code:
import poser
scene = poser.Scene()
fig = scene.CurrentFigure()
mats = fig.Materials()
def CreateSFNode(mat):
#define the Shader Tree for this mat
sTree = mat.ShaderTree()
#set variable to easily track the original Poser Surface Node for later use
ffRoot = sTree.Node(0)
#ffRoot.RendererRootNode(0)
#Create a new Poser Surface node that will be for Superfly
sfRoot = sTree.CreateNode(poser.kNodeTypeCodePOSERSURFACE)
sTree.setRendererRootNode(sfRoot,0)
def MyApp():
print mats[0].Name()
CreateSFNode(mats[0])
#for m in mats:
# CreateSFNode(m)
MyApp()
Here's the error I get:
sTree.setRendererRootNode(sfRoot,0)
AttributeError: setRendererRootNode
So I'm sure I'm passing the wrong thing into setRendererRootNode, but I can't seem to figure out what I *should* be passing in. The Poser Python documentation says this:
SetRendererRootNode
Explanation
Set output node for desired renderer.
Arguments
None
Syntax
<NoneType> SetRendererRootNode(<ShaderNodeType> node, <EnumType> renderer)
But no variation I've tried so far has worked.