Hello everyone,
Does anyone know if it is possible to continue the same script after the export is done?
I have a simple script that deletes unselected objects, clans empty layers, and then exports selected objects but I would really like it if I could undo all of that after the export is done and not have to do it manually.
Replies
your code goes here
)
max undo
If you're able to post the script I can take a look to see what's stopping it.
Here is the script:
(
undo on (
if selection.count != 0 do
(
macros.run "Modifier Stack" "Convert_to_Poly"
objects.ishidden = off
actionMan.executeAction 0 "283" -- Tools: Unfreeze All
for obj in selection do (
local layer = layerManager.getLayer 0
for obj in selection do layer.addNode obj
actionMan.executeAction 0 "40044" -- Selection: Select Invert
actionMan.executeAction 0 "40020" -- Edit: Delete Objects
macros.run "Scene Explorer" "SERemoveEmptyLayers"
select $*
actionMan.executeAction 0 "40373" -- File: Export Selected
exit
)
)
)
max undo
)
does that exit command need to be there?