Forum Coordinators: RedPhantom
Poser - OFFICIAL F.A.Q (Last Updated: 2024 Dec 12 3:30 am)
I use simple python fragment, as below
choose_val = 0.6 # value
import poser
scn = poser.Scene()
fig = scn.CurrentFigure()
mats = fig.Materials()
if mats:
print fig.Name()
for mat in mats:
tree=mat.ShaderTree()
n = tree.NodeByInternalName("PoserSurface")
if n:
i = n.InputByInternalName("Highlight_Value")
if i:
i.SetFloat(choose_val)
tree.UpdatePreview()
scn.DrawAll()
OK, I would try the below...if I had any clue what to do with a Python fragment?
Quote - I use simple python fragment, as below
sets specular value in all materials to chosen value for current figure
choose_val = 0.6 # value
import poser
scn = poser.Scene()
fig = scn.CurrentFigure()
mats = fig.Materials()
if mats:
print fig.Name()
for mat in mats:
tree=mat.ShaderTree()
n = tree.NodeByInternalName("PoserSurface")
if n:
i = n.InputByInternalName("Highlight_Value")
if i:
i.SetFloat(choose_val)
tree.UpdatePreview()
scn.DrawAll()
Quote - # sets specular value in all materials to chosen value for current figure
choose_val = 0.6 # value
import poser
scn = poser.Scene()
fig = scn.CurrentFigure()
mats = fig.Materials()
if mats:
print fig.Name()
for mat in mats:
tree=mat.ShaderTree()
n = tree.NodeByInternalName("PoserSurface")
if n:
i = n.InputByInternalName("Highlight_Value")
if i:
i.SetFloat(choose_val)
tree.UpdatePreview()
scn.DrawAll()
In Windows:
Create a new document by right clicking on the desktop, selecting "New", "Text Document".
Copy the above by highlighting it and pressing ctrl-C. Do not include the quotation mark at the top or the bottom.
Open the new document on your desktop by double clicking
Paste the code into the document using Ctrl-V
Close the document
Rename it to "Specular.py" Don't worry when Windows cries that you are changing the extention.
Copy this to your Poser Python folder, typically "C:/Program Files/Smith Micro/Poser Pro 2012/Runtime/Python/PoserScripts/ScriptsMenu
You can now access the script from the "Scripts" menu in Poser.
I know this sounds like a lot of steps, but it's very quick and will produce a working script from the posting text.
When making this code, I looked inside a material file to find name Poser is using.
Rather than writing extra code, I just have script use internal name.
Most of the internal name have same value as what you see in material room, but these have exception
node "poser" "PoserSurface"
{
name "PoserSurface"
pos 10 10
showPreview 1
nodeInput "Highlight_Color"
{
name "Specular_Color"
value 1 1 1
parmR NO_PARM
parmG NO_PARM
parmB NO_PARM
node NO_NODE
file NO_MAP
}
nodeInput "Highlight_Value"
{
name "Specular_Value"
value 0 0 10
parmR NO_PARM
parmG NO_PARM
parmB NO_PARM
node NO_NODE
file NO_MAP
}
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.
Is there an easy way to just modify the specular across all the skin amterials of V4 at once? I just want to set it 0.2, from 0