# searches tree for all materials in figure and replaces named file with new file name # save as material collection to save running script again import poser myimgname = "c:/program files/e frontier/poser7/runtime/textures/oldimgname.jpg" # file name used newimgname = "c:/program files/e frontier/poser7/runtime/textures/newimgname.jpg" # new file name to be used 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()