About this site
ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
Comments
.
What is the goal? Select layers and then?
Tools and Scripts for Autodesk 3dsMax
Hello Miauu, there's a loong
Hello Miauu, there's a loong time that i haven't read you!
I was thinking if it was possible to use your script by differents methods and choices, as i'd like to run it an several scenes, for example:
- update assets by selecteds layers
- or update alls assets by layers founded under the layer Clones,
- or by a list separate by comma
- delete olds assets
then run your script as external and transfer arguments
fileIn ("E:\\Script\\UpdateSelectedsAssets.ms")
::selLayersArray
then select the layers to run the script you made?
but it seems to be impossible to select layers in maxscript??
.
I assume that you do not want the user to select the layers manually.
The script should read the names of the layers from somewhere else(a txt file, using name patterns, etc.) and then to selects the proper layers. If what I assume is right, then you can pass the layers directly to the script that will manipulate them.
For example you have:
A text file that contains the names of the layers that have to be selected - LayersToSelect.txt.
Script with name "Select Layers" - to select arbitrary layers.
Script with name "See which layers are selected" - to get the selected layers.
Script with name "Manipulate Layers" - to works with selected layers.
In this situation your tool will works this way:
1- "Select Layers" reads the LayersToSelect.txt and selects the proper layers.
2- "See which layers are selected" collects the selected in the Layer Manager layers.
3- "Manipulate Layers" works with the selected layers.
But, your tool can works this way too:
1- "Manipulate Layers" reads the LayersToSelect.txt and works directly with the layers without selecting them.
This code will print in the MaxScript Listener the names of the selected layers.
This will select all layers which names starts with "Lay">
Both codes works in 3dsmax 2017. I did not test them in lower version.
Tools and Scripts for Autodesk 3dsMax
thanks miauu, may be it's
thanks miauu,
may be it's because i'm working in version 2016, but it select some childs of layers, but not the layer itself,
so i'm going to test the other solution directly:
1- "Manipulate Layers" reads the LayersToSelect.txt and works directly with the layers without selecting them.
but the line (25) where i want to compare the layers to found (array) and layers inside the layers Characters (in the scene) doesn't work,
also the part where i'm trying to delete olds assets is working if layers are selected:
.
Try this. I am not sure if the script will delete the proper layer, so modify it it it not works properly in that part.
No need the layers to be selected and the Layer Explorer to be open.
Tested in 3dsMax 2016. :)
Tools and Scripts for Autodesk 3dsMax
Hello Miauu, i've done that
Hello Miauu, i've done that to make it work, if someone need it someday:
.
I'm glad to help. :)
Tools and Scripts for Autodesk 3dsMax