Forum: Poser Python Scripting


Subject: python and materials...

darken666 opened this issue on Aug 31, 2005 ยท 3 posts


darken666 posted Wed, 31 August 2005 at 3:04 PM

I'd asked about this once before and was told that python can't touch the p5 material room. However Face_off's Real Skin Shader manages to do so, whether by direct contact or some workaround, so it looks like it is possible. I'm looking to make or find a script to automate the following two material alterations Fur: http://www.renderosity.com/messages.ez?ForumID=12356&Form.ShowMessage=2121224 With this one I'm trying to get some way to select which materials in the figure are affected so I can avoid things like furry eyeballs and such. Toon: http://www.runtimedna.com/mod/forum/messages.php?ShowMessage=92000 This one I want to be able to be set to act on every item in a scene. Or at least all the figures. Unfortunately for me, I don't know the first thing about Python. I'm trying to teach myself, but it's slow going.


darken666 posted Sat, 03 September 2005 at 8:16 PM

Ok, it seems that to do what I need the script will just have to create a temporary pz2 file to apply a MAT pose. Looks like I'll need a book on Python, any recommendations?


an0malaus posted Sun, 04 September 2005 at 1:25 AM

I've been trying to find a copy of the Nutshell series Programming Python book published by O'Reilly, but it seems to be out of print.

With P5, and even to some extent P6, the Python interface to the material room has limitations. P5 is caught in the gap between reasonable, if not complete access to materials from Python, which P6 has and P4, which does not support shader trees.

With the P5&6 shader trees, MAT PZ2 files, unfortunately cannot override parts of the shader tree. If the P4 techniques, where you can change just the diffuse colour or transparency of a material zone, are applied in P5&6, they completely override existing shader trees for the specified materials.

This, I believe, has opened the door for Python "material helper" scripts, such as ShaderSpider from DAZ and face_off's OcclusionMaster, which still, to my knowledge, rely on Python analysis of the shader tree and use PZ2 files, with appropriately modified shader trees, to implement their changes for selected materials.

Message edited on: 09/04/2005 01:29



My ShareCG Stuff

Verbosity: Profusely promulgating Graham's number epics of complete and utter verbiage by the metric monkey barrel.