Example
====== Timeline: Import Markers ======
^ by: | Sebastian Beutel with massive help from Gregory Haynes, March 2023 |
^ published: | here |
^ description: | Import a marker file into a designated timeline |
^ remarks: | from the facebook group: https://www.facebook.com/groups/Avolites/posts/2787203324745217/ |
{{tag>timeline import marker}}
==== functions ====
* [[:macros:function:Timelines.ImportMarkersFromString]]
* [[:macros:function:Handles.GetTitanIdFromHandle]]
* [[:macros:function:Timecode.ParseFrameRate]]
===== Code =====
Timelines.ImportMarkersFromString(
Handles.GetTitanIdFromHandle("timelineHandleUN=1"),
"<Version />",
"C:\Users\sb\Documents\Titan\Markers\test.csv",
Timecode.ParseFrameRate(100))
===== Explanation =====
This explains the functional steps within the sequence. For all the other XML details please refer to [[:macros:formats_and_syntax#xml_format|Formats and syntax]]
Essentially it is just calling ''Timelines.ImportMarkersFromString()'' with the correct arguments (see [[:macros:function:Timelines.ImportMarkersFromString]] for more detailed explanations and other solutions):
* ''Handles.GetTitanIdFromHandle("timelineHandleUN=1")'' is used to get the TitanId from a specific usernumber as the function needs the titanId and not a handle
* ''"<Version />"'' is the absolute minimum string as importMappingVersion - basically it is '''' with the angled brackets written as entities
* ''"C:\Users\{username}\Documents\Titan\Markers\test.csv"'' is the absolute path to the file to import. This may differ on your system ({username} is your username, 'test.csv' is the filename which may also be different)
* ''Timecode.ParseFrameRate(100)'' is used to set the framerate (100 fps in this example) as AcwFrameRate object
===== How to use it =====
- [[:macros:deploying|make this macro available]]
- put your markers file to a suitable location and adjust the arguments (path, framerate) in the macro accordingly
- this may be handy if you need to work on your markers and need to import the same file multiple times
~~DISCUSSION~~