User Tools

Site Tools


macros:example:timelinemarkers

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/

functions

Code

ImportMarkerMacros.xml
<?xml version="1.0" encoding="utf-8"?>
<avolites.macros>
  <macro id="Wiki.Macros.Timeline.ImportMarkers" name="Import Markers TL 1">	
    <sequence>	  
      <step>Timelines.ImportMarkersFromString(
        Handles.GetTitanIdFromHandle("timelineHandleUN=1"), 
        "&lt;Version /&gt;", 
        "C:\Users\sb\Documents\Titan\Markers\test.csv", 
        Timecode.ParseFrameRate(100))
      </step>
    </sequence>	
  </macro>
</avolites.macros>

Explanation

This explains the functional steps within the sequence. For all the other XML details please refer to Formats and syntax

Essentially it is just calling Timelines.ImportMarkersFromString() with the correct arguments (see 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
  • “&lt;Version /&gt;” is the absolute minimum string as importMappingVersion - basically it is <Version /> 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

  1. put your markers file to a suitable location and adjust the arguments (path, framerate) in the macro accordingly
  2. this may be handy if you need to work on your markers and need to import the same file multiple times
You could leave a comment if you were logged in.
macros/example/timelinemarkers.txt · Last modified: 2023/04/03 09:11 by icke_siegen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki