Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/templates_py/driver_functions.py
| # This script defines functions to be used directly in drivers expressions to | # This script defines functions to be used directly in driver expressions to | ||||
| # extend the builtin set of python functions. | # extend the built-in set of python functions. | ||||
| # | # | ||||
| # This can be executed on manually or set to 'Register' to | # This can be executed on manually or set to 'Register' to | ||||
| # initialize thefunctions on file load. | # initialize the functions on file load. | ||||
| # two sample functions | # two sample functions | ||||
| Context not available. | |||||
| import bpy | import bpy | ||||
| # Add variable defined in this script into the drivers namespace. | # Add functions defined in this script into the drivers namespace. | ||||
| bpy.app.driver_namespace["invert"] = invert | bpy.app.driver_namespace["invert"] = invert | ||||
| bpy.app.driver_namespace["slow_value"] = slow_value | bpy.app.driver_namespace["slow_value"] = slow_value | ||||
| Context not available. | |||||