[Bf-python] Timeline.marks

Toni Alatalo antont at kyperjokki.fi
Mon Oct 24 17:42:32 CEST 2005


We were very happy with the recent addition of the Timeline access to the API, 
and are using it heavily here at Orange now to do subtitling and camera 
changes for the next animatic (due on Friday). Those scripts are actually so 
far the only ones that another member besides me, that is Basse, has written, 
which makes me really happy :)

Ok so to the problem department: Timeline.getMarked() is very badly 
documented. getMarked(ival) "Get name of frame." seems like something that 
you must give a frame number, and totally hides the fact that no argument is 
required for it to return a list of all markers. We actually thought that 
there is no way to get them, and Basse made a python while loop to go through 
all the frames :) .. only when I started to add it myself I saw from the 
source that the functionality is there already.

The only remaining problem is that the list returned is not nicely formatted - 
it is a list where every other item is a number, and every other the name, 
like this: [20, 'cam.Jee', 32, 'cam2', 47, 'cam3', 1, 'cam3', 6, 'sub.2', 15, 
'sub.3', 12, 'sub.0']

Wouldn't it be better to return a dict that maps framenumbers to markers?

I can fix both the doc and change that method if there are no objections. I 
suppose not many people are using this yet so there should be close to no 
backwards compatibility problems? Also if someone else (like the original 
author, Joilnen Leite) wants to do that, do tell me, so I can do other things 
(like start the NLA API or fix other scripts we need). It is not urgent now 
'cause we have a working tool. Hm which in fact means I wont touch it now..

~Toni


More information about the Bf-python mailing list