Vertex position

Discussions concerning programming of SOFTIMAGE©
User avatar
sOBE
Posts: 25
Joined: 30 Apr 2012, 08:31

Vertex position

Post by sOBE » 01 Sep 2012, 15:48

Hi all, I have another silly question, Please I need to find out positions (x y z) for every vertex in selection, how can do it in Javascript ?
Thanks

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 09:02
Location: Montreal Canada

Re: Vertex position

Post by xsisupport » 01 Sep 2012, 18:52

You can use the ComponentCollection.

Assuming some points are selected on a mesh:

Code: Select all

x = new VBArray( selection(0).SubComponent.ComponentCollection.PositionArray ).toArray()

LogMessage( x )
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

User avatar
sOBE
Posts: 25
Joined: 30 Apr 2012, 08:31

Re: Vertex position

Post by sOBE » 01 Sep 2012, 19:03

Thank you Steve :-bd