Hi dear,
I would like to use this script from: http://www.scriptspot.com/forums/3ds-max/scripts-wanted/disable-xref-sce…, but I need REMOVE xref, save to separate file and then again ADD xref back and save to previous file. Now it is only DISABLING xref. practicaly I would like to create a copy max file where is no xref and name of that file is every time same. I have modified this script, but it is only disabling xref and I don't know how to rewrite it for removing xref. Here is it. Any help will be much much appreciated! I am very easy to write mascript, so be patiant please Thanks Tomas.
(
if maxFileName != "" then
( -- if the scene saved
local enabledXRefIndex = #()
for i = 1 to xrefs.getXRefFileCount() where ((xrefs.getXRefFile i).disabled == false) do
(
(xrefs.getXRefFile i).disabled = true -- disable the xref
append enabledXRefIndex i -- store the index of the active xref scenes
)
filename = (maxFilePath + maxFileName)
noxreffilename = "File_No_Xref.max" as string
--noxref = (maxFilePath + noxreffilename)
saveMaxFile (maxFilePath + noxreffilename)
for i in enabledXRefIndex do (xrefs.getXRefFile i).disabled = false
saveMaxFile filename
) else checkForSave()
)
miauu · 2014-03-06