View Full Version : Follicle query

09-30-2010, 05: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-01-2010, 10:03 AM
string $flist[] = `listConnections -type follicle outputCurveShape.create`;
string $follicle = $flist[0];

10-01-2010, 10:06 AM
or as a function:

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

10-01-2010, 12:41 PM
Amazing, it works perfectly, thanks!

CGTalk Moderation
10-01-2010, 12:41 PM
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.