Hello
can anybody tell me how to make it work ?
"for obj in selection do obj.layer.Boxmode = true" don't work
if somebody can help, i need it to work with lot of trees
(I select one object of a layer, run the script all objects of the same layer have "moxmode" in object property)
Thanks
Comments (9)
Comment policy
looks like duplicated thread...
I answer to you here:
http://www.scriptspot.com/forums/3ds-max/general-scripting/turn-object-f…
before seeing this topic
works fine!
just need to set #displayByLayer for your objs to True ;)
thanks for answer Anubis,
but I don't want "set #displayByLayer for your objs to True"
because I prefer working with display by object.
aha, ok, then...
the code is changed really small:
thanks :-)
If you execute the script line by line in the maxscript editor, then there is no max version that will works with
local varName = something
you are right... but I was tired :-)
thanks a lot for answer !!!!
Miauu : max2013 don't like "local layerObjects", but it works fine without
Try this:
another method
fn turnBoxMode state: = if selection.count != 0 do
(
local layersArr = #()
for o in selection where findItem layersArr o.layer.name == 0 do
(
append layersArr o.layer.name
selectionLayer = ILayerManager.getLayerObject o.layer.name
(refs.dependentNodes selectionLayer).boxmode = state
)
free layersArr
)
turnBoxMode state:on