MaskimXul opened this issue on Feb 26, 2011 · 11 posts
markschum posted Sat, 26 February 2011 at 4:54 PM
here is one that looks for an image map name and replaces it , might not be quite what you want.
sorry for the name error , O am not at my poser machine so I am working from memory.
import poser
myimgname = "c:/program files/e frontier/poser7/runtime/textures/oldimgname.jpg"
newimgname = "c:/program files/e frontier/poser7/runtime/textures/newimgname.jpg"
scn = poser.Scene()
fig = scn.CurrentFigure()
mats = fig.Materials()
for mat in mats:
print mat.Name()
tree = mat.ShaderTree()
nods = tree.Nodes()
for nod in nods:
if nod.Type() == poser.kNodeTypeCodeIMAGEMAP:
img = nod.Input(0).Value()
print img
if img == myimgnam:
nod.input(0).SetString(newimgname)
tree.UpdatePreview
scn.DrawAll()