---------------------------------------------------------------------------------------- -- Script Name: SnapSwap -- Filename: SP_MeshScripts_SnapSwap -- Version: v1.10 ---------------------------------------------------------------------------------------- -- Purpose: Replaced selected geometry with a snapshot, mainly for cleaning up corrupt geometry -- Compatibility: Max 2012. Should work in most other versions -- Code by: Michael Vladimir Nicolayeff -- SmallpolyArtist@gmail.com -- http://www.scriptspot.com/users/smallpoly ---------------------------------------------------------------------------------------- -- Change Log -- v1.00 -- 2012.01.01 -- First release -- v1.10 -- 2017.04.20 -- Standardized format for upload. Changed from affecting an entire scene to ---------------------------------------------------------------------------------------- /* Features: - Swaps out a model with a snapshot - Deletes the old model and gives the new one the original name - Ignores non-geometry objects. Usage: - Select what you want to replace, then press the button. Limitations: - Checks for a few specified type of geometry instead of geometry superclass. Should fix this later. - Not sure if this will preserve wireframe color or other properties Known Bugs: - */ ---------------------------------------------------------------------------------------- macroscript SP_MeshScripts_SnapSwap category: "# SP_MeshScripts" buttonText: "SnapSwap" tooltip: "SnapSwap: Replace selected object with snapshot" ( myArray = for s in selection where (classof o == Editable_Poly or classof o == Editable_mesh or classof o == PolyMeshObject) collect o for m in myArray do ( n = m.name x = snapshot m delete m x.name = n ) )