Forum Moderators: nerd
Poser 11 / Poser Pro 11 OFFICIAL Technical F.A.Q (Last Updated: 2024 Nov 17 7:07 pm)
Welcome to the Poser Forums! Need help with these versions, advice on upgrading? Etc...you've arrived at the right place!
Looking for Poser Tutorials? Find those HERE
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
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
In a Poser 11 Python script., how can I move the currently selected object by (dx, dy, dz)?
In a Poser 11 Python script, how can I rotate the currently selected object by (dX, dY, dZ) about its rotation axes?