I try to make a simple script to hide part of layers.
Hello, I try to develop a maxscript very simple but I don't understand how it can work!
The purpose is to make a simple script which can hide all the layers who's name begin by "ref".
For now, I just have this part of code and it seems that it's not a good beginning!
(
(layerManager.getLayer 0).current = true
hide_layers=layerManager.getLayerFromName "ref"
hide_layers.isHidden = true
)
Thanks for yours responses
Comments
Hi Brave, Glad i could help.
Hi Brave, Glad i could help. Great to hear you've come up with something that works. Often that's the whole trick to scripting;- Having a task/project that demands it, and then the drive to work through to the answer(s). Well done on reaching the goal, and Happy Scripting from here on in! :)
I'm lining myself up to take a look at C++.I'm pretty new to programming having only ventured into MaxScript after working with 3dsMax for years doing Architectural Visuals; all those pre-lim block models made me write Block Model ToolBox 4.6 to speed up my workflow. Good to know that others are using it now too.
I'm hoping that learning a little C++ might aid my MaxScript (though i know they're different), and i'm sure it'll be interesting to delve into. Simple games, here we come! ;)
Martin
www.martinskinner.co.uk
I have a question on
I have a question on this:
Ive been looking at the script you guys posted, and can hide/unhide layers based on what the layer starts and ends with - even if its text.
But I can't figure out how to hide/unhide based on a parameter thats actually "inside" the layer.
For example:
I can hide/unhide layers like:
Bldg_01
by using either "Bldg*" or "*01"
But how would you hide:
Z_Bldg_01_HIDE
if you wanted to use Bldg or 01?
Thanks!
Hi Brave, The attached
Hi Brave,
The attached should do the job ;)
It looks for numbering in your layering system and then only shows the Level you have picked from the drop down list whilst leaving default 0 layer on.
Hope it's of help.
Martin
www.martinskinner.co.uk
Hi Braven, I think the tool
Hi Braven,
I think the tool Scene States already found within 3dsMax might do the trick. No scripting needed ;)
Have a look, see if it does the trick.
Martin
Here's the answer including
Here's the answer including comments, just cut and paste.
Hi, Are you still struggling
Hi,
Are you still struggling with this script?
I'd be happy to have look at sorting it.