Scripts for all surfaces

Eustace ScrubbEustace Scrubb Posts: 2,701
edited December 1969 in Daz Studio Discussion

How do I (in a script) identify all of the surfaces in a scene with a given shader or a given adjustment property (shared across multiple shaders), and adjust that one value (say, Ambient Strength or Opacity or Reflection Strength) to a single uniform value on every surface?

Comments

  • Richard HaseltineRichard Haseltine Posts: 102,237
    edited December 1969

    You'd need to get all surfaces - look at an old .dsa materials preset (before the DzPresetHelper object was added) for examples of that. Then you'd get the DzShapes from the objects, and the list of DzMaterials from the shapes, then if it was a DzShaderMaterial you could either use getDefinitionFile () to try to identify the shader or getSahder() to get the DzRSLShader object. A lot of steps.

Sign In or Register to comment.