16 #define DNA_DEPRECATED_ALLOW
57 #include "RNA_prototypes.h"
98 FCurve *fcurve_dst, *fcurve_src;
107 for (fcurve_src = action_src->
curves.
first; fcurve_src; fcurve_src = fcurve_src->
next) {
118 group_dst && group_src;
119 group_dst = group_dst->
next, group_src = group_src->
next) {
120 if (fcurve_src->
grp == group_src) {
121 fcurve_dst->
grp = group_dst;
242 if (marker->camera) {
270 if (marker->camera) {
281 idprop.
i = is_single_frame;
304 .struct_size =
sizeof(
bAction),
306 .name_plural =
"actions",
316 .foreach_cache =
NULL,
317 .foreach_path =
NULL,
325 .blend_read_undo_preserve =
NULL,
327 .lib_override_apply_post =
NULL,
371 if ((grp == agrp) && (
select)) {
386 bTheme *btheme =
U.themes.first;
400 else if (grp->
cs.
solid[0] == 0) {
438 if (
ELEM(
NULL, act, agrp, fcurve)) {
478 for (grp = agrp->
prev; grp; grp = grp->
prev) {
617 if (
ELEM(
NULL, pose, name) || (name[0] ==
'\0')) {
710 if ((pchan->bone) && (pchan->bone == arm->
act_bone)) {
754 if (!
STREQ(name_flip, name)) {
777 const bool copy_constraints)
826 if (copy_constraints) {
848 if (copy_constraints) {
904 if ((
data->rootbone == 0) || (
data->rootbone > level)) {
948 if (pchan->bbone_prev == unlinked_pchan) {
949 pchan->bbone_prev =
NULL;
951 if (pchan->bbone_next == unlinked_pchan) {
952 pchan->bbone_next =
NULL;
954 if (pchan->custom_tx == unlinked_pchan) {
955 pchan->custom_tx =
NULL;
961 bool (*filter_fn)(
const char *bone_name,
void *
user_data),
970 pchan_next = pchan->
next;
988 for (ct = targets.
first; ct; ct = ct->
next) {
1054 memset(runtime, 0,
sizeof(*runtime));
1060 memset(runtime, 0,
sizeof(*runtime));
1176 if (pchan_from->
prop) {
1216 if (
data->rootbone < 0) {
1231 parchan = parchan->
parent;
1271 name =
DATA_(
"Group");
1358 bool found_key =
false;
1359 float found_key_frame = 0.0f;
1362 switch (fcu->totvert) {
1374 const float this_key_frame = fcu->bezt !=
NULL ? fcu->bezt[0].vec[1][0] : fcu->fpt[0].vec[0];
1377 found_key_frame = this_key_frame;
1383 if (!
compare_ff(found_key_frame, this_key_frame, 0.001f)) {
1396 float min = 999999999.0f,
max = -999999999.0f;
1397 short foundvert = 0, foundmod = 0;
1427 switch (fcm->
type) {
1465 if (foundvert || foundmod) {
1491 if (*r_start >= *r_end) {
1492 *r_end = *r_start + 1.0f;
1505 char *basePath =
NULL;
1521 if (basePath ==
NULL) {
1529 const char *bPtr =
NULL, *pPtr =
NULL;
1543 bPtr = strstr(fcu->
rna_path, basePath);
1549 bPtr += strlen(basePath);
1559 pPtr = strstr(bPtr,
"location");
1571 pPtr = strstr(bPtr,
"scale");
1583 pPtr = strstr(bPtr,
"rotation");
1596 pPtr = strstr(bPtr,
"bbone_");
1609 pPtr = strstr(bPtr,
"[\"");
1650 pchan->
size[0] = pchan->
size[1] = pchan->
size[2] = 1.0f;
1701 &
LOG,
"Pose copy error, pose to:%p from:%p", (
void *)to, (
void *)
from);
1710 for (pchanfrom =
from->chanbase.first; pchanfrom; pchanfrom = pchanfrom->
next) {
1712 if (pchanto !=
NULL) {
1760 workob->
pose = pose;
1815 const SessionUUID *session_uuid = &pchan->runtime.session_uuid;
1817 printf(
"Pose channel %s does not have UUID generated.\n", pchan->name);
1822 printf(
"Pose channel %s has duplicate UUID generated.\n", pchan->name);
1924 pchan->draw_data =
NULL;
1936 if (!pose || !arm) {
1941 bool rebuild =
false;
1963 pchan->bone->flag |= pchan->selectflag;
void BIK_clear_data(struct bPose *pose)
Blender kernel action and pose functionality.
bool BKE_animdata_action_ensure_idroot(const struct ID *owner, struct bAction *action)
void animviz_free_motionpath(struct bMotionPath *mpath)
struct bMotionPath * animviz_copy_motionpath(const struct bMotionPath *mpath_src)
void animviz_motionpath_blend_write(struct BlendWriter *writer, struct bMotionPath *mpath)
void animviz_motionpath_blend_read_data(struct BlendDataReader *reader, struct bMotionPath *mpath)
void BKE_animsys_evaluate_animdata(struct ID *id, struct AnimData *adt, const struct AnimationEvalContext *anim_eval_context, eAnimData_Recalc recalc, bool flush_to_original)
void animsys_evaluate_action_group(struct PointerRNA *ptr, struct bAction *act, struct bActionGroup *agrp, const struct AnimationEvalContext *anim_eval_context)
struct Bone * BKE_armature_find_bone_name(struct bArmature *arm, const char *name)
#define PBONE_VISIBLE(arm, bone)
void BKE_asset_metadata_idprop_ensure(struct AssetMetaData *asset_data, struct IDProperty *prop)
void BKE_constraints_free_ex(struct ListBase *list, bool do_id_user)
void BKE_constraint_targets_flush(struct bConstraint *con, struct ListBase *targets, bool no_copy)
void BKE_constraint_blend_write(struct BlendWriter *writer, struct ListBase *conlist)
void BKE_constraint_blend_read_expand(struct BlendExpander *expander, struct ListBase *lb)
void BKE_constraint_blend_read_data(struct BlendDataReader *reader, struct ListBase *lb)
int BKE_constraint_targets_get(struct bConstraint *con, struct ListBase *r_targets)
void BKE_constraints_copy(struct ListBase *dst, const struct ListBase *src, bool do_extern)
void BKE_constraint_blend_read_lib(struct BlendLibReader *reader, struct ID *id, struct ListBase *conlist)
void BKE_constraints_copy_ex(struct ListBase *dst, const struct ListBase *src, int flag, bool do_extern)
void BKE_fcurve_blend_write(struct BlendWriter *writer, struct ListBase *fcurves)
void BKE_fcurve_blend_read_data(struct BlendDataReader *reader, struct ListBase *fcurves)
void BKE_fcurve_free(struct FCurve *fcu)
void BKE_fcurve_foreach_id(struct FCurve *fcu, struct LibraryForeachIDData *data)
void BKE_fcurve_blend_read_lib(struct BlendLibReader *reader, struct ID *id, struct ListBase *fcurves)
struct FCurve * BKE_fcurve_copy(const struct FCurve *fcu)
void BKE_fcurve_blend_read_expand(struct BlendExpander *expander, struct ListBase *fcurves)
void BKE_fcurves_free(ListBase *list)
bool BKE_fcurve_calc_range(struct FCurve *fcu, float *min, float *max, bool do_sel_only, bool do_min_length)
void BKE_previewimg_free(struct PreviewImage **prv)
void BKE_previewimg_id_copy(struct ID *new_id, const struct ID *old_id)
void BKE_previewimg_blend_read(struct BlendDataReader *reader, struct PreviewImage *prv)
void BKE_previewimg_blend_write(struct BlendWriter *writer, const struct PreviewImage *prv)
void IDP_BlendReadExpand(struct BlendExpander *expander, struct IDProperty *prop)
struct IDProperty * IDP_CopyProperty_ex(const struct IDProperty *prop, int flag) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void IDP_BlendWrite(struct BlendWriter *writer, const struct IDProperty *prop)
struct IDProperty * IDP_New(char type, const IDPropertyTemplate *val, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
#define IDP_BlendDataRead(reader, prop)
void IDP_FreeProperty_ex(struct IDProperty *prop, bool do_id_user)
void IDP_FreeProperty(struct IDProperty *prop)
void IDP_BlendReadLib(struct BlendLibReader *reader, struct Library *lib, struct IDProperty *prop)
struct IDProperty * IDP_CopyProperty(const struct IDProperty *prop) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
@ IDTYPE_FLAGS_NO_ANIMDATA
@ LIB_ID_CREATE_NO_USER_REFCOUNT
void id_us_min(struct ID *id)
void id_us_plus(struct ID *id)
void BKE_id_blend_write(struct BlendWriter *writer, struct ID *id)
void * BKE_id_new(struct Main *bmain, short type, const char *name)
#define BKE_LIB_FOREACHID_PROCESS_IDSUPER(_data, _id_super, _cb_flag)
#define BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL(_data, _func_call)
General operations, lookup, etc. for blender objects.
void BKE_object_workob_clear(struct Object *workob)
GHash * BLI_ghash_str_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
GSet * BLI_gset_new(GSetHashFP hashfp, GSetCmpFP cmpfp, const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void * BLI_gset_lookup(const GSet *gs, const void *key) ATTR_WARN_UNUSED_RESULT
void BLI_gset_insert(GSet *gs, void *key)
void * BLI_ghash_lookup(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
bool BLI_ghash_remove(GHash *gh, const void *key, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void BLI_ghash_insert(GHash *gh, void *key, void *val)
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
void BLI_freelinkN(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void void void void void BLI_duplicatelist(struct ListBase *dst, const struct ListBase *src) ATTR_NONNULL(1
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
struct LinkData * BLI_genericNodeN(void *data)
void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
void void void BLI_movelisttolist(struct ListBase *dst, struct ListBase *src) ATTR_NONNULL(1
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findstring(const struct ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE float max_ff(float a, float b)
MINLINE float min_ff(float a, float b)
MINLINE int compare_ff(float a, float b, float max_diff)
MINLINE void rgba_uchar_args_set(unsigned char col[4], unsigned char r, unsigned char g, unsigned char b, unsigned char a)
void unit_m4(float m[4][4])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void unit_axis_angle(float axis[3], float *angle)
void copy_qt_qt(float q[4], const float a[4])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void copy_v3_fl(float r[3], float f)
MINLINE void zero_v3(float r[3])
bool BLI_session_uuid_ghash_compare(const void *lhs_v, const void *rhs_v)
SessionUUID BLI_session_uuid_generate(void)
uint BLI_session_uuid_ghash_hash(const void *uuid_v)
bool BLI_session_uuid_is_generated(const SessionUUID *uuid)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
bool BLI_uniquename(struct ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t name_len)
size_t BLI_string_flip_side_name(char *r_name, const char *from_name, bool strip_number, size_t name_len)
#define BLO_read_data_address(reader, ptr_p)
struct Main * BLO_read_lib_get_main(BlendLibReader *reader)
void BLO_write_struct_by_name(BlendWriter *writer, const char *struct_name, const void *data_ptr)
#define BLO_write_id_struct(writer, struct_name, id_address, id)
#define BLO_write_struct(writer, struct_name, data_ptr)
void BLO_read_list(BlendDataReader *reader, struct ListBase *list)
bool BLO_read_lib_is_undo(BlendLibReader *reader)
#define BLO_read_id_address(reader, lib, id_ptr_p)
#define BLO_expand(expander, id)
#define BLT_I18NCONTEXT_ID_ACTION
#define CLOG_ERROR(clg_ref,...)
void DEG_id_tag_update_ex(struct Main *bmain, struct ID *id, int flag)
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
@ ID_RECALC_ANIMATION_NO_FLUSH
#define ID_IS_LINKED(_id)
@ ITASC_INITIAL_REITERATION
@ POSE_CONSTRAINTS_NEED_UPDATE_FLAGS
@ POSE_CONSTRAINTS_TIMEDEPEND
@ CONSTRAINT_TYPE_SPLINEIK
@ CONSTRAINT_TYPE_KINEMATIC
@ CONSTRAINT_TYPE_FOLLOWPATH
Object is a sort of wrapper for general info.
Read Guarded memory(de)allocation.
static void init_data(ModifierData *md)
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 Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position CLAMP
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 Bright Control the brightness and contrast of the input color Vector Map an input vectors to curves
static AssetTypeInfo AssetType_AC
bAction * BKE_action_add(Main *bmain, const char name[])
void BKE_pose_channels_remove(Object *ob, bool(*filter_fn)(const char *bone_name, void *user_data), void *user_data)
void BKE_pose_channels_free(bPose *pose)
void BKE_pose_check_uuids_unique_and_report(const bPose *pose)
static void action_blend_read_expand(BlendExpander *expander, ID *id)
bool BKE_pose_channels_is_valid(const bPose *pose)
bPoseChannel * BKE_pose_channel_active_or_first_selected(struct Object *ob)
void BKE_pose_channel_runtime_reset(bPoseChannel_Runtime *runtime)
void BKE_pose_free_data(bPose *pose)
static IDProperty * action_asset_type_property(const bAction *action)
void BKE_pose_blend_read_expand(BlendExpander *expander, bPose *pose)
bool action_has_motion(const bAction *act)
void BKE_pose_tag_recalc(Main *bmain, bPose *pose)
void BKE_pose_channel_copy_data(bPoseChannel *pchan, const bPoseChannel *pchan_from)
void BKE_pose_remove_group_index(bPose *pose, const int index)
bool BKE_pose_copy_result(bPose *to, bPose *from)
void BKE_pose_remove_group(bPose *pose, bActionGroup *grp, const int index)
void BKE_action_get_frame_range(const struct bAction *act, float *r_start, float *r_end)
static void action_blend_write(BlendWriter *writer, ID *id, const void *id_address)
void set_active_action_group(bAction *act, bActionGroup *agrp, short select)
void BKE_pose_channel_runtime_free(bPoseChannel_Runtime *runtime)
static bool pose_channel_in_IK_chain(Object *ob, bPoseChannel *pchan, int level)
bPoseChannel * BKE_pose_channel_ensure(bPose *pose, const char *name)
void BKE_pose_channel_session_uuid_generate(bPoseChannel *pchan)
bool BKE_pose_is_layer_visible(const bArmature *arm, const bPoseChannel *pchan)
bool BKE_action_has_single_frame(const struct bAction *act)
void BKE_pose_tag_update_constraint_flags(bPose *pose)
void action_groups_clear_tempflags(bAction *act)
void BKE_pose_ikparam_init(bPose *pose)
static void pose_channels_remove_internal_links(Object *ob, bPoseChannel *unlinked_pchan)
void BKE_pose_free_data_ex(bPose *pose, bool do_id_user)
void BKE_pose_itasc_init(bItasc *itasc)
static void action_copy_data(Main *UNUSED(bmain), ID *id_dst, const ID *id_src, const int flag)
static void action_blend_read_data(BlendDataReader *reader, ID *id)
bPoseChannel * BKE_pose_channel_get_mirrored(const bPose *pose, const char *name)
void BKE_pose_copy_pchan_result(bPoseChannel *pchanto, const bPoseChannel *pchanfrom)
void BKE_pose_channel_free(bPoseChannel *pchan)
bActionGroup * BKE_action_group_find_name(bAction *act, const char name[])
void BKE_pose_channels_hash_ensure(bPose *pose)
const char * BKE_pose_ikparam_get_name(bPose *pose)
void BKE_pose_free_ex(bPose *pose, bool do_id_user)
void BKE_action_groups_reconstruct(bAction *act)
void action_groups_add_channel(bAction *act, bActionGroup *agrp, FCurve *fcurve)
void BKE_pose_copy_data_ex(bPose **dst, const bPose *src, const int flag, const bool copy_constraints)
void BKE_pose_blend_read_lib(BlendLibReader *reader, Object *ob, bPose *pose)
bPoseChannel * BKE_pose_channel_active_if_layer_visible(struct Object *ob)
void BKE_action_fcurves_clear(bAction *act)
void BKE_pose_free(bPose *pose)
bActionGroup * BKE_pose_add_group(bPose *pose, const char *name)
void action_groups_remove_channel(bAction *act, FCurve *fcu)
bool BKE_pose_channel_in_IK_chain(Object *ob, bPoseChannel *pchan)
static void action_foreach_id(ID *id, LibraryForeachIDData *data)
void BKE_pose_channel_free_bbone_cache(bPoseChannel_Runtime *runtime)
bActionGroup * get_active_actiongroup(bAction *act)
void BKE_pose_channel_runtime_reset_on_copy(bPoseChannel_Runtime *runtime)
void BKE_pose_channels_free_ex(bPose *pose, bool do_id_user)
void BKE_pose_blend_write(BlendWriter *writer, bPose *pose, bArmature *arm)
bActionGroup * action_groups_add_new(bAction *act, const char name[])
void BKE_pose_update_constraint_flags(bPose *pose)
static void blend_read_lib_constraint_channels(BlendLibReader *reader, ID *id, ListBase *chanbase)
static void blend_read_expand_constraint_channels(BlendExpander *expander, ListBase *chanbase)
bool BKE_action_is_cyclic(const struct bAction *act)
bPoseChannel * BKE_pose_channel_find_name(const bPose *pose, const char *name)
void calc_action_range(const bAction *act, float *start, float *end, short incl_modifiers)
static void action_asset_pre_save(void *asset_ptr, struct AssetMetaData *asset_data)
bPoseChannel * BKE_pose_channel_active(Object *ob, const bool check_arm_layer)
void BKE_pose_blend_read_data(BlendDataReader *reader, bPose *pose)
void BKE_pose_channels_hash_free(bPose *pose)
void action_group_colors_sync(bActionGroup *grp, const bActionGroup *ref_grp)
short action_get_item_transforms(bAction *act, Object *ob, bPoseChannel *pchan, ListBase *curves)
void what_does_obaction(Object *ob, Object *workob, bPose *pose, bAction *act, char groupname[], const AnimationEvalContext *anim_eval_context)
static void action_blend_read_lib(BlendLibReader *reader, ID *id)
void BKE_pose_channel_free_ex(bPoseChannel *pchan, bool do_id_user)
static void action_free_data(struct ID *id)
void BKE_pose_copy_data(bPose **dst, const bPose *src, const bool copy_constraints)
void BKE_pose_rest(bPose *pose, bool selected_bones_only)
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
SyclQueue void void * src
void(* MEM_freeN)(void *vmemh)
void *(* MEM_dupallocN)(const void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
char * RNA_path_from_ID_to_struct(const PointerRNA *ptr)
struct bActionGroup * prev
struct bActionGroup * next
struct bConstraintTarget * next
struct bConstraint * next
struct Mat4 * bbone_deform_mats
struct DualQuat * bbone_dual_quats
struct Mat4 * bbone_pose_mats
struct Mat4 * bbone_rest_mats
float custom_scale_xyz[3]
bPoseChannelDrawData * draw_data
float custom_rotation_euler[3]
struct bPoseChannel * parent
struct bPoseChannel * custom_tx
struct bPoseChannel * bbone_next
struct bPoseChannel * next
float custom_translation[3]
struct bPoseChannel_Runtime runtime
struct bPoseChannel * bbone_prev
bPoseChannel ** chan_array