freeze all but non active layer switch

Hello
I'd like to now if somebody could make a speed script to freeze all LAYERS except active layer ON and OFF (with the same script : same hotkey )
Thanks !!! :-)

Comments

Comment viewing options

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

thanks for this!

thanks for this!

Anubis's picture

Really strange... the macros

Really strange... the macros works fine here (Max2009).
Did you like to make a version without callbacks though?

my recent MAXScripts RSS (archive here)

titane357's picture

hello ! I work with max2011

hello !
I work with max2011 design... it is perhaps why this don't works... :-(
Yes, if you could just make a version to freeze non active layer, and to unfreeze all layers, I'd be very happy (no problem if there were already frozen layer)
I find that it would be very handy when working for archviz : freeze other layers and not hide them, so we can have guidelines that man can't move or select by error...

Anubis's picture

Ok, glad to help, you know

Ok, glad to help, you know ;)
I made new macros version + separate macros for unfreezing all layers, cheers.

AttachmentSize
freezingnoncurrentlayers03.rar 378 bytes
unfreeze_all_layers01.rar 354 bytes

my recent MAXScripts RSS (archive here)

titane357's picture

Thanks again Anubis !!! I

Thanks again Anubis !!!
I really enjoy these scripts for archviz.
I add a line so I can freeze all but non selected object layer.
if selection[1] != undefined do
(
selection[1].layer.current=TRUE
(
for i = 0 to LayerManager.count-1 do (LayerManager.getLayer i).isFrozen = on
(LayerManager.current).isFrozen = off
)
)
If that can be usefull for somebody...

titane357's picture

Thanks for answers

Thanks for answers !
Unfortunaly Insanto I got an error.
Anubis I tested the .mcr and I can freeze all layers except active one BUT
I can't manage (with shift key) to return to original config, even 'by hand'
I can't manage anymore to switch freeze/unfreeze layers....
??.?

Anubis's picture

Hi Titane, try attached

Hi Titane, try attached script, cheers.

Well, 1st version not required any user activity, but not looks to me very flexible because cannot turn off the callback, so I wrote 2nd (macro script) version to can switch on/off the RVCallback function. Enjoy ;)

AttachmentSize
freezingnoncurrentlayers01.ms 385 bytes
freezingnoncurrentlayers02.rar 523 bytes

my recent MAXScripts RSS (archive here)

Graph's picture

here you go: toggles freezing

here you go:
toggles freezing of nodes for every layer except the active one.

(
	local curL = LayerManager.current
 
	for i = 0 to layerManager.count-1 where curL != layerManager.getLayer i  do
	(
		local layerNodes = (for i in (refs.dependents (ILayerManager.getLayerObject i)) where isvalidNode i collect i)
		layerNodes.isFrozen = not layerNodes[1].isFrozen
	)
)

Raphael 'Insanto' Steves
http://Graph.Net84.Net

Comment viewing options

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