Forum: Poser - OFFICIAL


Subject: Any python scripts to remove all textures from a figure?

poser opened this issue on Aug 05, 2005 ยท 15 posts


templargfx posted Fri, 05 August 2005 at 8:47 PM

posted this elsewhere :

copy all the text within the #### lines into a text document and save it into your runtime/python/poser scripts folder calling it whatever_you_like.py

#####################################################

<br></br>import poser<br></br><br></br>scene = poser.Scene()<br></br><br></br>actor = scene.CurrentActor()<br></br>figure = actor.ItsFigure()<br></br><br></br>materials = actor.Materials()<br></br><br></br>for material in materials:<br></br><br></br>    material.SetDiffuseColor (1, 1, 1)<br></br>    material.LoadMaterialSet ("runtimelibrariesmaterialsClear.mt5")<br></br><br></br>scene.DrawAll()<br></br>

#################################

as you can see, almost at the bottom of the scripts is a line referring to a material called Clear.mt5

either change this material name to one you have already, otherwise create a material with all of the options that you want set (white diffuse, no specular etc) and save it in the main materials folder as Clear

to use the material, in the pose room, select the figure/prop you want to apply it to, then open the python scripts window, set the script to a button and then click the button, thats it!

I use this for all sorts of things, resetting V3 to white is one, I also use it to apply a white AO material to test AO options. change the settings in one material file, run the script and all of V3 now has that material.

hope this helps! Message edited on: 08/05/2005 20:49

TemplarGFX
3D Hobbyist since 1996
I use poser native units

167 Car Materials for Poser