Tue, Dec 31, 4:50 PM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Dec 31 11:34 am)



Subject: python: get 2d (screen) coordinates?


colorcurvature ( ) posted Tue, 05 April 2011 at 3:59 PM · edited Sat, 27 July 2024 at 6:44 AM

Hi poserpythoners,

does anybody know a way to get the screen coordinates of a vertex? The WorldVertex() function gives the position in world space, but I did not find anything for the 2d/viewport coordinates.

Thank you,

col


PhilC ( ) posted Tue, 05 April 2011 at 4:34 PM

screenX,screenY,screenZ = poser.Scene().WorldToScreen(worldX,worldY,worldZ)

Translates World coordinates to screen coordinates. The Z screen coordinate is somewhat imaginary but is there none the less.


colorcurvature ( ) posted Tue, 05 April 2011 at 5:29 PM

Aaah. i missed that. thanks a ton, I will investigate this.


Cage ( ) posted Wed, 06 April 2011 at 12:14 AM

Now I'm dying to know what you're up to.  :lol:  I've been waiting for someone to find a use for that function.  😕

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


Privacy Notice

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.