Forum: Poser Python Scripting


Subject: Looking for list of internal names

Mason opened this issue on Dec 24, 2006 ยท 4 posts


Mason posted Sun, 24 December 2006 at 8:20 PM

I want to change the highlight size via script. All of the current wacro scripts use InputByInternalName to access various properties of the shader trees. I cannot find or figure out the name of the highlight size. I found Highlight_Color and Highlight_Value. Highlight_size does not work neither does Ns.


Mason posted Sun, 24 December 2006 at 8:34 PM

Ok I was able to get what I wanted with Input but I have to hard code a 4 in for the highlight_size index which doesn't seem very stable to me since the root node sequence could change.


stewer posted Wed, 27 December 2006 at 8:42 AM

It's "Roughness". You can simply print out the internal names of all the inputs in a node with a wacro like this:

def printInputs(mat):
   
   tree = mat.ShaderTree()
   root = tree.Node(0)
   for node in tree.Nodes():
      for input in node.Inputs():
         print input.InternalName()
 
mats = poser.Scene().WacroMaterials()
if (mats == None):
        poser.DialogSimple.MessageBox( "Please select a material first.")
else:
        for mat in mats:
                printInputs(mat)

Mason posted Mon, 01 January 2007 at 9:22 PM

Thanks!