Max unhide all command

I'm sure I'm just using the wrong keyword to search and the answer is readily available, but how do I run:

Max unhide all

from a script and have it either not prompt about unhiding hidden layers, or feed it the answer no from the script? Everything I try #nopompt, with quiet true, either fails or does nothing.

thanks in advance.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
xXDambielXx's picture

Thanks but..

Hey guys, thanks for the replies, both commands do unhide all objects, unfortunately that includes unhiding hidden layers which I didn't really want. After some fiddling (I hate the layermanager functions) I came up with this:

for o in objects where o.ishidden do
(
if (LayerManager.getLayerfromname (o.layer.name)).ishidden == false then
o.ishidden = false
)

Which seems to unhide objects that aren't on hidden layers as required. Is there anything wrong with that script or something that would make it better, faster, w/e?

Thanks again.

jahman's picture

.

Why not iterate over layers instead?

nodesToUnhide = #()
for i=0 to layerManager.count-1 where not (_layer = layerManager.getLayer i).isHidden do
(
    local tmpArray
    _layer.nodes &tmpArray
    join nodesToUnhide tmpArray
)
nodesToUnhide.isHidden = false
pixamoon's picture

`

Hi,

try this:

for o in objects where o.ishidden do o.ishidden = false
jahman's picture

.

objects is a collection so you can simplify it to:

objects.isHidden = false

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.