Writing the Action to Range add-on
Animators set the first and last frames of the scene according to the duration of the shot. If there are animated objects, this add-on can set the playback range automatically.
This operator will allow you to choose between the render and preview range.
Setting the environment
Let’s create a folder for this chapter in our project. Then, in the Blender Preferences area, we need to set the ch7
folder as our Scripts Folder. We must restart Blender to update its search paths.
Our add-on contains an operator, like the ones from Chapter 3, and Chapter 4:
- Select
PythonScriptingBlender/ch7/addons
. - Create a new file by clicking the New File icon.
- Name the new file
action_to_range.py
. - Open the file by double-clicking it.
We can now start writing our first animation add-on.
Writing the Action to Range information
The operator will be invoked from the View menu of the Timeline view, as reported in the location...