disable xref scenes + save an incremental copy and enable the disabled xref scenes script :) by anubis and miauu thanks alot | ScriptSpot
Sat Jan 01 2022 22:50:18 GMT+0000 (Coordinated Universal Time)
Saved by
@junks
(
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
)
max saveplus -- incremental file save
TheFile = maxFilePath + (trimRight (getFilenameFile maxFileName) "1234567890") + ".max" --remove trailing numbers
if doesFileExist TheFile do deleteFile TheFile
-- disable only the active xref
--
copyFile (maxFilePath + maxFileName) TheFile
-- re-enable the disabled xref scenes
for i in enabledXRefIndex do (xrefs.getXRefFile i).disabled = false
) else checkForSave()
)
content_copyCOPY
http://www.scriptspot.com/forums/3ds-max/scripts-wanted/disable-xref-scenes-save-an-incremental-copy-and-enable-the-disabled-xref-scenes-script-by
Comments