Sat, Dec 21, 11:03 AM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Dec 20 7:20 am)



Subject: Help with diffuse colour python script


witchdidi ( ) posted Sat, 28 June 2008 at 4:57 PM · edited Sat, 07 December 2024 at 10:21 AM

I was wondering if anyone could help me out with creating a python script that changes the diffuse colour to 127,127,127 but doesn't change the eyelashes colour. I opened Mec4d's script to see if I could adjust it to exclude the eyelashes but it looks like greek to me.

Thanks!

Be mad...until proven genius.

Sitting quietly in the corner does not make one the class fool.

- Didi


RDNA Store


markschum ( ) posted Sat, 28 June 2008 at 5:40 PM

You can easily change the diffuse color in the root node but it will change it for all parts that belong to that material. So if the eyelashes are part of that material group they will change as well.

The following sets the diffuse color for all  materials for all figures in the scene .
its pretty easy to change this to set only one material for the current figure .

import poser
scn = poser.Scene()
figs = scn.Figures()
acts = scn.Actors()
for fig in figs:             # loop through all figures
    print fig.Name()   
        mats = fig.Materials()
    if mats:
        for mat in mats:   # loop through all materials
            tree=mat.ShaderTree()
            n = tree.NodeByInternalName("PoserSurface")
            i = n.InputByInternalName("Diffuse_Color")
            i.SetColor(0.50,0.50,0.50)
            tree.UpdatePreview()


witchdidi ( ) posted Sat, 28 June 2008 at 5:49 PM

Thanks for that! Will try it out. I was actually using it on V4 & her eyelashes are separate.

Be mad...until proven genius.

Sitting quietly in the corner does not make one the class fool.

- Didi


RDNA Store


Privacy Notice

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.