69 #include "RNA_prototypes.h"
105 if (use_autokey_mode) {
134 printf(
"ERROR: Couldn't add AnimData (ID = %s)\n", (
id) ? (
id->
name) :
"<None>");
142 char actname[
sizeof(
id->name) - 2];
177 const char rna_path[],
178 const int array_index)
278 int old_flag = fcu->
flag;
281 BKE_report(reports,
RPT_ERROR,
"No RNA pointer available to retrieve values for this fcurve");
292 "Could not update flags for this fcurve, as RNA path is invalid for the given ID "
293 "(ID = %s, path = %s)",
302 if (old_flag != fcu->
flag) {
328 float start = first->
vec[1][0], end = last->vec[1][0];
334 if (*px < start || *px > end) {
335 float period = end - start;
336 float step =
floorf((*px - start) / period);
337 *px -= step * period;
342 short mode = (step >= 0) ?
data->after_mode :
data->before_mode;
345 *py -= step * (last->vec[1][1] - first->
vec[1][1]);
369 const float fix =
floorf(frame_offset / period) * period;
380 fcu->
bezt[1].
vec[0][0] += period;
381 fcu->
bezt[1].
vec[1][0] += period;
382 fcu->
bezt[1].
vec[2][0] += period;
396 float dy = bezt->
vec[1][1] - dst->
vec[1][1];
399 dst->
vec[0][1] += dy;
400 dst->
vec[1][1] += dy;
401 dst->
vec[2][1] += dy;
422 if ((i >= 0) && (i < fcu->totvert)) {
424 fcu->
bezt[i] = *bezt;
455 if (i < fcu->totvert) {
478 *(fcu->
bezt) = *bezt;
516 if (bezt_auto && prev_auto && next_auto) {
531 const float hx = bezt->
vec[1][0] - bezt->
vec[0][0];
532 const float dx = bezt->
vec[1][0] -
prev->vec[1][0];
535 const bool auto_works_well =
fabsf(hx - dx / 3.0f) < 0.001f;
536 if (auto_works_well) {
555 beztr.
vec[0][0] =
x - 1.0f;
559 beztr.
vec[2][0] =
x + 1.0f;
573 beztr.
h1 = beztr.
h2 =
U.keyhandles_new;
576 beztr.
ipo =
U.ipo_new;
598 beztr.
back = 1.70158f;
627 bezt->
ipo = (bezt - 1)->ipo;
629 else if (a < fcu->totvert - 1) {
630 bezt->
ipo = (bezt + 1)->ipo;
682 for (
int i = 0; i < totCount; i++) {
683 float prevPosi = 0.0f, prevVal = 0.0f;
684 float beztPosi = 0.0f, beztVal = 0.0f;
687 beztPosi = bezt->
vec[1][0];
688 beztVal = bezt->
vec[1][1];
694 prevPosi =
prev->vec[1][0];
695 prevVal =
prev->vec[1][1];
698 if (
IS_EQF(prevPosi, cFrame) &&
IS_EQF(beztPosi, cFrame) &&
IS_EQF(beztPosi, prevPosi)) {
703 if ((prevPosi <= cFrame) && (cFrame <= beztPosi)) {
715 if (
IS_EQF(realVal, nValue)) {
722 if (cFrame < prevPosi) {
738 if ((cFrame < beztPosi) && (totCount == 1)) {
744 if (i < (totCount - 1)) {
761 float valA = bezt->
vec[1][1];
764 valB =
prev->vec[1][1];
767 valB = bezt->
vec[1][1] + 1.0f;
792 if (
length > buffer_size) {
800 for (
int i = 0; i <
length; i++) {
801 values[i] = (
float)tmp_bool[i];
808 for (
int i = 0; i <
length; i++) {
809 values[i] = (
float)tmp_int[i];
817 memset(values, 0,
sizeof(
float) *
length);
865 bool has_rigidbody =
false;
866 bool has_parent =
false;
867 const char *identifier =
NULL;
879 if (
ptr->
type == &RNA_Object) {
891 else if (
ptr->
type == &RNA_PoseBone) {
901 if (
ELEM(
NULL, con, identifier) && (has_parent ==
false) && (has_rigidbody ==
false)) {
906 if (identifier ==
NULL) {
907 printf(
"%s failed: NULL identifier\n", __func__);
911 if (strstr(identifier,
"location")) {
914 else if (strstr(identifier,
"rotation")) {
917 else if (strstr(identifier,
"scale")) {
921 printf(
"%s failed: identifier - '%s'\n", __func__, identifier);
928 if (has_parent || has_rigidbody) {
933 for (; con; con = con->
next) {
1044 if (
ptr->
type == &RNA_Object) {
1047 if (strstr(identifier,
"location")) {
1056 else if (
ptr->
type == &RNA_PoseBone) {
1063 if (strstr(identifier,
"location")) {
1077 if (strstr(identifier,
"rotation_euler")) {
1084 if (strstr(identifier,
"rotation_quaternion")) {
1094 if (strstr(identifier,
"rotation_axis_angle")) {
1102 if (strstr(identifier,
"scale")) {
1121 const bool force_all,
1127 int total_failed = 0;
1128 for (
int i = 0; i <
count; i++) {
1129 const bool cur_index_evaluated =
ELEM(index, i, -1) || force_all;
1130 if (!cur_index_evaluated) {
1145 if (total_failed == 0) {
1155 "Could not insert %i keyframe(s) due to zero NLA influence, base value, or value "
1156 "remapping failed: %s.%s for indices [%s]",
1160 str_failed_indices);
1210 *r_successful_remaps);
1216 r_force_all ? *r_force_all :
false,
1217 *r_successful_remaps);
1237 "F-Curve with path '%s[%d]' cannot be keyframed, ensure that it is not locked or sampled, "
1238 "and try removing F-Modifiers",
1244 float cfra = anim_eval_context->
eval_time;
1285 switch (insert_mode) {
1312 float curval = 0.0f;
1323 reports,
RPT_ERROR,
"No RNA pointer available to retrieve values for keyframing from");
1336 "Could not insert keyframe, as RNA path is invalid for the given ID (ID = %s, "
1367 &successful_remaps);
1369 if (index >= 0 && index < value_count) {
1370 curval = values[index];
1373 if (values != value_buffer) {
1381 if (!curval_valid) {
1395 const char rna_path[],
1407 FCurve *fcu = can_create_curve ?
1413 const bool is_new_curve = (fcu->
totvert == 0);
1432 if (is_cyclic_action && fcu->
totvert == 1) {
1441 reports,
ptr, prop, fcu, anim_eval_context, curval, keytype, flag);
1444 if (is_cyclic_action && is_new_curve) {
1461 if (adt && adt->
action == act) {
1464 nla_cache, id_ptr, adt, anim_eval_context);
1472 *r_nla_context =
NULL;
1473 return *anim_eval_context;
1481 const char rna_path[],
1511 "Could not insert keyframe, as RNA path is invalid for the given ID (ID = %s, path = %s)",
1512 (
id) ?
id->
name :
TIP_(
"<Missing ID block>"),
1525 "Could not insert keyframe, as this type does not support animation data (ID = "
1536 anim_eval_context, &id_ptr, adt, act, nla_cache ? nla_cache : &tmp_nla_cache, &nla_context);
1555 &successful_remaps);
1558 if (array_index == -1 || force_all) {
1563 for (array_index = 0; array_index < value_count; array_index++) {
1577 values[array_index],
1581 exclude = array_index;
1586 if (exclude != -1) {
1589 for (array_index = 0; array_index < value_count; array_index++) {
1594 if (array_index != exclude) {
1604 values[array_index],
1613 for (array_index = 0; array_index < value_count; array_index++) {
1627 values[array_index],
1635 if (array_index >= 0 && array_index < value_count &&
1646 values[array_index],
1652 if (values != value_buffer) {
1727 const char rna_path[],
1734 int array_index_max = array_index + 1;
1749 "Could not delete keyframe, as RNA path is invalid for the given ID (ID = %s, path = %s)",
1776 if (array_index == -1) {
1784 if (array_index_max == array_index) {
1790 for (; array_index < array_index_max; array_index++) {
1801 "Not deleting keyframe for locked F-Curve '%s' for %s '%s'",
1834 const char rna_path[],
1841 int array_index_max = array_index + 1;
1856 "Could not clear keyframe, as RNA path is invalid for the given ID (ID = %s, path = %s)",
1880 if (array_index == -1) {
1888 if (array_index_max == array_index) {
1894 for (; array_index < array_index_max; array_index++) {
1905 "Not clearing all keyframes from locked F-Curve '%s' for %s '%s'",
1958 bool ob_edit_mode =
false;
1960 float cfra = (
float)
1975 ob_edit_mode =
true;
1983 "Keying set '%s' - successfully added %d keyframes",
1994 if (num_channels < 0) {
1999 if (num_channels > 0) {
2006 if (num_channels > 0) {
2009 "Successfully added %d keyframes for keying set '%s'",
2026 ot->
name =
"Insert Keyframe";
2027 ot->
idname =
"ANIM_OT_keyframe_insert";
2029 "Insert keyframes on the current frame for all properties in the specified Keying Set";
2051 ot->
name =
"Insert Keyframe (by name)";
2052 ot->
idname =
"ANIM_OT_keyframe_insert_by_name";
2053 ot->
description =
"Alternate access to 'Insert Keyframe' for keymaps to use";
2105 for (
int i = 0; i < totitem; i++) {
2111 "ANIM_OT_keyframe_insert_by_name",
2138 ot->
name =
"Insert Keyframe Menu";
2139 ot->
idname =
"ANIM_OT_keyframe_insert_menu";
2141 "Insert Keyframes for specified Keying Set, with menu of available Keying Sets if undefined";
2182 float cfra = (
float)
2190 printf(
"KeyingSet '%s' - Successfully removed %d Keyframes\n", ks->
name, num_channels);
2194 if (num_channels < 0) {
2199 if (num_channels > 0) {
2205 if (num_channels > 0) {
2208 "Successfully removed %d keyframes for keying set '%s'",
2224 ot->
name =
"Delete Keying-Set Keyframe";
2225 ot->
idname =
"ANIM_OT_keyframe_delete";
2227 "Delete keyframes on the current frame for all properties in the specified Keying Set";
2249 ot->
name =
"Delete Keying-Set Keyframe (by name)";
2250 ot->
idname =
"ANIM_OT_keyframe_delete_by_name";
2251 ot->
description =
"Alternate access to 'Delete Keyframe' for keymaps to use";
2276 bool changed =
false;
2280 if ((ob->adt) && (ob->adt->action)) {
2286 bool can_delete =
false;
2295 char bone_name[
sizeof(pchan->
name)];
2297 fcu->
rna_path,
"pose.bones[", bone_name,
sizeof(bone_name))) {
2300 if ((pchan) && (pchan->
bone)) {
2342 ot->
name =
"Remove Animation";
2343 ot->
description =
"Remove all keyframe animation for selected objects";
2344 ot->
idname =
"ANIM_OT_keyframe_clear_v3d";
2361 int selected_objects_len = 0;
2362 int selected_objects_success_len = 0;
2363 int success_multi = 0;
2371 selected_objects_len += 1;
2374 if ((ob->adt) && (ob->adt->action)) {
2387 "Not deleting keyframe for locked F-Curve '%s', object '%s'",
2401 char bone_name[
sizeof(pchan->
name)];
2408 if ((pchan) && (pchan->
bone)) {
2438 selected_objects_success_len += 1;
2439 success_multi += success;
2446 if (selected_objects_success_len) {
2453 if (selected_objects_success_len) {
2456 "%d object(s) successfully had %d keyframes removed",
2457 selected_objects_success_len,
2462 op->
reports,
RPT_ERROR,
"No keyframes removed from %d object(s)", selected_objects_len);
2483 ot->
name =
"Delete Keyframe";
2484 ot->
description =
"Remove keyframes on current frame for selected objects and bones";
2485 ot->
idname =
"ANIM_OT_keyframe_delete_v3d";
2510 bool changed =
false;
2525 if (
ptr.
type == &RNA_NlaStrip) {
2540 "This property cannot be animated as it will not get updated correctly");
2546 bool driven, special;
2550 if (fcu && driven) {
2567 const char *group =
NULL;
2576 if (
ptr.
type == &RNA_PoseBone) {
2578 group = pchan->
name;
2580 else if ((
ptr.
type == &RNA_Object) &&
2581 (strstr(identifier,
"location") || strstr(identifier,
"rotation") ||
2582 strstr(identifier,
"scale"))) {
2586 group =
"Object Transforms";
2611 "Failed to resolve path to property, "
2612 "try manually specifying this using a Keying Set instead");
2620 "\"%s\" property cannot be animated",
2626 "Button doesn't appear to have any property information attached (ptr.data = "
2654 ot->
name =
"Insert Keyframe (Buttons)";
2655 ot->
idname =
"ANIM_OT_keyframe_insert_button";
2656 ot->
description =
"Insert a keyframe for current UI-active property";
2678 float cfra = (
float)
2680 bool changed =
false;
2705 "Not deleting keyframe for locked F-Curve for NLA Strip influence on %s - %s '%s'",
2743 printf(
"Button Delete-Key: no path to property\n");
2748 printf(
"ptr.data = %p, prop = %p\n",
ptr.
data, (
void *)prop);
2765 ot->
name =
"Delete Keyframe (Buttons)";
2766 ot->
idname =
"ANIM_OT_keyframe_delete_button";
2767 ot->
description =
"Delete current keyframe of current UI-active property";
2788 bool changed =
false;
2811 printf(
"Button Clear-Key: no path to property\n");
2815 printf(
"ptr.data = %p, prop = %p\n",
ptr.
data, (
void *)prop);
2832 ot->
name =
"Clear Keyframe (Buttons)";
2833 ot->
idname =
"ANIM_OT_keyframe_clear_button";
2834 ot->
description =
"Clear all keyframes on the currently active property";
2900 if ((i >= 0) && (i < fcu->totvert)) {
2916 anim_rna.
prop = prop;
2924 float cur_val = (index >= 0 && index <
count) ? values[index] : 0.0f;
3117 const bool only_if_property_keyed)
3128 bool changed =
false;
3132 const int rnaindex_check = (rnaindex == -1) ? 0 : rnaindex;
3134 C,
ptr, prop, rnaindex_check,
NULL, &action, &driven, &special);
3138 if (fcu ==
NULL && (driven || special || only_if_property_keyed)) {
3176 if (only_if_property_keyed) {
typedef float(TangentPoint)[2]
Blender kernel action and pose functionality.
struct bActionGroup * action_groups_add_new(struct bAction *act, const char name[])
struct bPoseChannel * BKE_pose_channel_find_name(const struct bPose *pose, const char *name)
void action_group_colors_sync(struct bActionGroup *grp, const struct bActionGroup *ref_grp)
struct bActionGroup * BKE_action_group_find_name(struct bAction *act, const char name[])
struct bAction * BKE_action_add(struct Main *bmain, const char name[])
bool BKE_action_is_cyclic(const struct bAction *act)
void action_groups_add_channel(struct bAction *act, struct bActionGroup *agrp, struct FCurve *fcurve)
bool BKE_animdata_action_ensure_idroot(const struct ID *owner, struct bAction *action)
struct AnimData * BKE_animdata_ensure_id(struct ID *id)
struct AnimData * BKE_animdata_from_id(const struct ID *id)
void BKE_animsys_free_nla_keyframing_context_cache(struct ListBase *cache)
AnimationEvalContext BKE_animsys_eval_context_construct(struct Depsgraph *depsgraph, float eval_time)
void BKE_animsys_nla_remap_keyframe_values(struct NlaKeyframingContext *context, struct PointerRNA *prop_ptr, struct PropertyRNA *prop, float *values, int count, int index, const struct AnimationEvalContext *anim_eval_context, bool *r_force_all, BLI_bitmap *r_successful_remaps)
struct NlaKeyframingContext * BKE_animsys_get_nla_keyframing_context(struct ListBase *cache, struct PointerRNA *ptr, struct AnimData *adt, const struct AnimationEvalContext *anim_eval_context)
AnimationEvalContext BKE_animsys_eval_context_construct_at(const AnimationEvalContext *anim_eval_context, float eval_time)
void BKE_armature_mat_pose_to_bone(struct bPoseChannel *pchan, const float inmat[4][4], float outmat[4][4])
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
struct Object * CTX_data_edit_object(const bContext *C)
#define CTX_DATA_BEGIN(C, Type, instance, member)
struct ReportList * CTX_wm_reports(const bContext *C)
struct Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
void BKE_fcurve_active_keyframe_set(struct FCurve *fcu, const struct BezTriple *active_bezt)
float evaluate_fcurve(struct FCurve *fcu, float evaltime)
bool BKE_fcurve_bezt_subdivide_handles(struct BezTriple *bezt, struct BezTriple *prev, struct BezTriple *next, float *r_pdelta)
float calculate_fcurve(struct PathResolvedRNA *anim_rna, struct FCurve *fcu, const struct AnimationEvalContext *anim_eval_context)
bool BKE_fcurve_is_empty(struct FCurve *fcu)
struct FCurve * BKE_fcurve_find_by_rna_context_ui(struct bContext *C, const struct PointerRNA *ptr, struct PropertyRNA *prop, int rnaindex, struct AnimData **r_animdata, struct bAction **r_action, bool *r_driven, bool *r_special)
int BKE_fcurve_bezt_binarysearch_index(const struct BezTriple array[], float frame, int arraylen, bool *r_replace)
bool BKE_fcurve_is_keyframable(struct FCurve *fcu)
bool BKE_fcurve_is_protected(struct FCurve *fcu)
eFCU_Cycle_Type BKE_fcurve_get_cycle_type(struct FCurve *fcu)
void BKE_fcurve_handles_recalc(struct FCurve *fcu)
struct FModifier * add_fmodifier(ListBase *modifiers, int type, struct FCurve *owner_fcu)
struct FCurve * BKE_fcurve_create(void)
void BKE_fcurve_delete_key(struct FCurve *fcu, int index)
struct FCurve * BKE_fcurve_find(ListBase *list, const char rna_path[], int array_index)
float evaluate_driver(struct PathResolvedRNA *anim_rna, struct ChannelDriver *driver, struct ChannelDriver *driver_orig, const struct AnimationEvalContext *anim_eval_context)
const char * BKE_idtype_idcode_to_name(short idcode)
struct Key * BKE_key_from_object(struct Object *ob)
bool BKE_id_is_editable(const struct Main *bmain, const struct ID *id)
General operations, lookup, etc. for materials.
struct Material * BKE_object_material_get(struct Object *ob, short act)
bool BKE_nlastrip_has_curves_for_property(const struct PointerRNA *ptr, const struct PropertyRNA *prop)
float BKE_nla_tweakedit_remap(struct AnimData *adt, float cframe, short mode)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
#define BLI_BITMAP_NEW(_num, _alloc_string)
#define BLI_BITMAP_TEST_BOOL(_bitmap, _index)
A dynamically sized string ADT.
DynStr * BLI_dynstr_new(void) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
char * BLI_dynstr_get_cstring(const DynStr *ds) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BLI_dynstr_free(DynStr *ds) ATTR_NONNULL()
void BLI_dynstr_appendf(DynStr *__restrict ds, const char *__restrict format,...) ATTR_PRINTF_FORMAT(2
void BLI_kdtree_nd_() free(KDTree *tree)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int compare_ff_relative(float a, float b, float max_diff, int max_ulps)
void copy_m3_m4(float m1[3][3], const float m2[4][4])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void mat4_to_size(float size[3], const float M[4][4])
void mat4_to_axis_angle(float axis[3], float *angle, const float M[4][4])
void mat4_to_eulO(float eul[3], short order, const float mat[4][4])
void mat3_to_quat_is_ok(float q[4], const float mat[3][3])
MINLINE void copy_v3_v3(float r[3], const float a[3])
bool bool BLI_str_quoted_substr(const char *__restrict str, const char *__restrict prefix, char *result, size_t result_maxlen)
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
struct Depsgraph Depsgraph
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
@ FCM_EXTRAPOLATE_CYCLIC_OFFSET
@ INSERTKEY_OVERWRITE_FULL
@ FCURVE_SMOOTH_CONT_ACCEL
@ CONSTRAINT_TYPE_TRACKTO
@ CONSTRAINT_TYPE_CHILDOF
@ CONSTRAINT_TYPE_TRANSFORM
@ CONSTRAINT_TYPE_ARMATURE
@ CONSTRAINT_TYPE_LOCLIKE
@ CONSTRAINT_TYPE_ROTLIMIT
@ CONSTRAINT_TYPE_ROTLIKE
@ CONSTRAINT_TYPE_KINEMATIC
@ CONSTRAINT_TYPE_DISTLIMIT
@ CONSTRAINT_TYPE_TRANSLIKE
@ CONSTRAINT_TYPE_LOCLIMIT
@ CONSTRAINT_TYPE_LOCKTRACK
@ CONSTRAINT_TYPE_SIZELIMIT
@ CONSTRAINT_TYPE_FOLLOWPATH
@ CONSTRAINT_TYPE_SIZELIKE
@ CONSTRAINT_TYPE_DAMPTRACK
#define BEZT_IS_AUTOH(bezt)
Object is a sort of wrapper for general info.
Types and defines for representing Rigid Body entities.
#define IS_AUTOKEY_FLAG(scene, flag)
#define IS_AUTOKEY_MODE(scene, mode)
#define IS_AUTOKEY_ON(scene)
bool ED_object_mode_set(struct bContext *C, eObjectMode mode)
bool ED_operator_areaactive(struct bContext *C)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Read Guarded memory(de)allocation.
#define MEM_reallocN(vmemh, len)
#define RNA_MAX_ARRAY_LENGTH
@ PROP_STRING_SEARCH_SUGGESTION
struct uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
void uiItemS(uiLayout *layout)
uiBut * UI_context_active_but_prop_get(const struct bContext *C, struct PointerRNA *r_ptr, struct PropertyRNA **r_prop, int *r_index)
void UI_popup_menu_end(struct bContext *C, struct uiPopupMenu *pup)
void uiItemStringO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, const char *value)
void UI_context_update_anim_flag(const struct bContext *C)
uiPopupMenu * UI_popup_menu_begin(struct bContext *C, const char *title, int icon) ATTR_NONNULL()
bool UI_but_flag_is_set(uiBut *but, int flag)
bool ANIM_remove_empty_action_from_animdata(struct AnimData *adt)
void ANIM_fcurve_delete_from_animdata(bAnimContext *ac, AnimData *adt, FCurve *fcu)
__forceinline bool all(const avxb &b)
const Depsgraph * depsgraph
DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
ccl_global float * buffer
static void replace_bezt_keyframe_ypos(BezTriple *dst, const BezTriple *bezt)
void ANIM_OT_keyframe_insert_menu(wmOperatorType *ot)
static void deg_tag_after_keyframe_delete(Main *bmain, ID *id, AnimData *adt)
bool fcurve_is_changed(PointerRNA ptr, PropertyRNA *prop, FCurve *fcu, const AnimationEvalContext *anim_eval_context)
static bool visualkey_can_use(PointerRNA *ptr, PropertyRNA *prop)
int delete_keyframe(Main *bmain, ReportList *reports, ID *id, bAction *act, const char rna_path[], int array_index, float cfra)
Main Delete Key-Framing API call.
static int insert_key_exec(bContext *C, wmOperator *op)
static int delete_key_exec(bContext *C, wmOperator *op)
static float * visualkey_get_values(PointerRNA *ptr, PropertyRNA *prop, float *buffer, int buffer_size, int *r_count)
static int insert_key_button_exec(bContext *C, wmOperator *op)
bool ED_autokeyframe_object(bContext *C, Scene *scene, Object *ob, KeyingSet *ks)
int insert_vert_fcurve(FCurve *fcu, float x, float y, eBezTriple_KeyframeType keyframe_type, eInsertKeyFlags flag)
Main Key-framing API call.
void ANIM_OT_keyframe_insert(wmOperatorType *ot)
static eFCU_Cycle_Type remap_cyclic_keyframe_location(FCurve *fcu, float *px, float *py)
bAction * ED_id_action_ensure(Main *bmain, ID *id)
static int delete_key_button_exec(bContext *C, wmOperator *op)
static bool object_frame_has_keyframe(Object *ob, float frame, short filter)
void ANIM_OT_keyframe_clear_button(wmOperatorType *ot)
bool insert_keyframe_direct(ReportList *reports, PointerRNA ptr, PropertyRNA *prop, FCurve *fcu, const AnimationEvalContext *anim_eval_context, eBezTriple_KeyframeType keytype, struct NlaKeyframingContext *nla_context, eInsertKeyFlags flag)
void ANIM_OT_keyframe_insert_by_name(wmOperatorType *ot)
static int clear_key_button_exec(bContext *C, wmOperator *op)
void ANIM_OT_keyframe_delete(wmOperatorType *ot)
static int insert_key_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static float * get_keyframe_values(ReportList *reports, PointerRNA ptr, PropertyRNA *prop, int index, struct NlaKeyframingContext *nla_context, eInsertKeyFlags flag, float *buffer, int buffer_size, const struct AnimationEvalContext *anim_eval_context, int *r_count, bool *r_force_all, BLI_bitmap **r_successful_remaps)
bool fcurve_frame_has_keyframe(const FCurve *fcu, float frame, short filter)
bool id_frame_has_keyframe(ID *id, float frame, short filter)
Main Keyframe Checking API call.
static float * setting_get_rna_values(PointerRNA *ptr, PropertyRNA *prop, float *buffer, int buffer_size, int *r_count)
static void get_keyframe_values_create_reports(ReportList *reports, PointerRNA ptr, PropertyRNA *prop, const int index, const int count, const bool force_all, const BLI_bitmap *successful_remaps)
void ANIM_OT_keyframe_clear_v3d(wmOperatorType *ot)
static bool delete_keyframe_fcurve(AnimData *adt, FCurve *fcu, float cfra)
static void update_autoflags_fcurve_direct(FCurve *fcu, PropertyRNA *prop)
FCurve * ED_action_fcurve_ensure(struct Main *bmain, struct bAction *act, const char group[], struct PointerRNA *ptr, const char rna_path[], const int array_index)
static void subdivide_nonauto_handles(const FCurve *fcu, BezTriple *bezt, BezTriple *prev, BezTriple *next)
static void make_new_fcurve_cyclic(const bAction *act, FCurve *fcu)
static int clear_anim_v3d_exec(bContext *C, wmOperator *UNUSED(op))
int insert_bezt_fcurve(FCurve *fcu, const BezTriple *bezt, eInsertKeyFlags flag)
void ANIM_OT_keyframe_insert_button(wmOperatorType *ot)
static bool insert_keyframe_fcurve_value(Main *bmain, ReportList *reports, PointerRNA *ptr, PropertyRNA *prop, bAction *act, const char group[], const char rna_path[], int array_index, const AnimationEvalContext *anim_eval_context, float curval, eBezTriple_KeyframeType keytype, eInsertKeyFlags flag)
static KeyingSet * keyingset_get_from_op_with_error(wmOperator *op, PropertyRNA *prop, Scene *scene)
static int clear_keyframe(Main *bmain, ReportList *reports, ID *id, bAction *act, const char rna_path[], int array_index, eInsertKeyFlags UNUSED(flag))
static AnimationEvalContext nla_time_remap(const AnimationEvalContext *anim_eval_context, PointerRNA *id_ptr, AnimData *adt, bAction *act, ListBase *nla_cache, NlaKeyframingContext **r_nla_context)
void update_autoflags_fcurve(FCurve *fcu, bContext *C, ReportList *reports, PointerRNA *ptr)
Lesser Key-framing API call.
bool ED_autokeyframe_property(bContext *C, Scene *scene, PointerRNA *ptr, PropertyRNA *prop, int rnaindex, float cfra, const bool only_if_property_keyed)
static short new_key_needed(FCurve *fcu, float cFrame, float nValue)
bool autokeyframe_cfra_can_key(const Scene *scene, ID *id)
static bool modify_key_op_poll(bContext *C)
bool ED_autokeyframe_pchan(bContext *C, Scene *scene, Object *ob, bPoseChannel *pchan, KeyingSet *ks)
void ANIM_OT_keyframe_delete_v3d(wmOperatorType *ot)
eInsertKeyFlags ANIM_get_keyframing_flags(Scene *scene, const bool use_autokey_mode)
static bool action_frame_has_keyframe(bAction *act, float frame, short filter)
static bool insert_keyframe_value(ReportList *reports, PointerRNA *ptr, PropertyRNA *prop, FCurve *fcu, const AnimationEvalContext *anim_eval_context, float curval, eBezTriple_KeyframeType keytype, eInsertKeyFlags flag)
static int delete_key_v3d_without_keying_set(bContext *C, wmOperator *op)
int insert_keyframe(Main *bmain, ReportList *reports, ID *id, bAction *act, const char group[], const char rna_path[], int array_index, const AnimationEvalContext *anim_eval_context, eBezTriple_KeyframeType keytype, ListBase *nla_cache, eInsertKeyFlags flag)
void ANIM_OT_keyframe_delete_button(wmOperatorType *ot)
void ANIM_OT_keyframe_delete_by_name(wmOperatorType *ot)
static int delete_key_using_keying_set(bContext *C, wmOperator *op, KeyingSet *ks)
static int delete_key_v3d_exec(bContext *C, wmOperator *op)
FCurve * ED_action_fcurve_find(struct bAction *act, const char rna_path[], const int array_index)
int ANIM_apply_keyingset(bContext *C, ListBase *dsources, bAction *act, KeyingSet *ks, short mode, float cfra)
KeyingSet * ANIM_keyingset_get_from_enum_type(Scene *scene, int type)
void ANIM_keyingset_visit_for_search_no_poll(const bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), const char *UNUSED(edit_text), StringPropertySearchVisitFunc visit_fn, void *visit_user_data)
KeyingSet * ANIM_scene_get_active_keyingset(const Scene *scene)
KeyingSet * ANIM_keyingset_get_from_idname(Scene *scene, const char *idname)
void ANIM_relative_keyingset_add_source(ListBase *dsources, ID *id, StructRNA *srna, void *data)
bool ANIM_keyingset_find_id(KeyingSet *ks, ID *id)
const EnumPropertyItem * ANIM_keying_sets_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
void *(* MEM_malloc_arrayN)(size_t len, size_t size, const char *str)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
T length(const vec_base< T, Size > &a)
SymEdge< T > * prev(const SymEdge< T > *se)
float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_property_array_check(PropertyRNA *prop)
void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *values)
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
const char * RNA_property_identifier(const PropertyRNA *prop)
bool RNA_property_animateable(const PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_boolean_get_array(PointerRNA *ptr, PropertyRNA *prop, bool *values)
PropertyType RNA_property_type(PropertyRNA *prop)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_enum_items_gettexted(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop, char *value)
int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_int_get_array(PointerRNA *ptr, PropertyRNA *prop, int *values)
PropertySubType RNA_property_subtype(PropertyRNA *prop)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
bool RNA_path_resolved_create(PointerRNA *ptr, struct PropertyRNA *prop, const int prop_index, PathResolvedRNA *r_anim_rna)
const char * RNA_property_ui_name(const PropertyRNA *prop)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_string_search_func_runtime(PropertyRNA *prop, StringPropertySearchFunc search_fn, const eStringPropertySearchFlag search_flag)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
char * RNA_path_from_ID_to_property(const PointerRNA *ptr, PropertyRNA *prop)
bool RNA_path_resolve_property(const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop)
const EnumPropertyItem DummyRNA_DEFAULT_items[]
struct RigidBodyOb * rigidbody_object
struct PropertyRNA * prop
struct ToolSettings * toolsettings
struct bConstraint * next
struct bPoseChannel * parent
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
struct wmOperatorType * type
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
const char * WM_operatortype_name(struct wmOperatorType *ot, struct PointerRNA *properties)
int WM_operator_confirm(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))