Hi!
I'm working on a script where I need a list of everything in the selection except joints. While doing that, I saw that the ls command has the flag "excludeType (ext)" which sounded exacly what I would have needed. But I realised while using this flag, that it was giving me the exact same result then when I used the "type (typ)" flag or the "exactType(et)" flag.
Now I know that I can just get what I need by creating two lists and removing one from the other.
MEL:
string $notJoints[] = stringArrayRemove(`ls -sl -typ "joint"`, `ls -sl`);
Python:
notJoints = [o for o in mc.ls(sl= True) if o not in mc.ls(sl= True, et= 'joint')]
But still, this would be more elegant:
notJoints = mc.ls(sl=True, ext ='joint')
Also, if this issue doesn't get fixed, it would atleast be nice if this flag was mentioned as obsolete in the docs, so people like me don't spend 20 minutes trying to figure why the command is not giving the expected result.
Have a nice day 🙂
PS.: If I did something wrong and the flag is working, just not as I expected. I would be delighted to hear how it is done correctly.
I tried this out on Maya 2022, and it is not working, just like you said. Here's the interesting thing. I tried it out with different combinations of flags, and the results are not consistent at all. Here are some examples.
That is interesting. So the flag does something in combination with other flags. But as you mentioned, there doesn't seem to be much consistency to it...
Can't find what you're looking for? Ask the community or share your knowledge.