[Bf-python] Timeline.marks
Toni Alatalo
antont at kyperjokki.fi
Wed Oct 26 15:23:48 CEST 2005
On Tuesday 25 October 2005 15:05, Toni Alatalo wrote:
so now pidhash (Joilnen Leite) changed it to dict, and me our script accordinly:
> # change the marker list type
> i = 0
> for i in range(0, len(tl), 2):
> if tl[i+1][:len(cam_prefix)] == cam_prefix:
> marks.append([tl[i], tl[i+1]])
> marks.sort()
marks = [(frame, name) for frame, name in tl.iteritems()
if name[:len(prefix)] == prefix]
marks.sort()
.. so that is already pretty nice.
the remaining we left unchanged.
~Toni
> while i < len(marks):
> if (cur >= marks[i][0]) and (cur < marks[i+1][0]):
> if curCam.name != marks[i][1]:
> print "switched to " + marks[i][1]
> camobj = Object.Get(marks[i][1])
> scn.setCurrentCamera(camobj)
>
> sizeadj = empty_ratio / camobj.getData().getLens()
> subObj = Object.Get('Fempty')
> subObj.loc = camobj.loc
> subObj.rot = camobj.rot
> subObj.setSize(sizeadj,sizeadj,1)
> # to = Object.Get('Font')
> subObj.makeDisplayList()
> # Window.EditMode(1)
> # Window.EditMode(0)
>
> Redraw(-1)
>
> i = i+1
>
> so ideas and implementations for an API that would make that nice are
> welcome :)
>
> > Ken
>
> ~Toni
> _______________________________________________
> Bf-python mailing list
> Bf-python at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-python
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20051026/13226982/attachment.html>
More information about the Bf-python
mailing list