FWIW: How I Maintain My ATEM MacrosWhat- I maintain 1
master macro XML file that I always use to
restore from.
- The
master macro file includes spacing and comments so it is more readable and easier to maintain.
- When I create new macros, I capture them into a separate
temporary macro file with the name of the feature -- E.G.
start-recording.xml (these are temporary until I migrate the relevant code into the
master file.
- As I migrate code from a
temporary macro file into the
master file, I test/edit/repeat until good. Then I move the
temporary file into an archive folder in case I need to go back to see how things were captured. I can also re-capture (record) the temporary macro - especially if any config/hardware changes have happened since.
- Once a new
version of the
master file is good, I save a copy of it in several backup locations (separate Mac drives, cloud, etc.). This way I always have peace of mind that I won't have to "start over"
Why1. I prefer to have comments and spacing so it is easier to read (now that I have 70+ macros)
2. XML allows for comments (even though importing/exporting strips them out)
3. Backing up my single master file to alternate locations (separate Mac drives, cloud, etc.) allows me
How- I use Visual Studio Code editor (free), but any decent text/code editor will do. Good ones will recognize an XML file structure and show comments in a different color (VSC shows them in green)
- Comments in XML start with
<!-- and end with
-->- For Example:
- Code: Select all
<!-- some comment here -->
- Comments can span multiple lines, and can have blank lines between like this:
- Code: Select all
<!--
====================================
== SUPER-SOURCE 1
====================================
-->
<Macro index="0" name="super-source-1" description="Super Source - option 1">
<!-- Disable boxes -->
<Op id="SuperSourceV2BoxEnable" superSource="0" boxIndex="0" enable="False"/>
<Op id="SuperSourceV2BoxEnable" superSource="0" boxIndex="1" enable="False"/>
<Op id="SuperSourceV2BoxEnable" superSource="0" boxIndex="2" enable="False"/>
<Op id="SuperSourceV2BoxEnable" superSource="0" boxIndex="3" enable="False"/>
<!-- Box 1 (Left) -->
<Op id="SuperSourceV2BoxInput" superSource="0" boxIndex="0" input="Camera1"/>
<Op id="SuperSourceV2BoxXPosition" superSource="0" boxIndex="0" xPosition="-12.70"/>
<Op id="SuperSourceV2BoxYPosition" superSource="0" boxIndex="0" yPosition=".2"/>
<Op id="SuperSourceV2BoxSize" superSource="0" boxIndex="0" size="0.45"/>
<Op id="SuperSourceV2BoxMaskLeft" superSource="0" boxIndex="0" left="9.4"/>
<Op id="SuperSourceV2BoxMaskTop" superSource="0" boxIndex="0" top="0"/>
<Op id="SuperSourceV2BoxMaskRight" superSource="0" boxIndex="0" right="9.4"/>
<Op id="SuperSourceV2BoxMaskBottom" superSource="0" boxIndex="0" bottom="0"/>
<!-- Box 2 (Right) -->
<Op id="SuperSourceV2BoxInput" superSource="0" boxIndex="1" input="MediaPlayer2"/>
<Op id="SuperSourceV2BoxXPosition" superSource="0" boxIndex="1" xPosition="3.2"/>
<Op id="SuperSourceV2BoxYPosition" superSource="0" boxIndex="1" yPosition=".5"/>
<Op id="SuperSourceV2BoxSize" superSource="0" boxIndex="1" size="0.78"/>
<Op id="SuperSourceV2BoxMaskLeft" superSource="0" boxIndex="1" left="0"/>
<Op id="SuperSourceV2BoxMaskTop" superSource="0" boxIndex="1" top="0"/>
<Op id="SuperSourceV2BoxMaskRight" superSource="0" boxIndex="1" right="0"/>
<Op id="SuperSourceV2BoxMaskBottom" superSource="0" boxIndex="1" bottom="0"/>
<!-- Background -->
<Op id="SuperSourceV2ArtFillInput" superSource="0" input="Black"/>
<Op id="SuperSourceV2BoxEnable" superSource="0" boxIndex="0" enable="True"/>
<Op id="SuperSourceV2BoxEnable" superSource="0" boxIndex="1" enable="True"/>
<Op id="SuperSourceV2BoxEnable" superSource="0" boxIndex="2" enable="False"/>
<Op id="SuperSourceV2BoxEnable" superSource="0" boxIndex="3" enable="False"/>
<!-- Transition Super-Source 1 -->
<Op id="TransitionMixRate" mixEffectBlockIndex="0" rate="25"/>
<Op id="TransitionStyle" mixEffectBlockIndex="0" style="Mix"/>
<Op id="AutoTransition" mixEffectBlockIndex="0"/>
</Macro>
<!--
====================================
== SUPER-SOURCE 2
====================================
-->
<Macro index="0" name="super-source-2" description="Super Source - option 2">
...
</Macro>
Caveats- No guarantee that ATEM software will always "ignore" the comments when the XML file is restored.
- No guarantee that ATEM software will always work correctly if comments are in a file being restored -- currently version 9.6.2 works fine.