Forum: Poser 11 / Poser Pro 11 OFFICIAL Technical


Subject: In Poser 11 Python, how can I move the currently selected object?

Anthony Appleyard opened this issue on Jul 28, 2018 ยท 2 posts


ockham posted Thu, 02 August 2018 at 4:17 AM

Here's a simple example that includes all three rotations and translations. First, set each of the translations and rotations to a new value.


import poser

scene = poser.Scene()

a = scene.CurrentActor()

xt = a.ParameterByCode(poser.kParmCodeXTRAN)

yt = a.ParameterByCode(poser.kParmCodeYTRAN)

zt = a.ParameterByCode(poser.kParmCodeZTRAN)

xr = a.ParameterByCode(poser.kParmCodeXROT)

yr = a.ParameterByCode(poser.kParmCodeYROT)

zr = a.ParameterByCode(poser.kParmCodeZROT)

xt.SetValue(0.1)

yt.SetValue(0.2)

zt.SetValue(0.3)

xr.SetValue(30)

yr.SetValue(60)

zr.SetValue(90)


Below is code to set each parameter to an arbitrary CHANGE from the current value.


import poser

scene = poser.Scene()

a = scene.CurrentActor()

xt = a.ParameterByCode(poser.kParmCodeXTRAN)

yt = a.ParameterByCode(poser.kParmCodeYTRAN)

zt = a.ParameterByCode(poser.kParmCodeZTRAN)

xr = a.ParameterByCode(poser.kParmCodeXROT)

yr = a.ParameterByCode(poser.kParmCodeYROT)

zr = a.ParameterByCode(poser.kParmCodeZROT)

xt.SetValue(xt.Value() + 0.1)

yt.SetValue(yt.Value() + 0.1)

zt.SetValue(zt.Value() + 0.1)

xr.SetValue(xr.Value() - 30)

yr.SetValue(yr.Value() - 30)

zr.SetValue(zr.Value() - 30)

My python page
My ShareCG freebies