Chaos Corona Forum
General Category => Off-Topic => Topic started by: aaouviz on 2021-02-04, 11:10:56
-
Off topic, I know. But this is my fav forum and I know you lot are super smart, away from the Corona world too...
I'm wondering if anyone knows how I can script an action to toggle OFF snaps when I provide a hotkey.
I can TOGGLE snaps easily enough with a script, but I want to disable (aka turn off) snaps even if it's already off. The problem with the toggle is that if I press my hotkey it might turn it on when I actually want it off.
The purpose of this is that I want to combine an "Unhide all" with Toggling snaps OFF so my heavy scenes don't freeze up when I unhide a lot of geometry.
I hope this is clear! Thanks for any tips.
-
but I want to disable (aka turn off) snaps even if it's already off.
Seems like you need just "snapmode.active=false"?
Good Luck
-
Right you are sir! Big thank you!
(Though, I swear I did try this... must have got some combination of it wrong somewhere.)
Thanks again.
-
Hi hi,
Another maxscript related question seeing as you answered the last so well :)
I want to turn off a specific layer (the layer is called 100_SS) with a simple little MaxScript
I know this must be possible, but my maxscript skills are not quite up-to-scratch...
Thanks in advance!
-
try this:
((layerManager.getLayerFromName "100_SS")).ishidden = true
-
Seems to work!
Thanks mate, appreciate it :D
-
Ok, now I'm here to bother you smart folk once again...
I have this following script:
((LayerManager.getLayerFromName "100_SS")).current = true
macros.run "Layers" "SceneExplorerSetActiveLayerAsParentLayer"
((LayerManager.getLayerFromName "0")).current = true
It's intended to set my "100_SS" layer as current, move the selected objects to that layer and then set default layer back as current. It works perfect :D
However, I also want to make this more useful by turning it into either a button or keyboard shortcut. I've done this previously with other snippets of code with the following:
macroScript AACollapseLayers
category:"1AAScripts"
toolTip:""
(CODE GOES HERE
This doesn't work. ā€ˇParenthesis "( )" in the wrong place, or something, but no matter what I try, I can't get this to work. Any tips?
Much appreciated!
-
macroScript AACollapseLayers category:"1AAScripts" -- buttonText:"insert here"
(
((LayerManager.getLayerFromName "100_SS")).current = true
macros.run "Layers" "SceneExplorerSetActiveLayerAsParentLayer"
((LayerManager.getLayerFromName "0")).current = true
)
-
Amazing, thank you again mate.
Super helpful stuff, my workflow is buzzing now thanks to your help