Forum: Poser Python Scripting


Subject: need info on how to change ytran of a figure in python having strange probs hel

nightfir opened this issue on Jul 27, 2006 · 4 posts


nightfir posted Fri, 28 July 2006 at 9:33 AM

Nruddock :

Hmmm that's weird. Everything else except for x, y, and z tran the values come out ok.  I am using inches as working units inside Poser instead of native Poser Units. I was just about to post a new topic about a possible bug in Poser SR3 and a fix. Here is the post:

Hi:

I think I found a possible bug in Poser 6 SR3. It involves using python to set yTran of a figure, etc. In a previous post I asked how you would go about writing a python script that would allow one to change the value of yTran for a figure as I was getting strange values in yTran, plus xTran, and zTran. No probs with xRotate, yRotate, zRotate. This is the script from the previous post in the python scripting forum:

 

scene = poser.Scene()

fig = scene.Figure("tshirt2")

act = fig.Actor("Body")

act.SetParameter("yTran",10.0)

 

Well I was not getting yTran set to 10. I was getting the value 1032.000003. I found out after a bit of work that Poser was taking the value 10.0 and dividing it by .00968992244452 which of course equals 1032.000003. Say what!!!!!!! Anyways I came up with a new script to fix the problem. It's as follows:

 

scene = poser.Scene()

fig = scene.Figure("tshirt2")

act = fig.Actor("Body")

adjust  = .00968992244452

a = 10.0

b = adjust * a

act.SetParameterByCode(poser.kParmCodeYTRAN).SetValue(b)

 

Now could someone test both scripts with their own figure, and of course changing "tshirt2" to the name of that figure, with the versions of Poser they have. Like 4, 5, 6 with whatever service release they may have. Then get back to me, and the rest of us via this post with the results.  I have no idea if it's Poser SR3, my machine, or what.

 

I have not yet removed Poser 6 SR3 and reinstalled Poser 6 SR2. I have to dig up my original Poser 6 cd, and then find what disk I put the Poser 6 SR2 update on. Which I'm not doing except as a last resort. I have no idea where the needed disks are. It's what I get for being disorganized. Me and my other half remodeled my computer room, and while moving stuff out,  tossed stuff into boxes, etc and then just put stuff back any old place after we were done. LOL.  It's what I get for being lazy.

.

.

I'll switch over to Poser units and try running the original script again and see what happens.