46 "Only insert keyframes where they're needed in the relevant F-Curves"},
51 "Insert keyframes based on 'visual transforms'"},
53 "INSERTKEY_XYZ_TO_RGB",
56 "Color for newly added transformation F-Curves (Location, Rotation, Scale) "
57 "and also Color is based on the transform axis"},
67 "Only insert keyframes where they're needed in the relevant F-Curves"},
72 "Insert keyframes based on 'visual transforms'"},
74 "INSERTKEY_XYZ_TO_RGB",
77 "Color for newly added transformation F-Curves (Location, Rotation, Scale) "
78 "and also Color is based on the transform axis"},
83 "Only replace existing keyframes"},
85 "INSERTKEY_AVAILABLE",
88 "Don't create F-Curves when they don't already exist"},
90 "INSERTKEY_CYCLE_AWARE",
93 "When inserting into a curve with cyclic extrapolation, remap the keyframe inside "
94 "the cycle time range, and if changing an end key, also update the other one"},
127 rna_AnimData_update(bmain,
scene,
ptr);
146 static void rna_AnimData_tweakmode_set(
PointerRNA *
ptr,
const bool value)
177 func = &rna_KeyingSetInfo_poll_func;
200 extern FunctionRNA rna_KeyingSetInfo_iterator_func;
207 func = &rna_KeyingSetInfo_iterator_func;
225 extern FunctionRNA rna_KeyingSetInfo_generate_func;
232 func = &rna_KeyingSetInfo_generate_func;
279 const char *identifier,
287 int have_function[3];
295 if (validate(&dummyptr,
data, have_function) != 0) {
299 if (strlen(identifier) >=
sizeof(dummyksi.
idname)) {
302 "Registering keying set info class: '%s' is too long, maximum length is %d",
304 (
int)
sizeof(dummyksi.
idname));
311 rna_KeyingSetInfo_unregister(bmain, ksi->
rna_ext.
srna);
327 ksi->
poll = (have_function[0]) ? RKS_POLL_rna_internal :
NULL;
328 ksi->
iter = (have_function[1]) ? RKS_ITER_rna_internal :
NULL;
329 ksi->
generate = (have_function[2]) ? RKS_GEN_rna_internal :
NULL;
354 static void rna_ksPath_id_type_set(
PointerRNA *
ptr,
int value)
359 data->idtype = value;
365 static void rna_ksPath_RnaPath_get(
PointerRNA *
ptr,
char *value)
389 static void rna_ksPath_RnaPath_set(
PointerRNA *
ptr,
const char *value)
407 static void rna_KeyingSet_name_set(
PointerRNA *
ptr,
const char *value)
443 static int rna_KeyingSet_active_ksPath_editable(
PointerRNA *
ptr,
const char **
UNUSED(r_info))
467 static int rna_KeyingSet_active_ksPath_index_get(
PointerRNA *
ptr)
473 static void rna_KeyingSet_active_ksPath_index_set(
PointerRNA *
ptr,
int value)
479 static void rna_KeyingSet_active_ksPath_index_range(
503 const char rna_path[],
506 const char group_name[])
531 static void rna_KeyingSet_paths_remove(
KeyingSet *keyingset,
538 if ((keyingset && ksp) ==
false) {
560 for (ksp = keyingset->
paths.
first; ksp; ksp = kspn) {
586 static void rna_NlaTrack_remove(
638 static FCurve *rna_Driver_new(
641 if (rna_path[0] ==
'\0') {
671 const char *data_path,
674 if (data_path[0] ==
'\0') {
692 const int len_storage,
698 BLI_assert(len_dst == len_src && (!ptr_storage || len_dst == len_storage) && len_dst == 0);
700 "Unsupported RNA override operation on animdata pointer");
707 if (adt_dst ==
NULL && adt_src !=
NULL) {
713 else if (adt_dst !=
NULL && adt_src ==
NULL) {
723 bool rna_NLA_tracks_override_apply(
Main *bmain,
730 const int UNUSED(len_dst),
731 const int UNUSED(len_src),
732 const int UNUSED(len_storage),
739 "Unsupported RNA override operation on constraints collection");
765 if (nla_track_src ==
NULL) {
792 "Override Insert Keyframes Default- Only Needed",
793 "Override default setting to only insert keyframes where they're "
794 "needed in the relevant F-Curves");
803 "Override Insert Keyframes Default - Visual",
804 "Override default setting to insert keyframes based on 'visual transforms'");
813 "Override F-Curve Colors - XYZ to RGB",
814 "Override default setting to set color for newly added transformation F-Curves "
815 "(Location, Rotation, Scale) to be based on the transform axis");
824 "Insert Keyframes - Only Needed",
825 "Only insert keyframes where they're needed in the relevant F-Curves");
833 prop,
"Insert Keyframes - Visual",
"Insert keyframes based on 'visual transforms'");
841 "F-Curve Colors - XYZ to RGB",
842 "Color for newly added transformation F-Curves (Location, Rotation, "
843 "Scale) is based on the transform axis");
852 # define KEYINGSET_IDNAME_DOC \
853 "If this is set, the Keying Set gets a custom ID, otherwise it takes " \
854 "the name of the class used to define the Keying Set (for example, " \
855 "if the class name is \"BUILTIN_KSI_location\", and bl_idname is not " \
856 "set by the script, then bl_idname = \"BUILTIN_KSI_location\")"
868 srna,
"Keying Set Info",
"Callback function defines for builtin Keying Sets");
871 srna,
"rna_KeyingSetInfo_register",
"rna_KeyingSetInfo_unregister",
NULL);
923 func,
"Call generate() on the structs which have properties to be keyframed");
933 func,
"Add Paths to the Keying Set to keyframe the properties of the given data");
960 "ID-Block that keyframes for Keying Set should be added to "
961 "(for Absolute Keying Sets only)");
978 prop,
"Group Name",
"Name of Action Group to assign setting(s) for this path to");
987 prop,
"Grouping Method",
"Method used to define which Group-name to use");
994 prop,
"rna_ksPath_RnaPath_get",
"rna_ksPath_RnaPath_length",
"rna_ksPath_RnaPath_set");
1011 "When an 'array/vector' type is chosen (Location, Rotation, Color, etc.), "
1012 "entire array is to be used");
1041 func,
"ksp",
"KeyingSetPath",
"New Path",
"Path created and added to the Keying Set");
1045 func,
"target_id",
"ID",
"Target ID",
"ID data-block for the destination");
1050 func,
"data_path",
NULL, 256,
"Data-Path",
"RNA-Path to destination property");
1059 "The index of the destination property (i.e. axis of Location/Rotation/etc.), "
1060 "or -1 for the entire array",
1069 "Method used to define which Group-name to use");
1076 "Name of Action Group to assign destination to (only if grouping mode is to use this name)");
1097 prop,
"rna_KeyingSet_active_ksPath_get",
"rna_KeyingSet_active_ksPath_set",
NULL,
NULL);
1099 prop,
"Active Keying Set",
"Active Keying Set used to insert/delete keyframes");
1104 "rna_KeyingSet_active_ksPath_index_get",
1105 "rna_KeyingSet_active_ksPath_index_set",
1106 "rna_KeyingSet_active_ksPath_index_range");
1146 prop,
"Type Info",
"Callback function defines for built-in Keying Sets");
1153 prop,
"Paths",
"Keying Set Paths to define settings that get keyframed together");
1162 "Keying Set defines specific paths/settings to be keyframed "
1163 "(i.e. is not reliant on context info)");
1172 # undef KEYINGSET_IDNAME_DOC
1191 RNA_def_pointer(func,
"prev",
"NlaTrack",
"",
"NLA Track to add the new one after");
1193 parm =
RNA_def_pointer(func,
"track",
"NlaTrack",
"",
"New NLA Track");
1200 parm =
RNA_def_pointer(func,
"track",
"NlaTrack",
"",
"NLA Track to remove");
1207 prop,
"rna_NlaTrack_active_get",
"rna_NlaTrack_active_set",
NULL,
NULL);
1232 parm =
RNA_def_string(func,
"data_path",
NULL, 0,
"Data Path",
"F-Curve data path to use");
1234 RNA_def_int(func,
"index", 0, 0, INT_MAX,
"Index",
"Array index", 0, INT_MAX);
1236 parm =
RNA_def_pointer(func,
"driver",
"FCurve",
"",
"Newly Driver F-Curve");
1246 func =
RNA_def_function(srna,
"from_existing",
"rna_Driver_from_existing");
1253 "Existing Driver F-Curve to use as template for a new one");
1255 parm =
RNA_def_pointer(func,
"driver",
"FCurve",
"",
"New Driver F-Curve");
1262 "Find a driver F-Curve. Note that this function performs a linear scan "
1263 "of all driver F-Curves.");
1267 RNA_def_int(func,
"index", 0, 0, INT_MAX,
"Index",
"Array index", 0, INT_MAX);
1270 func,
"fcurve",
"FCurve",
"",
"The found F-Curve, or None if it doesn't exist");
1314 prop,
NULL,
"rna_AnimData_action_set",
NULL,
"rna_Action_id_poll");
1325 "Action Extrapolation",
1326 "Action to take for gaps past the Active Action's range (when evaluating with NLA)");
1335 "Method used for combining Active Action's result with result of NLA stack");
1344 "Amount the Active Action contributes to the result of the NLA stack");
1363 prop,
"NLA Evaluation Enabled",
"NLA stack is evaluated when evaluating this block");
1370 prop,
"Use NLA Tweak Mode",
"Whether to enable or disable tweak mode in NLA");
void BKE_animdata_free(struct ID *id, bool do_id_user)
bool BKE_animdata_action_editable(const struct AnimData *adt)
bool BKE_animdata_set_action(struct ReportList *reports, struct ID *id, struct bAction *act)
bool BKE_animdata_copy_id(struct Main *bmain, struct ID *id_to, struct ID *id_from, int flag)
struct AnimData * BKE_animdata_from_id(const struct ID *id)
struct KS_Path * BKE_keyingset_add_path(struct KeyingSet *ks, struct ID *id, const char group_name[], const char rna_path[], int array_index, short flag, short groupmode)
void BKE_keyingset_free_path(struct KeyingSet *ks, struct KS_Path *ksp)
struct ReportList * CTX_wm_reports(const bContext *C)
void BKE_fcurve_free(struct FCurve *fcu)
struct FCurve * BKE_fcurve_copy(const struct FCurve *fcu)
struct FCurve * BKE_fcurve_find(ListBase *list, const char rna_path[], int array_index)
struct NlaTrack * BKE_nlatrack_copy(struct Main *bmain, struct NlaTrack *nlt, bool use_same_actions, int flag)
bool BKE_nla_tweakmode_enter(struct AnimData *adt)
struct NlaTrack * BKE_nlatrack_add(struct AnimData *adt, struct NlaTrack *prev, bool is_liboverride)
void BKE_nla_tweakmode_exit(struct AnimData *adt)
struct NlaTrack * BKE_nlatrack_find_active(ListBase *tracks)
void BKE_nlatrack_set_active(ListBase *tracks, struct NlaTrack *nlt)
void BKE_nlatrack_free(ListBase *tracks, struct NlaTrack *nlt, bool do_id_user)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
void BLI_kdtree_nd_() free(KDTree *tree)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
bool BLI_remlink_safe(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_addtail(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_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int max_ii(int a, int b)
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
#define UNUSED_VARS_NDEBUG(...)
#define BLT_I18NCONTEXT_ID_ID
void DEG_id_tag_update_ex(struct Main *bmain, struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
@ ID_RECALC_COPY_ON_WRITE
@ IDOVERRIDE_LIBRARY_OP_INSERT_AFTER
@ IDOVERRIDE_LIBRARY_OP_REPLACE
#define ID_IS_OVERRIDE_LIBRARY(_id)
@ ADT_CURVES_ALWAYS_VISIBLE
Object is a sort of wrapper for general info.
@ DRIVER_FCURVE_KEYFRAMES
_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 RNA_POINTER_INVALIDATE(ptr)
StructRNA * ID_code_to_RNA_type(short idcode)
#define RNA_DYN_DESCR_MAX
void(* StructFreeFunc)(void *data)
int(* StructValidateFunc)(struct PointerRNA *ptr, void *data, int *have_function)
int(* StructCallbackFunc)(struct bContext *C, struct PointerRNA *ptr, struct FunctionRNA *func, ParameterList *list)
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
@ PROPOVERRIDE_LIBRARY_INSERTION
@ PROPOVERRIDE_NO_PROP_NAME
void ANIM_id_update(Main *bmain, ID *id)
return(oflags[bm->toolflag_index].f &oflag) !=0
FCurve * verify_driver_fcurve(ID *id, const char rna_path[], const int array_index, eDriverFCurveCreationMode creation_mode)
KeyingSetInfo * ANIM_keyingset_info_find_name(const char name[])
void ANIM_keyingset_info_unregister(Main *bmain, KeyingSetInfo *ksi)
void ANIM_keyingset_info_register(KeyingSetInfo *ksi)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
const EnumPropertyItem rna_enum_id_type_items[]
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
void RNA_parameter_get_lookup(ParameterList *parms, const char *identifier, void **value)
void RNA_struct_blender_type_set(StructRNA *srna, void *blender_type)
ParameterList * RNA_parameter_list_create(ParameterList *parms, PointerRNA *UNUSED(ptr), FunctionRNA *func)
void * RNA_struct_blender_type_get(StructRNA *srna)
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_parameter_list_free(ParameterList *parms)
void RNA_property_update_main(Main *bmain, Scene *scene, PointerRNA *ptr, PropertyRNA *prop)
void RNA_parameter_set_lookup(ParameterList *parms, const char *identifier, const void *value)
PointerRNA rna_pointer_inherit_refine(PointerRNA *ptr, StructRNA *type, void *data)
static void rna_def_common_keying_flags(StructRNA *srna, short reg)
void RNA_def_animation(BlenderRNA *brna)
static void rna_api_animdata_nla_tracks(BlenderRNA *brna, PropertyRNA *cprop)
const EnumPropertyItem rna_enum_keying_flag_items_api[]
static void rna_def_animdata(BlenderRNA *brna)
static void rna_def_keyingset_paths(BlenderRNA *brna, PropertyRNA *cprop)
const EnumPropertyItem rna_enum_keying_flag_items[]
#define KEYINGSET_IDNAME_DOC
const EnumPropertyItem rna_enum_keyingset_path_grouping_items[]
static void rna_api_animdata_drivers(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_keyingset_path(BlenderRNA *brna)
static void rna_def_keyingset(BlenderRNA *brna)
void rna_def_animdata_common(StructRNA *srna)
static void rna_def_keyingset_info(BlenderRNA *brna)
void RNA_api_keyingset(StructRNA *srna)
void RNA_api_animdata(StructRNA *srna)
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_define_lib_overridable(const bool make_overridable)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void RNA_def_property_float_default(PropertyRNA *prop, float value)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
void RNA_def_property_enum_default(PropertyRNA *prop, int value)
void RNA_define_verify_sdna(bool verify)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void RNA_def_struct_register_funcs(StructRNA *srna, const char *reg, const char *unreg, const char *instance)
StructRNA * RNA_def_struct_ptr(BlenderRNA *brna, const char *identifier, StructRNA *srnafrom)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_struct_name_property(struct StructRNA *srna, struct PropertyRNA *prop)
void RNA_def_function_flag(FunctionRNA *func, int flag)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_struct_free_extension(StructRNA *srna, ExtensionRNA *rna_ext)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
void RNA_struct_free(BlenderRNA *brna, StructRNA *srna)
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_override_funcs(PropertyRNA *prop, const char *diff, const char *store, const char *apply)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
bool rna_AnimaData_override_apply(struct Main *bmain, struct PointerRNA *ptr_local, struct PointerRNA *ptr_reference, struct PointerRNA *ptr_storage, struct PropertyRNA *prop_local, struct PropertyRNA *prop_reference, struct PropertyRNA *prop_storage, int len_local, int len_reference, int len_storage, struct PointerRNA *ptr_item_local, struct PointerRNA *ptr_item_reference, struct PointerRNA *ptr_item_storage, struct IDOverrideLibraryPropertyOperation *opop)
const EnumPropertyItem rna_enum_nla_mode_blend_items[]
const EnumPropertyItem rna_enum_nla_mode_extend_items[]
int subitem_reference_index
struct ExtensionRNA rna_ext
cbKeyingSet_Generate generate
cbKeyingSet_Iterator iter
struct bActionGroup * next
void WM_main_add_notifier(unsigned int type, void *reference)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)