Re: [scripting] hair geometry

Date : Thu, 25 May 2006 00:54:39 +0000
To : XSI(at)Softimage.COM
From : "brad" <brad(at)cg-soup.com>
Subject : Re: [scripting] hair geometry
subCom = Application.Selection(0).SubComponent
subColl = Application.subCom.ComponentCollection

Access all the point object data from the component collection.


00:37
>  
>  Another question to append to my list of questions I am able to obtain
>  the pntSubComponent on the guide hair, however I can't figure out how
>  get the point object that the subcomponent belongs to so I can absract
>  the position vector of that point. It seems so trivial but for some
>  reason, I'm stumped on that one too.
>  
>  
>  On Wed, 2006-05-24 at 15:29 -0700, Greg Smith wrote:
>  > Okay so I cracked my knuckles, and started to get into the nuts and
>  > bolts of the hair geometry primitive and so far I am a little
>  > frustrated. Maybe its because I am still a little wet behind the ears
>  > when tinkering with the internals of xsi, I don't know.
>  >
>  > So down to the nitty gritty. Using python, I am trying to get access at
>  > components of hair geometry object. one of the things I am having an
>  > issue with is finding a direct method in finding the total amount of
>  > guide hairs live on the hair object. Thus far I haven't found a direct
>  > method. The only thing I have come up with so far is dividing the total
>  > number of points found in the hair object by the total amount of points
>  > found in a guid hair. This gives me the appropriate number, but I would
>  > prefer something a little more elegent.
>  >
>  > Is there any way to grab the 2d array index of a point using the object
>  > model?
>  > when I select a point on one of the guide hairs, I get this line in the
>  > history log.
>  >
>  > 	 Application.SelectGeometryComponents("Hair.pnt[(27,3)]")
>  >
>  > However I don't want to use a string argument, I'd much rather use an
>  > object method, however when I try, I can't figure out how to access a
>  > point component in that method. I can gain access of a point by index
>  > number from the pointcollection using the code below.
>  >
>  > 	 xsi = Application
>  > 	 hr = xsi.ActiveSceneRoot.FindChild('Hair')
>  > 	 ohair = hr.ActivePrimitive.Geometry
>  > 	 oPnts = ohair.Points
>  >
>  > I tried appending .SubComponent to oPnts and work from there, but I
>  > can't figure out where I am supposed to proceed.
>  >
>  > any Ideas?
>  >
>  > Thanks,
>  >
>  > Greg
>  >
>  >
>  >
>  > ---
>  > Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
>  > unsubscribe xsi
>  
>  ---
>  Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
>  unsubscribe xsi
>  
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.