Blender V2.61 - r43446
|
#include <Python.h>
#include "DNA_anim_types.h"
#include "BLI_listbase.h"
#include "BLI_math_base.h"
#include "BKE_fcurve.h"
#include "BKE_global.h"
#include "bpy_driver.h"
Go to the source code of this file.
Functions | |
void | BPY_update_rna_module (void) |
int | bpy_pydriver_create_dict (void) |
static void | bpy_pydriver_update_dict (const float evaltime) |
void | BPY_driver_reset (void) |
static void | pydriver_error (ChannelDriver *driver) |
float | BPY_driver_exec (ChannelDriver *driver, const float evaltime) |
Variables | |
PyObject * | bpy_pydriver_Dict = NULL |
static PyObject * | bpy_pydriver_InternStr__frame = NULL |
static float | bpy_pydriver_evaltime_prev = FLT_MAX |
This file defines the 'BPY_driver_exec' to execute python driver expressions, called by the animation system, there are also some utility functions to deal with the namespace used for driver execution.
Definition in file bpy_driver.c.
float BPY_driver_exec | ( | ChannelDriver * | driver, |
const float | evaltime | ||
) |
Definition at line 171 of file bpy_driver.c.
References BLI_countlist(), bpy_pydriver_create_dict(), bpy_pydriver_Dict, bpy_pydriver_update_dict(), BPY_update_rna_module(), DRIVER_FLAG_INVALID, DRIVER_FLAG_RECOMPILE, DRIVER_FLAG_RENAMEVAR, driver_get_variable_value(), ChannelDriver::expr_comp, ChannelDriver::expression, ListBase::first, ChannelDriver::flag, G, G_SCRIPT_AUTOEXEC, i, DriverVar::name, DriverVar::next, NULL, pydriver_error(), tval(), and ChannelDriver::variables.
Referenced by evaluate_driver().
void BPY_driver_reset | ( | void | ) |
Definition at line 122 of file bpy_driver.c.
References bpy_pydriver_Dict, bpy_pydriver_evaltime_prev, bpy_pydriver_InternStr__frame, FLT_MAX, and NULL.
Referenced by load_file(), WM_init(), WM_read_file(), and WM_read_homefile().
int bpy_pydriver_create_dict | ( | void | ) |
Definition at line 55 of file bpy_driver.c.
References bpy_pydriver_Dict, simple_enum_gen::d, mod(), and NULL.
Referenced by bpy_app_driver_dict_get(), and BPY_driver_exec().
static void bpy_pydriver_update_dict | ( | const float | evaltime | ) | [static] |
Definition at line 100 of file bpy_driver.c.
References bpy_pydriver_Dict, bpy_pydriver_evaltime_prev, bpy_pydriver_InternStr__frame, and NULL.
Referenced by BPY_driver_exec().
void BPY_update_rna_module | ( | void | ) |
Definition at line 6233 of file bpy_rna.c.
Referenced by BPY_driver_exec(), and BPY_modules_update().
static void pydriver_error | ( | ChannelDriver * | driver | ) | [static] |
Definition at line 149 of file bpy_driver.c.
References DRIVER_FLAG_INVALID, ChannelDriver::expression, and ChannelDriver::flag.
Referenced by BPY_driver_exec().
PyObject* bpy_pydriver_Dict = NULL |
Definition at line 50 of file bpy_driver.c.
Referenced by bpy_app_driver_dict_get(), BPY_driver_exec(), BPY_driver_reset(), bpy_pydriver_create_dict(), and bpy_pydriver_update_dict().
float bpy_pydriver_evaltime_prev = FLT_MAX [static] |
Definition at line 98 of file bpy_driver.c.
Referenced by BPY_driver_reset(), and bpy_pydriver_update_dict().
PyObject* bpy_pydriver_InternStr__frame = NULL [static] |
Definition at line 96 of file bpy_driver.c.
Referenced by BPY_driver_reset(), and bpy_pydriver_update_dict().