Master Scene Cleanup (Empty Nodes, Zombie Tracks & Memory Flush)
Master Scene Cleanup is a single-dialog utility that bundles four common 3ds Max scene-maintenance tasks into one toolbar button. Bloated .max files, mysterious slowdowns, and inflated save times are often caused by leftover empty geometry, dormant Track View managers ("zombie tracks"), and unflushed memory — this script targets all of them in one pass, with checkboxes so you can pick exactly which operations to run.
What it cleans:
1. Empty Nodes — Scans every scene object and flags geometry with zero faces or shapes with no splines/knots. These typically accumulate from imported files, broken modifiers, or interrupted operations. The script gathers candidates, selects them in the viewport, shows you a count, and asks for confirmation before deleting — nothing is removed silently.
2. Max_MotionClip_Manager — A common source of file bloat from CAT/Biped or motion-clip workflows. The script removes all attached note tracks (the actual data payload) and the manager's controller, freeing up scene memory that often persists long after the animation work is done.
3. Anim_Layer_Control_Manager — Leftover animation-layer infrastructure that lingers after layers are deleted or merged. Removed safely if present.
4. Retimer_Manager — Residual data from the Retimer tool. Removed safely if present.
5. Memory Flush — Runs clearUndoBuffer(), freeSceneBitmaps(), and gc() in sequence to reclaim RAM held by the undo stack, cached bitmap previews, and unreferenced MAXScript values. Useful when 3ds Max has been running for hours and is feeling sluggish.
Why a checkbox dialog? Each operation is independently useful, and not every cleanup task is appropriate for every scene. If you only want to flush memory without touching geometry, or only purge zombie tracks before a save, you can toggle the rest off. After running, the script displays a per-operation report showing exactly what was found, cleaned, or skipped.
Installation:
Save the script as a .ms file (e.g., MasterCleanup.ms).
Drag the file into a 3ds Max viewport — this auto-registers the macroscript.
Open Customize → Customize User Interface → Toolbars (or Menus / Quads / Keyboard).
Find the category "mease" in the dropdown — the entry "Master Cleanup" will be there.
Drag it to a toolbar, assign it to a hotkey, or add it to a menu.
Alternatively, run it via Scripting → Run Script... for a one-off use without registering it permanently.
Usage Tips:
Always save your scene before running. Although the empty-node deletion is confirmed via dialog, the zombie-track cleanups and memory flush are immediate and not reliably undoable.
After cleaning zombie tracks, the report reminds you to save and reset the scene. This is intentional — Track View managers can leave stale references in memory until the file is reloaded, and saving + resetting + reopening is the only way to guarantee the cleanup is fully committed to disk.
The empty-node detector wraps face/spline counts in a try/catch so it won't choke on exotic object types (proxies, V-Ray meshes, Alembic caches, etc.) — those are simply skipped rather than flagged as empty.
Run this regularly on long-running production scenes. File sizes can drop significantly when zombie Motion Clip data is purged, especially on files that have been through CAT or Biped retargeting.
Pair this with the One-Step Copy & Relink and V-Ray to Standard Converter scripts for a complete pre-archive workflow: convert renderer-specific nodes → relink textures → strip empty nodes and zombie tracks → save.
What this script does NOT do:
Does not purge unused materials in the Material Editor (use Reset Material Editor Slots for that).
Does not delete unused layers (use the Layer Manager).
Does not remove orphaned modifiers, custom attributes, or scripted controllers.
Does not compact the file on disk — you must perform a Save As (not just Save) afterward to reclaim file size.
Does not touch animation keyframes or any actual animation data on scene objects — only the manager infrastructure in Track View.
Safety Notes:
The empty-node finder uses numfaces == 0 for geometry and numSplines == 0 or numKnots obj 1 == 0 for shapes. Locked or referenced objects could theoretically be flagged — review the selection in the viewport before clicking Yes on the delete confirmation.
clearUndoBuffer() wipes the entire undo history. After running the memory flush, you cannot undo your way back to a pre-cleanup state.
| Attachment | Size |
|---|---|
| mastercleanup.ms | 4.28 KB |
