ScriptSpot

Forum topic · General Scripting

mergeMaxFile nodes to array

By JokerMartini · 2012-04-24

Description

What is the best and easiest way to put the incoming merged objects into an array?
Without having to do the select properties of the mergeMaxFile?


delete objects
fxFile = @"C:\Users\Crabs User\Documents\3dsMax\scenes\test.max"
--//Merge New Particles system
mObjNames = getmaxfileobjectnames fxFile -- get the object names from the file
great = mergemaxfile fxFile mObjNames #AutoRenameDups #renameMtlDups --#select -- merge in the objects and select them

clearlistener()
print great

Comments (1)

This is my approach

barigazy · 2012-04-24

--First collect the scene objects inode.handle
curObjsArr = for o in objects collect o.inode.handle
--Then merge some objects
--And eventually filter and collect merged objls
mergeObjArr = for o in objects where (finditem curObjsArr (o.inode.handle) == 0) collect o