View Full Version : selectType command always return 1 ??

12 December 2003, 04:01 PM
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 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 ..I'm kind of lost..

12 December 2003, 04:22 PM
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 )

All the other number for different component types (edges, uv's, etc) are in the helpfiles, search for filterExpand.

12 December 2003, 08:40 AM
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


12 December 2003, 03:58 PM
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[];
if($buffer[1] == ""){
// it's an object
// 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.


12 December 2003, 05:01 PM
Gdc, thanks a lot man I'll give a go..


CGTalk Moderation
01 January 2006, 08:00 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.