-
Notifications
You must be signed in to change notification settings - Fork 9
Drivers
Dealga McArdle edited this page Oct 25, 2015
·
18 revisions
I don't know a whole lot about these, and the docs seem to do a good job of covering most things.
This is the long way, the scenic route. Using a python expression from a file.
- Rightclick the property in question, choose Add Single Driver
- Open the Graph Editor, and switch to Drivers view
- select the driven property, and toggle the rightside panel
- Make a script in the Text Editor with content similar to this.
import math
import bpy
def driver_func(current_frame):
frames = 120 # <-- period.
theta = math.pi * 2 / frames
final = math.sin(current_frame % frames * theta)
return final
# add function to driver_namespace
bpy.app.driver_namespace['driver_func'] = driver_func
If your driver has a python error, you can correct it and run the code again to overwrite the namespace key 'driver_func`.
Introduction
Objects / Mesh / BMesh
- Empty - null object
- Mesh
- Bmesh
- bmesh.ops - primitives
- bmesh.ops - mesh opsπ§
- Curves (2d, 3d)
- Text (Font Objects)
- Duplication (instancing)
- Metaballs
Time and Motion
- scripted keyframesπ
- Event Handlersπ
- Drivers
Miscellaneous bpy.data.*
Order / Organization
- Groupingπ
- Parentingπ
- Layers
- UI / Layoutπ
Miscellaneous
- Mathutilsπ
- Modifiersπ
- Particle Systemsπ
- vertex colorsπ
- Textures UV DPI
- Propertiesπ§
- Operators (and callbacks)π§
- bgl / blfπ
- Grease Pencil
- Themes
- Areas
Add-ons
- introductionπ
- import / exportπ
- Text Editorπ
- Custom Nodesπ