PDA

View Full Version : mel to add new hair follicles


tymznd
12-15-2007, 04:37 AM
So I have a hair system with some follicles that have been deleted... I would like mel to run the hair command again to add additional follicles. "createHair" wants to instead create a new system... anyone know of the command?

Duncan
12-18-2007, 08:04 PM
You can paint new hairs in with the paint follicles tool. Or you can select surface points and create hair at those locations. The create hair option box can set the hair system to a current one instead of creating a new one. It will not create hairs in overlapping spots, but rather fill in the gaps.

Duncan

tymznd
12-19-2007, 05:20 PM
I am shooting for this to be mel driven... the manual tools take way too long

Duncan
12-19-2007, 09:05 PM
Here is a mel call you can use. It is not a command, but rather a mel routine, and it is not documented. ( you can find it in the scripts location if you want to examine it)

global proc string createHairCurveNode(
string $hsys, string $surface, float $u, float $v, int $numCvs, int $doOut, int $doStart,int $doRest,int $isPassive,string $startCurve,float $length,int $endHairSystemIndex[],string $hsysGroup,string $hsysOutHairGroup,int $simulationType )

It returns the name of the created follicle's transform.

Here is an explanation of the arguments:
hsys name of the hair system node to append to
surface name of surface to attach follicles to
u, v uv position for follicle
numCvs number of cvs in new hair to add
doOut create an output curve for the follicle
doStart create a start position curve for the follicle
doRest create a rest position curve for the follicle
isPassive make the follicle passive
startCurve name of existing curve to make into follicle curve...
if = "" then generated as straight lline at follicle location
length length of the hair clump
endHairSystemIndex simply create an int array and pass in.
Use the same array for multiple calls to speed up hair creation
hsysGroup name of parent transform to put the follicles under
hsysOutHairGroup name of parent transform for output hair curves
simulationType 1 = dynamic, 2 = static

Duncan

CGTalk Moderation
12-19-2007, 09:05 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.