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!
Solved! Go to Solution.
Solved by hamsterHamster. Go to Solution.
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.
Can't find what you're looking for? Ask the community or share your knowledge.