Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2025 Feb 05 6:41 am)
I changed the settings and filename from grey to white. Here it is.
"If I were a shadow, I know I wouldn't like to be half of
what I should be."
Mr Otsuka, the old black tomcat in Kafka on the Shore (Haruki
Murakami)
Oh, I see what you mean... this script only does one little bit of what you want.
It can be certainly be done, but it's a bit beyond my Python skills at the moment.
Python Wizards, where are you?
"If I were a shadow, I know I wouldn't like to be half of
what I should be."
Mr Otsuka, the old black tomcat in Kafka on the Shore (Haruki
Murakami)
More scripts than you can shake a stick at. :)
This one may be more flexible, it will change all materials in the scene to match the material currently selected in the Material Room. If you want everything white just pick any actor, pick any of its materials, set that to white, then run the script.
# Script to change every material for every
# actor in the scene to match the material
# currently selected in the material room.
#
# by PhilC
# http://www.philc.net/index.php
import poser<br></br>
import os
scene = poser.Scene()
def main():<br></br>
filename =
os.path.join(os.curdir,"temp.mt5")<br></br>
mat = scene.CurrentMaterial()<br></br>
mat.SaveMaterialSet(filename)
for actor in scene.Actors():<br></br>
try:<br></br>
print "Processing %s" % actor.Name()<br></br>
for mat in actor.Materials():<br></br>
try:<br></br>
mat.SetSelected(1) <br></br>
mat.LoadMaterialSet(filename)<br></br>
print "------ %s OK" % mat.Name()<br></br>
except:<br></br>
print "------ %s FAILED" % mat.Name()<br></br>
except:<br></br>
print "------ Bypassing %s" % actor.Name()<br></br>
main()
print "--------------------------"<br></br>
print " TASK COMPLETED"<br></br>
print "--------------------------"<br></br>
I tried to use PhilC's script with Poser Pro and Poser 8, but the actor materials are not changed to match the one currently selected.
SaveMaterialSet and LoadMaterialSet return success, so I don't know what's going on.
Any idea ? Thanks
visit my
blog: www.alessandromastronardi.com
My
Rendo Store
Hi, I tried both in the Pose and in the Material Room. Also, I don't know if this helps, I'm on a Mac.
But I checked out and the temp material is correctly save, so I'm quite clueless...
visit my
blog: www.alessandromastronardi.com
My
Rendo Store
Hmmm... I'm fairly sure I had Phil's script working (it would have been in PPro, I think), but I'll check this evening when I get home. I'm on Mac too.
"If I were a shadow, I know I wouldn't like to be half of
what I should be."
Mr Otsuka, the old black tomcat in Kafka on the Shore (Haruki
Murakami)
Anyway, I then added a figure (Miki2_Dev), selected my test prop material, and ran the script again. It took ages, and when it eventually finished, the output window explained why: for each one of Miki2's actors, it updated all of her material zones.
The only reason for this that I can think of is that material zones are assigned directly to the figure, rather than to its actors. A minor change to the script should resolve this issue.
"If I were a shadow, I know I wouldn't like to be half of
what I should be."
Mr Otsuka, the old black tomcat in Kafka on the Shore (Haruki
Murakami)
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.
![file_437479.jpg](https://live.cdn.renderosity.com/forum/threads/2779829/file_437479.jpg)
can someone help me with a poser 8 script? i want to make every material white.not just on one prop or one figure. but on everything in the scene. ground,figure,prop,....like here