select object in layer
Hi guys,
i always wanted a script that i - in my totally scripting ignorance - think can be done easily. I need to select objetcs in a layer that is not necessarily the current one. Wich means, the script must store the current layer, then make the selected object´s layer current, then select all the objects in the new current layer and then set the stored layer back to current. Is it hard to script this? any good soul could do that? :)
so here´s my suggestion for a new script, thanks for your attention!
cheers,
Jsrocha
Comments
for those who are wondering
it is basically a working "select children" command (the one in max does not work), it checks the selected object's layer and do a "select children" for that layer.
example:
you have one box object in a layer called "ceiling", you run this script and it selects all the other objects that are assigned to "ceiling".
thank you MIAU!
U
Thank you for this script!
Thank you for this script! How can execute it via keyboard shortcut or set it on a quad or menu? Thanks!
.
Save this as MCR file and drag and drop it in Max viewport
Go to Tools category and assign a hotkey to Select object in layer.
You can change the category name and the name of the script before to install it.
Tools and Scripts for Autodesk 3dsMax
Try this:
for obj in selection do obj.layer.select true
Thanks man, this is exactly
Thanks man, this is exactly what i need!
cheers,
Jsrocha
I will add "max create mode"
I will add "max create mode" because in modify mode the selection take a loooong time.
Hey guys, thanks for your
Hey guys, thanks for your help!
what i really need is to select all the objects in the same layer as the SELECTED object. Is it possible to do that?
thanks in advance,
Jsrocha
Say the current layer is
Say the current layer is Layer01 and you want to select everything in Layer02.
(layerManager.getLayerFromName "Layer02").select true
The current layer is still Layer01.
edit: Oops. Sorry Swordslayer. I should have refreshed before posting.
If you know the name of the
If you know the name of the layer, this should do the trick:
fn selectNodesInLayer layer_name =
(
local nodes
(LayerManager.getLayerFromName layer_name).nodes &nodes
select nodes
)
selectNodesInLayer "The Name of the Layer Goes Here"
Some of my scripts and MCGs :: 3ds Max SDK Intro for Scripters