Stripping string names from selected
Hi, new user here , first off I must say what an amazing community.
I found this script and wondered how I could edit the string name of the selected object
ie selected objects are box_001 , dave_ , foobar_blahblah , instead I just want to strip everything away after the underscore of the name. Which will then build the layers and place the objects into the layer
(
if selection.count != 0 do
(
for o in selection do
(
objName = o.name
if (objLayer = LayerManager.getLayerFromName objName) == undefined then
(
objLayer = Layermanager.newLayerFromName objName
objLayer.addNode o
)
else
(
objLayer.addNode o
)
)
)
)
Kind regards
Rob
Comments
Thanks so much for the
Thanks so much for the pointer
r
.
Tools and Scripts for Autodesk 3dsMax