trepleen opened this issue on Feb 14, 2018 ยท 8 posts
trepleen posted Wed, 14 February 2018 at 2:18 PM
I have a prop attached to V4, but I need the props world position.
I have python shell open right now. I need to do something like this:
Print actor.attachedProp.worldXYZPosition
Unfortunately Poser won't show the world position if the prop is attached to something, it only shows it's XYZ in relation to it's parent.
Boni posted Wed, 14 February 2018 at 2:34 PM
This may be simple and not what you are looking for ... but have you tried selecting the prop and then using the pose camera?
Boni
"Be Hero to Yourself" -- Peter Tork
trepleen posted Wed, 14 February 2018 at 2:57 PM
Unfortunately changing camera's does not reveal an attached props world position. It still shows it's xyz in relation to it's parent.
ockham posted Wed, 14 February 2018 at 6:57 PM
Looking back at my old stuff, it seems that I always used WorldDisplacement. As I recall, this worked for all objects regardless of parenting or body-part-ness.
(X,Y,Z)=actor.WorldDisplacement()
KarinaKiev posted Thu, 15 February 2018 at 2:47 PM
I didn't try this, but who knows:
If (in Poser's Hierarchy Editor) you parent a prop (manually) to UNIVERSE (i.e. unparent it from the figure), it's real coordinates are shown in the prop's parameters.
Maybe unparenting the prop in Python, then reading it's (hopefully) RW-coordinates and finally reparenting it to it's original parent could do the trick?
Karina
trepleen posted Thu, 15 February 2018 at 4:55 PM
ockham posted at 4:55PM Thu, 15 February 2018 - #4324374
Looking back at my old stuff, it seems that I always used WorldDisplacement. As I recall, this worked for all objects regardless of parenting or body-part-ness.
(X,Y,Z)=actor.WorldDisplacement()
Would you happen to know how to print that out in the python shell?
ockham posted Thu, 15 February 2018 at 5:39 PM
No, I haven't used the python shell. I suppose you could do something like
(X,Y,Z)=actor.WorldDisplacement()
print "X = %f, Y = %f, Z = %f" % (X,Y,Z)
trepleen posted Fri, 16 February 2018 at 7:44 PM