General Category > Off-Topic

3DS Max script help

<< < (2/2)

aaouviz:
Seems to work!

Thanks mate, appreciate it :D

aaouviz:
Ok, now I'm here to bother you smart folk once again...

I have this following script:


--- Code: ---((LayerManager.getLayerFromName "100_SS")).current = true

macros.run "Layers" "SceneExplorerSetActiveLayerAsParentLayer"

((LayerManager.getLayerFromName "0")).current = true
--- End code ---

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:

--- Code: ---macroScript AACollapseLayers
category:"1AAScripts"
toolTip:""
(CODE GOES HERE
--- End code ---

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!

clemens_at:

--- Code: ---macroScript AACollapseLayers category:"1AAScripts" -- buttonText:"insert here"
(
((LayerManager.getLayerFromName "100_SS")).current = true
macros.run "Layers" "SceneExplorerSetActiveLayerAsParentLayer"
((LayerManager.getLayerFromName "0")).current = true
)
--- End code ---

aaouviz:
Amazing, thank you again mate.

Super helpful stuff, my workflow is buzzing now thanks to your help

Navigation

[0] Message Index

[*] Previous page

Go to full version