Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)
#import poser
scene = poser.Scene()
fig=scene.CurrentFigure()
act=scene.CurrentActor()
mat=scene.CurrentMaterial()
tree=mat.ShaderTree()
#Work on the PoserSurface Node
n = tree.NodeByInternalName("PoserSurface")
# I am no expert but for specular use the following
#------------------------------------------------------
#Specular Color
i = n.InputByInternalName("Highlight_Color")
i.SetColor(0.0, 0.0, 0.0)
#Specular Value
i = n.InputByInternalName("Highlight_Value")
i.SetFloat(1)
#Highlight Size
i = n.InputByInternalName("Roughness")
i.SetFloat(0.3)
#------------------------------------------------------
# And for transparency
#------------------------------------------------------
#Transparency
i = n.InputByInternalName("Transparency_Max")
i.SetFloat(0)
#Transparency Edge
i = n.InputByInternalName("Transparency_Min")
i.SetFloat(0)
#Transparency falloff
i = n.InputByInternalName("Transparency_Falloff")
i.SetFloat(0.6)
#------------------------------------------------------
Locked Out
You are most welcome :) -
I am just now finishing cataloguing the real names of the posersurface nodes and trying to give examples of how to use them -
I find the methods manual is good, if you have a little prior knowledge of python (and of course python WITH poser , not so much for a newbie o.O
Locked Out
I found a lovely 400+ tutorial book by PhilC. It's excellent--and might save you some work! Not free, but worth it. I've had my nose in it since yesterday.
Besides, PhilC's tutorial are always droll. :)
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
Hello -
I'm looking for a very specific script that will apply a transparency to a material...for a specific object for two specific material zones. This would be a minor part of a commercial product, but I would likely use it over and over. I want to get this product submitted in the next two weeks, so I need a fairly speedy turnaround.
I have scripted Python, but not for Poser...
The psuedocode would run something like this, I expect:
Import poser
Specify path and image file for transmap
Are we working on the right prop item? If so, then:
--for materal one, set transparency map, transparency parameters, and specularity parameters as well as setting alt spec color to black
--for material two, set transparency parameters and specularity parameters as well as setting alt spec color to black
If not the right prop:
--Give error message and exit
I'm finding some of the methods in the manual, but I need help with synatx. If anyone would not mind doing me a solid, I would happily trade for a free copy of the upcoming product or other barter. Please contact me through sitemail, if you would--or post a reply here, your choice.
Many thanks in advance!