PDA

View Full Version : Object and component ID values...


Modulok
07-04-2004, 06:13 AM
Is there a mel command that will give the type of object selected? I know of the ls -sl -st but this isn't quite what I was looking for...

Basically what I want (ideally), is to know the type of object selected, as well as the type of component selected. the filterExpand command is wonderful, however it doesn't include all object types. Joints for example are not listed as having a filterExpand flag...

Ideally I'd like a command to return an array of intergers. So for example if I had a polygonal object selected it would return a value of 1, a nurbs object would return a value of 2, poly vertices would return a value of 3, etc etc...so that each object and component type had its own unique ID number that gets returned to an array.

I think I can pull this off in a very long winded, round about way by using the filter expand and ls command creating my own id list and such...But before I start a very in depth process I thought I'd check to see if there was an easier way to go about it.

Thanks.
-Modulok-

_vine_
07-04-2004, 06:32 AM
Have you tried the objectType -tt <objectName> command? It'll return a string value for whatever the object you want is (i.e. "1481003597" for a transform). This can then be queried to get the actual type with its -tpt flag.

I hope this helps.

Modulok
07-06-2004, 04:48 PM
Thanks man, I shall give it a shot and see where it gets me :thumbsup:

-Modulok-

CGTalk Moderation
01-18-2006, 03: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.