View Full Version : Follicle query

09 September 2010, 04:36 PM
This should be quite simple. I'm writing an expression that works with Maya hair. I'm trying to find a way to query a follicle, given the output curve that is connected to it. So it should be a simple function that returns a follicle, given a curve.

I've tried playing about with the 'ls' command, but I cannot get the right result out of it.

Thanks in advance.

10 October 2010, 09:03 AM
string $flist[] = `listConnections -type follicle outputCurveShape.create`;
string $follicle = $flist[0];

10 October 2010, 09:06 AM
or as a function:

global proc string getFollicle( string $curveShape)
string $flist[] = `listConnections -type follicle ($curveShape + ".create")`;
return $flist[0];

10 October 2010, 11:41 AM
Amazing, it works perfectly, thanks!

CGTalk Moderation
10 October 2010, 11:41 AM
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.