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 Tools Search this Thread Display Modes
  12 December 2003
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 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
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
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
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
Gdc, thanks a lot man I'll give a go..

  01 January 2006
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
Society of Digital Artists

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

All times are GMT. The time now is 05:54 PM.

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