dehahs
07-05-2008, 01:43 PM
Hi.
i've written a script to import 3ds files into max and rename objects within each file to correspond to the file name, which is simple enough.
now i want to group all the objects of the same name as they come into max (for easier selection) but i can't figure out how to. here's the script (quite rudimentary):
impath="E:\\DI\\DI ConstructionAnimation\\3ds\\"
impcount= impath.count+3
--change the import file type as needed
impext="*.3ds"
impfile=impath+impext
igsfiles = getFiles impfile
nof = igsfiles.count
for f = 1 to nof do
(
importfile igsfiles[f] #noPrompt
impname = substring igsfiles[f] impcount 100
max select all
$.name = impname
group selection name: impname
max freeze selection
)
max unfreeze all
the problem is that the current script ends up grouping everything in the scene with the same name.
also, is there a workaround script that can select similarly named objects and group them by that same name?
thanks very much.
i've written a script to import 3ds files into max and rename objects within each file to correspond to the file name, which is simple enough.
now i want to group all the objects of the same name as they come into max (for easier selection) but i can't figure out how to. here's the script (quite rudimentary):
impath="E:\\DI\\DI ConstructionAnimation\\3ds\\"
impcount= impath.count+3
--change the import file type as needed
impext="*.3ds"
impfile=impath+impext
igsfiles = getFiles impfile
nof = igsfiles.count
for f = 1 to nof do
(
importfile igsfiles[f] #noPrompt
impname = substring igsfiles[f] impcount 100
max select all
$.name = impname
group selection name: impname
max freeze selection
)
max unfreeze all
the problem is that the current script ends up grouping everything in the scene with the same name.
also, is there a workaround script that can select similarly named objects and group them by that same name?
thanks very much.
