6.2. How to add key frame the movie makerΒΆ

In this example we will show how to add key frame the movie maker.

This code snippet will work only if the current selected View is a 3D view and that the Movie Maker is shown:

from ORSServiceClass.OrsPlugin.abstractContext import AbstractContext
from OrsLibraries.workingcontext import WorkingContext
currentContext = AbstractContext.getCurrentContext()
currentView = WorkingContext.getCurrentView(currentContext)

if currentView.getIsIn2DViewMode():
    print('current view is in 2D')
else:
    # Let's find the Layout plugin of the view
    layoutPlugin = currentView.getContext()
    if layoutPlugin is not None:
        timeInTheMovieMaker = 10
        layoutPlugin.addMovieKeyFrame(timeInTheMovieMaker)