PDA

View Full Version : Shave and Haircut - Querying guide hairs


Phlok
03-25-2009, 06:02 PM
Hi,

Does anyone have an idea how to query the guide hairs in shave and haircut?

If I select some of them, the script editor echoes

select -r shaveHair1.cv[274][14] shaveHair1.cv[295][14] shaveHair1.cv[315][14] shaveHair1.cv[335][14] shaveHair1.cv[354:355][14] shaveHair1.cv[373:375][14] ;

That's logical, so far.

But I don't understand how to query how many guide hairs there are. And I need this value because it's the starting point for the real stuff I want to programm.

size(shaveHair.cv)

just returns

// Error: Invalid use of Maya object "shaveHair1.cv". //

wich don't get me any further.

I know a guide hair is "growing" out of every vertex in the base geometry (e.g. a poly sphere) and the shaveHair1.cv[id] equals the vertex id of the basic polygon object, but there has to be a way to query the guide hairs directly without the need for querying the poly sphere, first.

greatPumpkin
03-26-2009, 05:58 PM
i haven't played with guidehairs before so this may not help you, but you can get the number of cvs with the following:

size `ls -fl "shaveHair1.cv
"`;

Phlok
03-27-2009, 12:31 PM
Unfortunately, this don't work...

int $i = size(`ls -fl "shaveHair1.cv
"`);
// Result: 0 //
print $i;
0

CGTalk Moderation
03-27-2009, 12:31 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.