At this time it's really just a debugging aid for us. It should
make it easier for us to better understand timing of various
commands.
Tracing is enabled by setting the "/EnableMacroTracing" preference
to 1 and disabled by setting it to 0.
Since the tracing is written to the log, this also adds a "SaveLog"
command that takes a filename. It can be used from within the macro
being traced to preserve the log in case the script intended to
exit Audacity.
Aside from the breakage I added to it during the AUP3 conversion,
there was several other issues discovered in regards to how the
export paths were being handled.
Problem:
Applying macro to project always sets first track as focus.
The problem was introduced by commit 06cddda, which accidentally declared cleanup2 in the wrong scope.
This meant that ProjectHistory::RollBackState() was always called, which eventually causes TrackPanel::OnUndoReset() to be called, which sets the first track to be the focus.
Fix:
Declare cleanup2 in the correct scope.
!!! THERE WILL NO DOUBT BE BUGS !!!
This is a big one and there's still several things to
complete. Just want to get this in the wild to start
receiving feedback.
One big thing right now is that it will NOT load pre-aup3
files. An importer is on the way for that.
... Requires some more wx header inclusions, a renaming of CopyFile (to avoid
colliding with a certain macro changing it to CopyFileW), and an explicit
deletion of a copy constructor and assignment (to avoid generation of
std::vector members for an incomplete type)
... by passing parent as reference, not pointer, and testing in the dialog
factory function.
This is important so that we know the lifetime of an effect dialog, even when
it is non-modal, is bounded by the lifetime of the associated project.
... The purpose of the boolean field in command entries was to exclude certain
menu commands from being steps in macros, because they require user interaction.
Effects are never meant to be excluded, even though they normally have dialogs,
but in the context of macro execution, the parameters are supplied by other
means.
... not the best thing for the long term, but hidden dependencies on
TransportMenus.cpp are eliminated
Tying CommonCommandFlags again into the big component, which is now 26