sweet, now all I have to try and do is port it to python and we're
golden! :-p
On Wed, 2006-05-31 at 07:43 +0200, guillaume laforge wrote:
> I made a little function to select a hair cluster :
>
>
> //the selected hair object
> var oHair = Selection.item(0);
>
> SelectHairCluster(oHair);
>
> function SelectHairCluster(HairObject){
> //Find the hair operator.
> oEnum = new Enumerator( oHair.ActivePrimitive.ConstructionHistory );
> for (;!oEnum.atEnd();oEnum.moveNext()){
> //logmessage(oEnum.item().name)
> if( oEnum.item().name == "Hair Generator Operator" ){
> oOp = oEnum.item();
> oEnumInPort = new Enumerator( oOp.InputPorts ) ;
> for (;!oEnumInPort.atEnd();oEnumInPort.moveNext() ){
> var oInPort = oEnumInPort.item () ;
> if(oInPort.GroupName == "Group_1"){
> var oCluster = oInPort.Target2
> }}}}
> if(oCluster) SelectObj(oCluster);
> }
>
> Hope this help,
>
> Cheers
>
> --
> Guillaume Laforge
> freelance TD | cg Artist
>
>
>
>
> On 5/31/06, Greg Smith <greg(at)stanwinston.com> wrote:
> Is it possible or even probable to somehow have a script
> return the
> cluster in which hair geometry was created from. I am trying
> to write a
> function that interrogates the polymesh surface to find the
> vertice in
> which each guide hair is emitted from. I have the proximity
> code working
> however instead of marching through every vertex on polymesh,
> what I
> want to do is only march through those found in the cluster
> which the
> hair was created from.
> I have a working model if I hardcode the cluster in a GetValue
> command.
> However I'd much prefer if there was a way to abstract that
> data from
> the hair itself, which as the moments go by, seems not likely,
> Yay.. :-|
>
> 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