Accessing coordinates of verticies using Python?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Display Modes
  05 May 2008
Accessing coordinates of verticies using Python?

Hey guys,

I've been learning Python within the context of some 3d apps, specifically Houdini Apprentice and XSI Essentials...anywho, I was wondering if anyone know how to access the coordinates of the verticies of a polygon mesh in XSI using Python?
 
  05 May 2008
Hi,
sorry not much help with the particulars of Python, but as far as the SDK goes, good start for you would be the positionArray property of a pointCollection object.
http://softimage.wiki.avid.com/sdkd...sitionArray.htm
 
  05 May 2008
oSel = Application.Selection(0) #to get the first object in the selection
tupPP = oSel.ActivePrimitive.Geometry.Points.PositionArray #get the postion array as a 3xN tuple
__________________
Come, Join the Cult http://www.cultofrig.com - Rigging from First Principles
 
  05 May 2008
Thanks guys!
 
  05 May 2008
Hmmmm, am I correct in understanding that oSel.ActivePrimitive.Geometry.Points.PositionArray
returns points in local coordinates? Is there a way to get them as globals?
 
  05 May 2008
get the kine of the same object and push them through the kine.global matrix.
in python you can map a lambda function making it pretty much instantaneous even with a big mesh.
__________________
Come, Join the Cult http://www.cultofrig.com - Rigging from First Principles
 
  05 May 2008
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 05:29 PM.


Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.