Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
| Show First 20 Lines • Show All 894 Lines • ▼ Show 20 Lines | |||||
| * \param id: ID-Block that driver is attached to | * \param id: ID-Block that driver is attached to | ||||
| * \param fcu: Driver-FCurve | * \param fcu: Driver-FCurve | ||||
| * \param driver_index: Index in animation data drivers list | * \param driver_index: Index in animation data drivers list | ||||
| */ | */ | ||||
| void DepsgraphNodeBuilder::build_driver(ID *id, FCurve *fcurve, int driver_index) | void DepsgraphNodeBuilder::build_driver(ID *id, FCurve *fcurve, int driver_index) | ||||
| { | { | ||||
| /* Create data node for this driver */ | /* Create data node for this driver */ | ||||
| ID *id_cow = get_cow_id(id); | ID *id_cow = get_cow_id(id); | ||||
| ChannelDriver *driver_orig = fcurve->driver; | |||||
| /* TODO(sergey): ideally we could pass the COW of fcu, but since it | /* TODO(sergey): ideally we could pass the COW of fcu, but since it | ||||
| * has not yet been allocated at this point we can't. As a workaround | * has not yet been allocated at this point we can't. As a workaround | ||||
| * the animation systems allocates an array so we can do a fast lookup | * the animation systems allocates an array so we can do a fast lookup | ||||
| * with the driver index. */ | * with the driver index. */ | ||||
| ensure_operation_node( | ensure_operation_node(id, | ||||
| id, | |||||
| NodeType::PARAMETERS, | NodeType::PARAMETERS, | ||||
| OperationCode::DRIVER, | OperationCode::DRIVER, | ||||
| function_bind(BKE_animsys_eval_driver, _1, id_cow, driver_index, driver_orig), | function_bind(BKE_animsys_eval_driver, _1, id_cow, driver_index, fcurve), | ||||
| fcurve->rna_path ? fcurve->rna_path : "", | fcurve->rna_path ? fcurve->rna_path : "", | ||||
| fcurve->array_index); | fcurve->array_index); | ||||
| build_driver_variables(id, fcurve); | build_driver_variables(id, fcurve); | ||||
| } | } | ||||
| void DepsgraphNodeBuilder::build_driver_variables(ID *id, FCurve *fcurve) | void DepsgraphNodeBuilder::build_driver_variables(ID *id, FCurve *fcurve) | ||||
| { | { | ||||
| build_driver_id_property(id, fcurve->rna_path); | build_driver_id_property(id, fcurve->rna_path); | ||||
| LISTBASE_FOREACH (DriverVar *, dvar, &fcurve->driver->variables) { | LISTBASE_FOREACH (DriverVar *, dvar, &fcurve->driver->variables) { | ||||
| DRIVER_TARGETS_USED_LOOPER_BEGIN (dvar) { | DRIVER_TARGETS_USED_LOOPER_BEGIN (dvar) { | ||||
| ▲ Show 20 Lines • Show All 786 Lines • Show Last 20 Lines | |||||