21#include "RNA_prototypes.hh"
36 if (
strip->
type() != Strip::Type::Keyframe) {
40 for (
FCurve *fcu : bag->fcurves()) {
60 if (
strip->
type() != Strip::Type::Keyframe) {
64 if (bag->slot_handle != handle) {
67 for (
FCurve *fcu : bag->fcurves()) {
78 const ID &animated_id,
82 const auto forward_to_callback = [&](
ID & ,
86 if (!action_ptr_ref) {
89 return callback(
const_cast<const Action &
>(action_ptr_ref->wrap()), slot_handle_ref);
101 char *last_slot_identifier)>
callback)
117 animated_id, strip->act, strip->action_slot_handle, strip->last_slot_identifier))
124 if (!looped_until_last_strip) {
134 const Object &
object =
reinterpret_cast<const Object &
>(animated_id);
142 auto visit_constraint = [&](
const bConstraint &constraint) ->
bool {
147 if (!constraint_data->
act) {
151 constraint_data->
act,
158 if (!visit_constraint(*con)) {
167 if (!visit_constraint(*con)) {
182 char *last_slot_identifier)>
callback)
200 const bool looped_until_last_strip = bke::nla::foreach_strip_adt(*adt, [&](
NlaStrip *
strip) {
202 PointerRNA ptr = RNA_pointer_create_discrete(&animated_id, &RNA_NlaStrip, strip);
203 PropertyRNA *prop = RNA_struct_find_property(&ptr,
"action_slot");
205 if (!callback(animated_id, strip->act, ptr, *prop, strip->last_slot_identifier)) {
211 if (!looped_until_last_strip) {
221 const Object &
object =
reinterpret_cast<const Object &
>(animated_id);
229 auto visit_constraint = [&](
bConstraint &constraint) ->
bool {
234 if (!constraint_data->
act) {
247 if (!visit_constraint(*con)) {
256 if (!visit_constraint(*con)) {
Functions and classes to work with Actions.
Functionality to iterate an Action in various ways.
AnimData * BKE_animdata_from_id(const ID *id)
#define LISTBASE_FOREACH(type, var, list)
btSequentialImpulseConstraintSolverMt int btPersistentManifold int btTypedConstraint ** constraints
blender::Span< const Layer * > layers() const
bool is_action_legacy() const
bool is_action_layered() const
const T & data(const Action &owning_action) const
DEGForeachIDComponentCallback callback
void foreach_fcurve_in_action_slot(Action &action, slot_handle_t handle, FunctionRef< void(FCurve &fcurve)> callback)
void foreach_fcurve_in_action(Action &action, FunctionRef< void(FCurve &fcurve)> callback)
decltype(::ActionSlot::handle) slot_handle_t
bool foreach_action_slot_use_with_rna(ID &animated_id, FunctionRef< bool(ID &animated_id, bAction *action, PointerRNA &action_slot_owner_ptr, PropertyRNA &action_slot_prop, char *last_slot_identifier)> callback)
bool foreach_action_slot_use_with_references(ID &animated_id, FunctionRef< bool(ID &animated_id, bAction *&action_ptr_ref, slot_handle_t &slot_handle_ref, char *last_slot_identifier)> callback)
bool foreach_action_slot_use(const ID &animated_id, FunctionRef< bool(const Action &action, slot_handle_t slot_handle)> callback)
bool foreach_strip_adt(const AnimData &adt, blender::FunctionRef< bool(NlaStrip *)> callback)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
char last_slot_identifier[66]
int32_t action_slot_handle
char last_slot_identifier[66]