Forum: Poser Python Scripting


Subject: How to change texture of a node from Shader tree?

maur_2005 opened this issue on Jan 09, 2020 ยท 5 posts


adp001 posted Thu, 09 January 2020 at 11:11 AM

You can set a Texturemap with SetTextureMapFileName to a material as base-texture. But not to a Node.

All Nodes follow the same rules. They have Inputs and Outputs where something can connect to (even values or textures). Inputs and outputs are arranged as lists. See "PoserPython Methods Manual" in your Poser directory.

Normally you have to search or determine the index of an input/output. But fortunately "Image_Source" is the first entry in the node "Image_Map".

< Node >.Inputs()[0].InNode().SetString(< Path >)

Manual says to "SetString": ** SetString** Explanation Set the string value. In this version of Poser, this is the path of a texture or movie file. Arguments Enter the path name for the desired texture or movie file.