[Closed] mergeMaxFile options?
Hello,
i’d like to skip somes prompts and select the mergeds models, do you know here i’m wrong?
by advance, tanks
mergeMaxFile @“F:\model.max”; #select #autoRenameDups #useMergedMtlDups
-- this is basic idea, i havent tried it
yourfiles=#("Z:\\ModelPath\\ModelName.max","Z:\\ModelPath\\ModelName.max") -- insert yourfile name here
with undo off with redraw off
(
for i in yourfiles do
(
clearselection()
local newlay = layermanager.newLayerFromName (uniqueName "xLayerName_")
mergeMaxFile i #select #autoRenameDups #useMergedMtlDups quiet:true
for j in selection do newlay.addnode j
)
)
for silent thing you can read maxscript help about mergeMaxFile , there are “quiet:<bool>” switch there…
Thanks a lot for your answer, but it put all the selection of the mergeMaxFile without is original hierarchy in the layer, as he select all the nodes and obj, there is a way to select only the layer parent of the merged Max File ?
i think this lign: “for i in selection do newlay.addnode i” put one by one all the selections in the layer, how to may be do that one time? don’t know…
yourfiles=#(“G:\models\A_MP_Persos\MP_05_Gryff\AutoRIG\A005_Gryff.max”) – insert yourfile name here
with undo off with redraw off
(
for i in yourfiles do
(
clearselection()
local newlay = LayerManager.getLayerFromName “Characters” – find layer Characters
mergeMaxFile i #select #autoRenameDups #useMergedMtlDups quiet:true
for i in selection do newlay.addnode i
)
)