selectType command always return 1 ??

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 12 December 2003   #1
selectType command always return 1 ??

Hi all, I'd like to query if my object is a component or object ..for that I use the function selectType that get a flag just for that I thought..but it seems to return 1 anytime, since it's a bolean ...how come.??

Probably I just don't understand the function is it possible to do what I want with that command or should I use something else?

thanks for any help.

here an exemple if I type :
selectType -q -alc;
it return 1 whatever I select..so ..I'm kind of lost..
 
Old 12 December 2003   #2
Do you want to see if your selection is in compoment mode or not?
I use these lines to check wether I am in vertex (component) or object mode for a Merge function:

// Merge vertices //
if ( size(`filterExpand -sm 31`) > 0 )
polyPerformAction "polyMergeVertex -d 0.001" v 0;

// Polygon Combine //
else if ( size(`filterExpand -sm 12`) > 0 )
CombinePolygons;

All the other number for different component types (edges, uv's, etc) are in the helpfiles, search for filterExpand.
 
Old 12 December 2003   #3
Hey marcel ,
thanks a lot man, I thought about filter expend before..and try with that, but that's gonna be very long to check throught everything to see if it's component or an object..

Well anyway thanks a lot..

If anyone can give a look at the selectType function and tell me if they figure something out that be really great..

thanks a lot everybody

cheers
 
Old 12 December 2003   #4
selectType is used for setting the allowable types of objects that can be selected when using the select tool, not what is currently selected.

The easiest way to determine if the selection is a component or an object is to tokenize the current selection and check the size.

//
string $selection[]=`ls -ls -fl`;
string $buffer[];
for($i=0;$i<size($selection);$i++)
{
tokenize($selection[$i],".",$buffer);
if($buffer[1] == ""){
// it's an object
}else{
// it's a component
}
}


There is another command called selectMode that will tell you what mode the select tool is in (object or component), but it will return incorrect results if you go to component mode by right clicking over an object and choosing a component.

--g
 
Old 12 December 2003   #5
Gdc, thanks a lot man I'll give a go..

cheers
 
Old 01 January 2006   #6
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 11:30 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.