Community
Maya Forum
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Select all is selecting hidden and referenced layers

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
JacksonLamme
285 Views, 2 Replies

Select all is selecting hidden and referenced layers

Hi, I'm trying to set up a huge project by breaking it down into sections and working on each section independently, with the other sections hidden in both geo and reference layers.  So I want to work on an individual section and then "select all" and select just the visible geo, and roll them in to update the group and reference to update the scene.  But whats happening is when I say select all it's selecting even the hidden and and referenced layers.  I would marquee select but isnt it possible that I miss a couple objects or effects?  I'm checking out select by hierarchy but not sure how I would create all new elements under a single hierarchy.  Thanks! 

2 REPLIES 2
Message 2 of 3

If I understood correctly, you want to select all visible objects only, right? Selecting from viewport might be clumsy, therefore script:

select -all -vis -hi; // selects all visible and their hierarchies,even the hidden children
$sel = `ls -sl -tr` ; // filters out everything, but transforms
select -r $sel;

// deselects all invisible transforms within the hierarchy; erase this part of code, if not necessary
for ($s in $sel) { 
    $i = $s+".v";
    if (!`getAttr $i`) select -d $s;
}

See Maya docs on select and ls commands to modify the script to your need.

If used often, select the code and MMB drag it from the ScriptEditor to any of shelves.


,,,_°(O__O)°_,,,
Maya2019.1 @ Windows10 & GeForce GTX1080Ti

If the post was helpful, click the
 ACCEPT SOLUTION  button, so others might find it much more easily.

Message 3 of 3
JacksonLamme
in reply to: JacksonLamme

Wow that is exactly what I was looking for.  Thanks!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report