diff options
Diffstat (limited to 'source/blender/editors/include/ED_keyframing.h')
-rw-r--r-- | source/blender/editors/include/ED_keyframing.h | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index fbb469f8d43..3b3d0157362 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -1,5 +1,5 @@ /** - * $Id: BIF_keyframing.h 17216 2008-10-29 11:20:02Z aligorith $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -30,6 +30,7 @@ struct ListBase; struct ID; +struct Scene; struct KeyingSet; @@ -43,6 +44,9 @@ struct bConstraint; struct bContext; struct wmOperatorType; +struct PointerRNA; +struct PropertyRNA; + /* ************ Keyframing Management **************** */ /* Get (or add relevant data to be able to do so) the Active Action for the given @@ -71,6 +75,16 @@ void insert_vert_fcurve(struct FCurve *fcu, float x, float y, short flag); /* -------- */ +/* Secondary Keyframing API calls: + * Use this to insert a keyframe using the current value being keyframed, in the + * nominated F-Curve (no creation of animation data performed). Returns success. + */ +short insert_keyframe_direct(struct PointerRNA ptr, struct PropertyRNA *prop, struct FCurve *fcu, float cfra, short flag); + + + +/* -------- */ + /* Main Keyframing API calls: * Use this to create any necessary animation data, and then insert a keyframe * using the current value being keyframed, in the relevant place. Returns success. @@ -155,7 +169,7 @@ void ANIM_OT_keyingset_add_destination(struct wmOperatorType *ot); /* Main Driver Management API calls: * Add a new driver for the specified property on the given ID block */ -short ANIM_add_driver (struct ID *id, const char rna_path[], int array_index, short flag); +short ANIM_add_driver (struct ID *id, const char rna_path[], int array_index, short flag, int type); /* Main Driver Management API calls: * Remove the driver for the specified property on the given ID block (if available) @@ -178,14 +192,22 @@ void ANIM_OT_remove_driver_button(struct wmOperatorType *ot); /* Auto-Keying macros for use by various tools */ /* check if auto-keyframing is enabled (per scene takes presidence) */ -#define IS_AUTOKEY_ON(scene) ((scene) ? (scene->autokey_mode & AUTOKEY_ON) : (U.autokey_mode & AUTOKEY_ON)) +#define IS_AUTOKEY_ON(scene) ((scene) ? (scene->toolsettings->autokey_mode & AUTOKEY_ON) : (U.autokey_mode & AUTOKEY_ON)) /* check the mode for auto-keyframing (per scene takes presidence) */ -#define IS_AUTOKEY_MODE(scene, mode) ((scene) ? (scene->autokey_mode == AUTOKEY_MODE_##mode) : (U.autokey_mode == AUTOKEY_MODE_##mode)) +#define IS_AUTOKEY_MODE(scene, mode) ((scene) ? (scene->toolsettings->autokey_mode == AUTOKEY_MODE_##mode) : (U.autokey_mode == AUTOKEY_MODE_##mode)) /* check if a flag is set for auto-keyframing (as userprefs only!) */ #define IS_AUTOKEY_FLAG(flag) (U.autokey_flag & AUTOKEY_FLAG_##flag) +/* auto-keyframing feature - checks for whether anything should be done for the current frame */ +int autokeyframe_cfra_can_key(struct Scene *scene, struct ID *id); + /* ************ Keyframe Checking ******************** */ +/* Lesser Keyframe Checking API call: + * - Used for the buttons to check for keyframes... + */ +short fcurve_frame_has_keyframe(struct FCurve *fcu, float frame, short filter); + /* Main Keyframe Checking API call: * Checks whether a keyframe exists for the given ID-block one the given frame. * - It is recommended to call this method over the other keyframe-checkers directly, |