Blender V4.3
driver.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#include "ANIM_driver.hh"
10#include "BKE_fcurve_driver.h"
11#include "DNA_anim_types.h"
12#include "RNA_access.hh"
13
14namespace blender::animrig {
15
18 PropertyRNA *prop,
19 const FCurve *fcu)
20{
21 PathResolvedRNA anim_rna;
22 if (!RNA_path_resolved_create(ptr, prop, fcu->array_index, &anim_rna)) {
23 return 0.0f;
24 }
25 return evaluate_driver(&anim_rna, fcu->driver, fcu->driver, anim_eval_context);
26}
27
28} // namespace blender::animrig
Functions to work with drivers.
float evaluate_driver(struct PathResolvedRNA *anim_rna, struct ChannelDriver *driver, struct ChannelDriver *driver_orig, const struct AnimationEvalContext *anim_eval_context)
float evaluate_driver_from_rna_pointer(const AnimationEvalContext *anim_eval_context, PointerRNA *ptr, PropertyRNA *prop, const FCurve *fcu)
Definition driver.cc:16
bool RNA_path_resolved_create(PointerRNA *ptr, PropertyRNA *prop, const int prop_index, PathResolvedRNA *r_anim_rna)
ChannelDriver * driver
int array_index
PointerRNA * ptr
Definition wm_files.cc:4126