[Closed] "file, new" without prompt
Hi guys, i was wondering if its possible to create a new file within max (with the settings of the old file intact, like file, new) without getting the window up that asks for “keep objects and hierarchy”, “keep objects” or “new all”.
I don’t think there is a nice way to suppress that message (although it might be possible to handle it using the DialogMonitorOps and UIAccessor functions).
So your options are:
*Use DialogMonitorOps to press the desired button
*Reset the scene instead
*Implement your own New function that either Deletes all objects, Deletes all keys and resets all parenting, or Deletes all keys only while keeping the hierarchy.
I think I may need clarification but it sounds like you are just trying to reset the scene?
resetMaxFile #noprompt
Nice one! It is still asking about saving the scene, but I guess clearing the flag by actually saving the scene wouldn’t be too bad. (My macro recorder does not work due to Krakatoa ;))
Hi Bobo, well, just to be more correct, need to say that I get this in Max 2011, for 2010 am not sure, and in 2009 and below that wouldn’t work. For older version that snippet probably may come in handy:
file = GetDir #Scene + "[\\_new.max](file://_new.max)"
saveNodes #() file quiet:on
checkForSave()
loadMaxFile file quiet:on
Thank you guys so much! Reseting was no option since some settings needed to remain in the scene (plugin stuff, couldnt set that with a script).
Atm I’m using a function to delete all the objects but it seems to fail sometimes when tons of files are created so this information will be very valuable to me
I’ll look into the DialogMonitorOps since I’ve never used it and it sounds very interesting but I got to say that the savenodes option seems perfect for this job.
Thanks again for your information and time!