mirror of
https://github.com/blender/blender
synced 2026-11-01 03:16:58 +03:00
Examples were supported with/without number suffix, this caused problems using mypy for type checking because it attempted to resolve imports such as `mathutils` to the example file. Having only some examples numbered already complicated documentation for conventions with examples - simplify extraction and number all.
15 lines
255 B
Python
15 lines
255 B
Python
"""
|
|
Basic Handler Example
|
|
+++++++++++++++++++++
|
|
|
|
This script shows the most simple example of adding a handler.
|
|
"""
|
|
|
|
import bpy
|
|
|
|
|
|
def my_handler(scene):
|
|
print("Frame Change", scene.frame_current)
|
|
|
|
|
|
bpy.app.handlers.frame_change_pre.append(my_handler)
|