Forum: Poser Python Scripting


Subject: Morphs: copying and mirroring

unrealblue opened this issue on Mar 04, 2020 ยท 30 posts


adp001 posted Sat, 07 March 2020 at 1:47 AM

Sure that 0 is allways the center?

Try this following with a few actors. Select the actor to inspect and run the script:

from collections import namedtuple

sc = poser.Scene()
ac = sc.CurrentActor()
geom = ac.Geometry()

VERT_REC = namedtuple("VERT", "X Y Z idx")
verts = [VERT_REC(v.X(), v.Y(), v.Z(), i) for i, v in enumerate(geom.Vertices())]
_min, _max = min(verts), max(verts)

print "Min vert value in", ac.Name(), "=", _min
print "Max vert value in", ac.Name(), "=", _max