Message 1 of 3
Hiding all the references plans layers

Not applicable
05-27-2008
01:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, somebody could help me?
I try to develop a maxscript very simple but I don't understand definitely maxscript.
The purpose is to make a simple script which can hide all the layers who's name begin by "ref".
For example an active/inactive button which can show/hide all the "references plans" with similar names as:
"ref layer a"
"ref layer b"
"ref layer c"
For now, I just have this part of code but it's just hiding the layer named "ref" and not all the layers with "ref" in the name:
(
(layerManager.getLayer 0).current = true
rfp= "ref"
for L = 1 to LayerManager.count do
(
layer = (LayerManager.getlayer (L-1))
if layer.name == rfp then layer.ishidden = true
)
)
Thanks for advance for your help!
I try to develop a maxscript very simple but I don't understand definitely maxscript.
The purpose is to make a simple script which can hide all the layers who's name begin by "ref".
For example an active/inactive button which can show/hide all the "references plans" with similar names as:
"ref layer a"
"ref layer b"
"ref layer c"
For now, I just have this part of code but it's just hiding the layer named "ref" and not all the layers with "ref" in the name:
(
(layerManager.getLayer 0).current = true
rfp= "ref"
for L = 1 to LayerManager.count do
(
layer = (LayerManager.getlayer (L-1))
if layer.name == rfp then layer.ishidden = true
)
)
Thanks for advance for your help!