Forum: Poser Python Scripting


Subject: Setting image gamma and filtering

Keith opened this issue on Apr 22, 2016 ยท 3 posts


3dcheapskate posted Sat, 23 April 2016 at 12:38 AM

This script will give you the internal name and value for every input in every node in your shader tree (edited version of a PrintShaderTree.py from the old (now defunct) DAZ forum archive):

import poser
tree = poser.Scene().CurrentMaterial().ShaderTree()
for n in tree.Nodes():
    print 'nNode ',n.Name()
    for i in n.Inputs():
        print '- ',i.Name(),'(Internal name=',i.InternalName(),', value=', str(i.Value())

I''m running Poser 9 at present so I used that script to get the Filtering parameters for you - it has internal name 'Filtering' and the numeric values are None = 1, Fast = 2, Quality = 3, and Crisp = 4

You can run the script to get the gamma details (Poser 9 doesn't have gamma)

As far as I know PoserPython doesn't have built-in enumerations fro the drop-downs in material room nodes, but I'm fairly sure that they're integer values in order starting at 1 for the top item in the list

To set the filtering value of node 'n' to Crisp you'd simply do:

n.InputByInternalName('Filtering').SetFloat(4.0)

The 3Dcheapskate (also available in DAZ and HiveWire3D flavours) occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.