[Closed] hide unhide speed in maxscript?
Hi,
I am hidding unhiding objects in my scene using maxscript (using for loop) by simply checking the ISHIDDEN property of each object, but it is performing very slow compared to standard max hide unhide, I have more than a 6 million face count of my scene. how can I make it perform more faster?
Thanks
Ravi
you have to hide/unhide by collection of nodes. Collect all nodes that have to be hidden/unhidden and hide/unhide…
unhide (for obj in objects where obj.ishidden collect obj)
if you want to speed it up a bit do it with UNDO OFF
There are no special-magic-hidden techniques to speed these operations up…
Hi denisT,
I was doing it another way by checking ishidden property of each object and also setting it to true or false without using collections may be that is the reason of slow speed, collection method is much much much faster.
below is the timestamp results for 6400 standard spheres with 6144000 faces.
for obj in objects where obj.ishidden do obj.ishidden = false
this takes a long 27.39 sec to unhide , very very slow
unhide (for obj in objects where obj.ishidden collect obj)
this takes only 0.406 sec to unhide
Thanks again
ravi
You could also disable the scene redraw which the loop is working. I’m guessing that is what is slowing everything down. Once complete you can enable scene redraw and then redraw the whole scene.