Blender V4.3
BKE_action.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4#pragma once
5
10#ifndef __cplusplus
11# error This is a C++ only header.
12#endif
13
14#include "BLI_compiler_attrs.h"
15#include "BLI_function_ref.hh"
16
17#include "DNA_listBase.h"
18
19struct BlendDataReader;
20struct BlendLibReader;
21struct BlendWriter;
22struct bArmature;
23
24/* The following structures are defined in DNA_action_types.h, and DNA_anim_types.h */
26struct BoneColor;
27struct FCurve;
28struct ID;
29struct Main;
30struct Object;
31struct bAction;
32struct bActionGroup;
33struct bItasc;
34struct bPose;
35struct bPoseChannel;
37
38/* Action Lib Stuff ----------------- */
39
40/* Allocate a new bAction with the given name */
41bAction *BKE_action_add(Main *bmain, const char name[]);
42
43/* Action API ----------------- */
44
51
52/* Action Groups API ----------------- */
53
60
66void set_active_action_group(bAction *act, bActionGroup *agrp, short select);
67
71void action_group_colors_sync(bActionGroup *grp, const bActionGroup *ref_grp);
72
77
87
93bActionGroup *action_groups_add_new(bAction *act, const char name[]);
94
102void action_groups_add_channel(bAction *act, bActionGroup *agrp, FCurve *fcurve);
103
110
119
125bActionGroup *BKE_action_group_find_name(bAction *act, const char name[]);
126
133
134/* Pose API ----------------- */
135
141void BKE_pose_channel_free_ex(bPoseChannel *pchan, bool do_id_user) ATTR_NONNULL(1);
142
151
156
161
167void BKE_pose_channels_free_ex(bPose *pose, bool do_id_user) ATTR_NONNULL(1);
168
174
179 bool (*filter_fn)(const char *bone_name, void *user_data),
180 void *user_data) ATTR_NONNULL(1, 2);
181
182void BKE_pose_free_data_ex(bPose *pose, bool do_id_user) ATTR_NONNULL(1);
184void BKE_pose_free(bPose *pose);
188void BKE_pose_free_ex(bPose *pose, bool do_id_user);
195void BKE_pose_copy_data_ex(bPose **dst, const bPose *src, int flag, bool copy_constraints);
196void BKE_pose_copy_data(bPose **dst, const bPose *src, bool copy_constraints);
204void BKE_pose_channel_copy_data(bPoseChannel *pchan, const bPoseChannel *pchan_from);
210bPoseChannel *BKE_pose_channel_find_name(const bPose *pose, const char *name);
226bPoseChannel *BKE_pose_channel_active(Object *ob, bool check_bonecoll);
252bPoseChannel *BKE_pose_channel_ensure(bPose *pose, const char *name) ATTR_NONNULL(2);
257 const char *name) ATTR_WARN_UNUSED_RESULT;
258
260
261#ifndef NDEBUG
263#endif
264
270
275
280
285
289void BKE_pose_itasc_init(bItasc *itasc);
290
295
296/* Bone Groups API --------------------- */
297
301bActionGroup *BKE_pose_add_group(bPose *pose, const char *name) ATTR_NONNULL(1);
302
307void BKE_pose_remove_group(bPose *pose, bActionGroup *grp, int index) ATTR_NONNULL(1);
311void BKE_pose_remove_group_index(bPose *pose, int index) ATTR_NONNULL(1);
312
313/* Assorted Evaluation ----------------- */
314
320 Object *workob,
321 bPose *pose,
322 bAction *act,
323 int32_t action_slot_handle,
324 char groupname[],
325 const AnimationEvalContext *anim_eval_context) ATTR_NONNULL(1, 2);
326
328 ATTR_NONNULL(1, 2);
332bool BKE_pose_copy_result(bPose *to, bPose *from);
336void BKE_pose_rest(bPose *pose, bool selected_bones_only);
337
341void BKE_pose_tag_recalc(Main *bmain, bPose *pose) ATTR_NONNULL(1, 2);
342
343void BKE_pose_blend_write(BlendWriter *writer, bPose *pose, bArmature *arm) ATTR_NONNULL(1, 2, 3);
344void BKE_pose_blend_read_data(BlendDataReader *reader, ID *id_owner, bPose *pose)
345 ATTR_NONNULL(1, 2);
347 ATTR_NONNULL(1, 2);
348
349/* `action_mirror.cc` */
350
352
353namespace blender::bke {
354
355using FoundFCurveCallback = blender::FunctionRef<void(FCurve *fcurve, const char *bone_name)>;
357
358}; // namespace blender::bke
void BKE_pose_channels_remove(Object *ob, bool(*filter_fn)(const char *bone_name, void *user_data), void *user_data) ATTR_NONNULL(1
void action_group_colors_set_from_posebone(bActionGroup *grp, const bPoseChannel *pchan)
void void bool BKE_pose_copy_result(bPose *to, bPose *from)
void void void void BKE_pose_blend_read_after_liblink(BlendLibReader *reader, Object *ob, bPose *pose) ATTR_NONNULL(1
void BKE_pose_channel_copy_data(bPoseChannel *pchan, const bPoseChannel *pchan_from)
void action_group_colors_set(bActionGroup *grp, const BoneColor *color)
bActionGroup * BKE_pose_add_group(bPose *pose, const char *name) ATTR_NONNULL(1)
void BKE_pose_channel_runtime_free(bPoseChannel_Runtime *runtime) ATTR_NONNULL(1)
void BKE_pose_free_data(bPose *pose) ATTR_NONNULL(1)
void set_active_action_group(bAction *act, bActionGroup *agrp, short select)
bPoseChannel * BKE_pose_channel_active(Object *ob, bool check_bonecoll)
void BKE_pose_tag_recalc(Main *bmain, bPose *pose) ATTR_NONNULL(1
const char * BKE_pose_ikparam_get_name(bPose *pose) ATTR_WARN_UNUSED_RESULT
void BKE_pose_channel_runtime_reset_on_copy(bPoseChannel_Runtime *runtime) ATTR_NONNULL(1)
bActionGroup * get_active_actiongroup(bAction *act) ATTR_WARN_UNUSED_RESULT
void void void BKE_pose_blend_read_data(BlendDataReader *reader, ID *id_owner, bPose *pose) ATTR_NONNULL(1
void action_groups_clear_tempflags(bAction *act)
bool BKE_pose_channels_is_valid(const bPose *pose) ATTR_WARN_UNUSED_RESULT
void BKE_pose_channels_free_ex(bPose *pose, bool do_id_user) ATTR_NONNULL(1)
void BKE_pose_channel_runtime_reset(bPoseChannel_Runtime *runtime) ATTR_NONNULL(1)
void BKE_pose_ikparam_init(bPose *pose) ATTR_NONNULL(1)
void BKE_pose_itasc_init(bItasc *itasc)
void BKE_pose_remove_group_index(bPose *pose, int index) ATTR_NONNULL(1)
void BKE_pose_remove_group(bPose *pose, bActionGroup *grp, int index) ATTR_NONNULL(1)
void BKE_pose_free_ex(bPose *pose, bool do_id_user)
void BKE_action_groups_reconstruct(bAction *act)
void BKE_pose_channel_session_uid_generate(bPoseChannel *pchan)
void BKE_pose_channels_hash_free(bPose *pose) ATTR_NONNULL(1)
void action_groups_add_channel(bAction *act, bActionGroup *agrp, FCurve *fcurve)
void BKE_pose_update_constraint_flags(bPose *pose) ATTR_NONNULL(1)
void BKE_pose_channels_hash_ensure(bPose *pose) ATTR_NONNULL(1)
bPoseChannel * BKE_pose_channel_active_or_first_selected(Object *ob) ATTR_WARN_UNUSED_RESULT
void BKE_action_fcurves_clear(bAction *act)
void what_does_obaction(Object *ob, Object *workob, bPose *pose, bAction *act, int32_t action_slot_handle, char groupname[], const AnimationEvalContext *anim_eval_context) ATTR_NONNULL(1
bPoseChannel * BKE_pose_channel_find_name(const bPose *pose, const char *name)
bPoseChannel * BKE_pose_channel_get_mirrored(const bPose *pose, const char *name) ATTR_WARN_UNUSED_RESULT
void void BKE_pose_free_data_ex(bPose *pose, bool do_id_user) ATTR_NONNULL(1)
void BKE_pose_channels_free(bPose *pose) ATTR_NONNULL(1)
void BKE_pose_free(bPose *pose)
void action_groups_remove_channel(bAction *act, FCurve *fcu)
void BKE_pose_channel_free(bPoseChannel *pchan) ATTR_NONNULL(1)
bool BKE_pose_is_bonecoll_visible(const bArmature *arm, const bPoseChannel *pchan) ATTR_WARN_UNUSED_RESULT
bool BKE_pose_channel_in_IK_chain(Object *ob, bPoseChannel *pchan)
bPoseChannel * BKE_pose_channel_ensure(bPose *pose, const char *name) ATTR_NONNULL(2)
bPoseChannel * BKE_pose_channel_active_if_bonecoll_visible(Object *ob) ATTR_WARN_UNUSED_RESULT
void void void void void BKE_action_flip_with_pose(bAction *act, Object *ob_arm) ATTR_NONNULL(1
void BKE_pose_copy_data(bPose **dst, const bPose *src, bool copy_constraints)
void BKE_pose_tag_update_constraint_flags(bPose *pose) ATTR_NONNULL(1)
bAction * BKE_action_add(Main *bmain, const char name[])
void BKE_pose_channel_free_ex(bPoseChannel *pchan, bool do_id_user) ATTR_NONNULL(1)
bActionGroup * action_groups_add_new(bAction *act, const char name[])
void BKE_pose_channel_free_bbone_cache(bPoseChannel_Runtime *runtime) ATTR_NONNULL(1)
void action_group_colors_sync(bActionGroup *grp, const bActionGroup *ref_grp)
void void BKE_pose_copy_pchan_result(bPoseChannel *pchanto, const bPoseChannel *pchanfrom) ATTR_NONNULL(1
void BKE_pose_copy_data_ex(bPose **dst, const bPose *src, int flag, bool copy_constraints)
bActionGroup * BKE_action_group_find_name(bAction *act, const char name[])
void BKE_pose_check_uids_unique_and_report(const bPose *pose)
void BKE_pose_rest(bPose *pose, bool selected_bones_only)
void void BKE_pose_blend_write(BlendWriter *writer, bPose *pose, bArmature *arm) ATTR_NONNULL(1
#define ATTR_WARN_UNUSED_RESULT
#define ATTR_NONNULL(...)
These structs are the foundation for all linked lists in the library system.
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Brightness Control the brightness and contrast of the input color Vector Map input vector components with curves Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert Invert a color
ccl_device_inline float4 select(const int4 mask, const float4 a, const float4 b)
void BKE_action_find_fcurves_with_bones(const bAction *action, FoundFCurveCallback callback)
blender::FunctionRef< void(FCurve *fcurve, const char *bone_name)> FoundFCurveCallback
signed int int32_t
Definition stdint.h:77
Definition DNA_ID.h:413
uint8_t flag
Definition wm_window.cc:138