diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-12-10 13:42:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-12-10 13:42:06 +0300 |
commit | bd2b48e98d77c8437b8b0c77582084a3c984e45c (patch) | |
tree | 0d9eeff42d23943f9e01d2f6dbdb158944aa41d8 /source/blender/editors/animation | |
parent | 63f8d18c0fbc8bce12c65eb6bd49ec28eef703e4 (diff) |
Cleanup: move public doc-strings into headers for various API's
Some doc-strings were skipped because of blank-lines between
the doc-string and the symbol and needed to be moved manually.
- Added space below non doc-string comments to make it clear
these aren't comments for the symbols directly below them.
- Use doxy sections for some headers.
Ref T92709
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/anim_markers.c | 31 | ||||
-rw-r--r-- | source/blender/editors/animation/drivers.c | 43 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframes_edit.c | 34 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframes_general.c | 30 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 67 | ||||
-rw-r--r-- | source/blender/editors/animation/keyingsets.c | 40 |
6 files changed, 4 insertions, 241 deletions
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index e12433f4d4c..baf3eaae8e2 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -99,13 +99,11 @@ static ListBase *context_get_markers(Scene *scene, ScrArea *area) /* ............. */ -/* public API for getting markers from context */ ListBase *ED_context_get_markers(const bContext *C) { return context_get_markers(CTX_data_scene(C), CTX_wm_area(C)); } -/* public API for getting markers from "animation" context */ ListBase *ED_animcontext_get_markers(const bAnimContext *ac) { if (ac) { @@ -116,17 +114,6 @@ ListBase *ED_animcontext_get_markers(const bAnimContext *ac) /* --------------------------------- */ -/** - * Apply some transformation to markers after the fact - * - * \param markers: List of markers to affect - this may or may not be the scene markers list, - * so don't assume anything. - * \param scene: Current scene (for getting current frame) - * \param mode: (TfmMode) transform mode that this transform is for - * \param value: From the transform code, this is `t->vec[0]` - * (which is delta transform for grab/extend, and scale factor for scale) - * \param side: (B/L/R) for 'extend' functionality, which side of current frame to use - */ int ED_markers_post_apply_transform( ListBase *markers, Scene *scene, int mode, float value, char side) { @@ -168,8 +155,6 @@ int ED_markers_post_apply_transform( /* --------------------------------- */ -/* Get the marker that is closest to this point */ -/* XXX for select, the min_dist should be small */ TimeMarker *ED_markers_find_nearest_marker(ListBase *markers, float x) { TimeMarker *marker, *nearest = NULL; @@ -189,7 +174,6 @@ TimeMarker *ED_markers_find_nearest_marker(ListBase *markers, float x) return nearest; } -/* Return the time of the marker that occurs on a frame closest to the given time */ int ED_markers_find_nearest_marker_time(ListBase *markers, float x) { TimeMarker *nearest = ED_markers_find_nearest_marker(markers, x); @@ -323,10 +307,6 @@ static void add_marker_to_cfra_elem(ListBase *lb, TimeMarker *marker, short only cen->sel = marker->flag; } -/* This function makes a list of all the markers. The only_sel - * argument is used to specify whether only the selected markers - * are added. - */ void ED_markers_make_cfra_list(ListBase *markers, ListBase *lb, short only_sel) { TimeMarker *marker; @@ -375,7 +355,6 @@ void ED_markers_deselect_all(ListBase *markers, int action) /* --------------------------------- */ -/* Get the first selected marker */ TimeMarker *ED_markers_get_first_selected(ListBase *markers) { TimeMarker *marker; @@ -393,12 +372,11 @@ TimeMarker *ED_markers_get_first_selected(ListBase *markers) /* --------------------------------- */ -/* Print debugging prints of list of markers - * BSI's: do NOT make static or put in if-defs as "unused code". - * That's too much trouble when we need to use for quick debugging! - */ void debug_markers_print_list(ListBase *markers) { + /* NOTE: do NOT make static or put in if-defs as "unused code". + * That's too much trouble when we need to use for quick debugging! */ + TimeMarker *marker; if (markers == NULL) { @@ -564,7 +542,6 @@ static void get_marker_clip_frame_range(View2D *v2d, float xscale, int r_range[2 r_range[1] = v2d->cur.xmax + font_width_max; } -/* Draw Scene-Markers in time window */ void ED_markers_draw(const bContext *C, int flag) { ListBase *markers = ED_context_get_markers(C); @@ -1699,7 +1676,6 @@ static void MARKER_OT_camera_bind(wmOperatorType *ot) /* ************************** registration **********************************/ -/* called in screen_ops.c:ED_operatortypes_screen() */ void ED_operatortypes_marker(void) { WM_operatortype_append(MARKER_OT_add); @@ -1716,7 +1692,6 @@ void ED_operatortypes_marker(void) #endif } -/* called in screen_ops.c:ED_keymap_screen() */ void ED_keymap_marker(wmKeyConfig *keyconf) { WM_keymap_ensure(keyconf, "Markers", 0, 0); diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index dbf379971fa..f509898f2ee 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -61,9 +61,6 @@ /* ************************************************** */ /* Animation Data Validation */ -/* Get (or add relevant data to be able to do so) F-Curve from the driver stack, - * for the given Animation Data block. This assumes that all the destinations are valid. - */ FCurve *verify_driver_fcurve(ID *id, const char rna_path[], const int array_index, @@ -295,17 +292,6 @@ static int add_driver_with_target(ReportList *UNUSED(reports), return (fcu != NULL); } -/* Main Driver Management API calls: - * Add a new driver for the specified property on the given ID block, - * and make it be driven by the specified target. - * - * This is intended to be used in conjunction with a modal "eyedropper" - * for picking the variable that is going to be used to drive this one. - * - * - flag: eCreateDriverFlags - * - driver_type: eDriver_Types - * - mapping_type: eCreateDriver_MappingTypes - */ int ANIM_add_driver_with_target(ReportList *reports, ID *dst_id, const char dst_path[], @@ -420,10 +406,6 @@ int ANIM_add_driver_with_target(ReportList *reports, /* --------------------------------- */ -/** - * Main Driver Management API calls: - * Add a new driver for the specified property on the given ID block - */ int ANIM_add_driver( ReportList *reports, ID *id, const char rna_path[], int array_index, short flag, int type) { @@ -546,9 +528,6 @@ int ANIM_add_driver( return done_tot; } -/* Main Driver Management API calls: - * Remove the driver for the specified property on the given ID block (if available) - */ bool ANIM_remove_driver(ReportList *UNUSED(reports), ID *id, const char rna_path[], @@ -603,7 +582,6 @@ bool ANIM_remove_driver(ReportList *UNUSED(reports), /* Copy/Paste Buffer for Driver Data... */ static FCurve *channeldriver_copypaste_buf = NULL; -/* This function frees any MEM_calloc'ed copy/paste buffer data */ void ANIM_drivers_copybuf_free(void) { /* free the buffer F-Curve if it exists, as if it were just another F-Curve */ @@ -613,7 +591,6 @@ void ANIM_drivers_copybuf_free(void) channeldriver_copypaste_buf = NULL; } -/* Checks if there is a driver in the copy/paste buffer */ bool ANIM_driver_can_paste(void) { return (channeldriver_copypaste_buf != NULL); @@ -621,9 +598,6 @@ bool ANIM_driver_can_paste(void) /* ------------------- */ -/* Main Driver Management API calls: - * Make a copy of the driver for the specified property on the given ID block - */ bool ANIM_copy_driver( ReportList *reports, ID *id, const char rna_path[], int array_index, short UNUSED(flag)) { @@ -672,10 +646,6 @@ bool ANIM_copy_driver( return 0; } -/* Main Driver Management API calls: - * Add a new driver for the specified property on the given ID block or replace an existing one - * with the driver + driver-curve data from the buffer - */ bool ANIM_paste_driver( ReportList *reports, ID *id, const char rna_path[], int array_index, short UNUSED(flag)) { @@ -733,7 +703,6 @@ bool ANIM_paste_driver( /* Copy/Paste Buffer for Driver Variables... */ static ListBase driver_vars_copybuf = {NULL, NULL}; -/* This function frees any MEM_calloc'ed copy/paste buffer data */ void ANIM_driver_vars_copybuf_free(void) { /* Free the driver variables kept in the buffer */ @@ -750,7 +719,6 @@ void ANIM_driver_vars_copybuf_free(void) BLI_listbase_clear(&driver_vars_copybuf); } -/* Checks if there are driver variables in the copy/paste buffer */ bool ANIM_driver_vars_can_paste(void) { return (BLI_listbase_is_empty(&driver_vars_copybuf) == false); @@ -758,7 +726,6 @@ bool ANIM_driver_vars_can_paste(void) /* -------------------------------------------------- */ -/* Copy the given driver's variables to the buffer */ bool ANIM_driver_vars_copy(ReportList *reports, FCurve *fcu) { /* sanity checks */ @@ -781,7 +748,6 @@ bool ANIM_driver_vars_copy(ReportList *reports, FCurve *fcu) return (BLI_listbase_is_empty(&driver_vars_copybuf) == false); } -/* Paste the variables in the buffer to the given FCurve */ bool ANIM_driver_vars_paste(ReportList *reports, FCurve *fcu, bool replace) { ChannelDriver *driver = (fcu) ? fcu->driver : NULL; @@ -837,8 +803,6 @@ bool ANIM_driver_vars_paste(ReportList *reports, FCurve *fcu, bool replace) /* -------------------------------------------------- */ -/* Create a driver & variable that reads the specified property, - * and store it in the buffers for Paste Driver and Paste Variables. */ void ANIM_copy_as_driver(struct ID *target_id, const char *target_path, const char *var_name) { /* Clear copy/paste buffer first (for consistency with other copy/paste buffers). */ @@ -882,13 +846,8 @@ void ANIM_copy_as_driver(struct ID *target_id, const char *target_path, const ch /* Add Driver - Enum Defines ------------------------- */ -/** - * Mapping Types enum for operators. - * \note Used by #ANIM_OT_driver_button_add and #UI_OT_eyedropper_driver. - * - * XXX: These names need reviewing. - */ EnumPropertyItem prop_driver_create_mapping_types[] = { + /* XXX: These names need reviewing. */ {CREATEDRIVER_MAPPING_1_N, "SINGLE_MANY", 0, diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index 0923d490110..145d67b7810 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -67,10 +67,6 @@ /* --------------------------- Base Functions ------------------------------------ */ -/* This function is used to loop over BezTriples in the given F-Curve, applying a given - * operation on them, and optionally applies an F-Curve validation function afterwards. - */ -/* TODO: make this function work on samples too. */ short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked, FCurve *fcu, KeyframeEditFunc key_ok, @@ -378,7 +374,6 @@ static short summary_keyframes_loop(KeyframeEditData *ked, /* --- */ -/* This function is used to apply operation to all keyframes, regardless of the type */ short ANIM_animchannel_keyframes_loop(KeyframeEditData *ked, bDopeSheet *ads, bAnimListElem *ale, @@ -416,8 +411,6 @@ short ANIM_animchannel_keyframes_loop(KeyframeEditData *ked, return 0; } -/* This function is used to apply operation to all keyframes, - * regardless of the type without needed an AnimListElem wrapper */ short ANIM_animchanneldata_keyframes_loop(KeyframeEditData *ked, bDopeSheet *ads, void *data, @@ -477,8 +470,6 @@ void ANIM_animdata_keyframe_callback(bAnimContext *ac, /* ************************************************************************** */ /* Keyframe Integrity Tools */ -/* Rearrange keyframes if some are out of order */ -/* used to be recalc_*_ipos() where * was object or action */ void ANIM_editkeyframes_refresh(bAnimContext *ac) { ListBase anim_data = {NULL, NULL}; @@ -620,9 +611,6 @@ static short ok_bezier_region(KeyframeEditData *ked, BezTriple *bezt) return 0; } -/** - * Called from #ok_bezier_region_lasso and #ok_bezier_channel_lasso - */ bool keyframe_region_lasso_test(const KeyframeEdit_LassoData *data_lasso, const float xy[2]) { if (BLI_rctf_isect_pt_v(data_lasso->rectf_scaled, xy)) { @@ -683,9 +671,6 @@ static short ok_bezier_channel_lasso(KeyframeEditData *ked, BezTriple *bezt) return 0; } -/** - * Called from #ok_bezier_region_circle and #ok_bezier_channel_circle - */ bool keyframe_region_circle_test(const KeyframeEdit_CircleData *data_circle, const float xy[2]) { if (BLI_rctf_isect_pt_v(data_circle->rectf_scaled, xy)) { @@ -787,10 +772,6 @@ KeyframeEditFunc ANIM_editkeyframes_ok(short mode) /* ******************************************* */ /* Assorted Utility Functions */ -/** - * Helper callback for <animeditor>_cfrasnap_exec() -> - * used to help get the average time of all selected beztriples - */ short bezt_calc_average(KeyframeEditData *ked, BezTriple *bezt) { /* only if selected */ @@ -810,8 +791,6 @@ short bezt_calc_average(KeyframeEditData *ked, BezTriple *bezt) return 0; } -/* helper callback for columnselect_<animeditor>_keys() -> populate - * list CfraElems with frame numbers from selected beztriples */ short bezt_to_cfraelem(KeyframeEditData *ked, BezTriple *bezt) { /* only if selected */ @@ -825,9 +804,6 @@ short bezt_to_cfraelem(KeyframeEditData *ked, BezTriple *bezt) return 0; } -/* used to remap times from one range to another - * requires: ked->data = KeyframeEditCD_Remap - */ void bezt_remap_times(KeyframeEditData *ked, BezTriple *bezt) { KeyframeEditCD_Remap *rmap = (KeyframeEditCD_Remap *)ked->data; @@ -1024,8 +1000,6 @@ static short mirror_bezier_value(KeyframeEditData *ked, BezTriple *bezt) return 0; } -/* NOTE: for markers and 'value', the values to use must be supplied as the first float value. */ -/* calchandles_fcurve */ KeyframeEditFunc ANIM_editkeyframes_mirror(short mode) { switch (mode) { @@ -1183,8 +1157,6 @@ static short set_bezier_free(KeyframeEditData *UNUSED(ked), BezTriple *bezt) return 0; } -/* Set all selected Bezier Handles to a single type */ -/* calchandles_fcurve */ KeyframeEditFunc ANIM_editkeyframes_handles(short mode) { switch (mode) { @@ -1311,8 +1283,6 @@ static short set_bezt_sine(KeyframeEditData *UNUSED(ked), BezTriple *bezt) return 0; } -/* Set the interpolation type of the selected BezTriples in each F-Curve to the specified one */ -/* ANIM_editkeyframes_ipocurve_ipotype() ! */ KeyframeEditFunc ANIM_editkeyframes_ipo(short mode) { switch (mode) { @@ -1391,7 +1361,6 @@ static short set_keytype_moving_hold(KeyframeEditData *UNUSED(ked), BezTriple *b return 0; } -/* Set the interpolation type of the selected BezTriples in each F-Curve to the specified one */ KeyframeEditFunc ANIM_editkeyframes_keytype(short mode) { switch (mode) { @@ -1447,7 +1416,6 @@ static short set_easingtype_easeauto(KeyframeEditData *UNUSED(ked), BezTriple *b return 0; } -/* Set the easing type of the selected BezTriples in each F-Curve to the specified one */ KeyframeEditFunc ANIM_editkeyframes_easing(short mode) { switch (mode) { @@ -1638,7 +1606,6 @@ static short selmap_build_bezier_less(KeyframeEditData *ked, BezTriple *bezt) return 0; } -/* Get callback for building selection map */ KeyframeEditFunc ANIM_editkeyframes_buildselmap(short mode) { switch (mode) { @@ -1653,7 +1620,6 @@ KeyframeEditFunc ANIM_editkeyframes_buildselmap(short mode) /* ----------- */ -/* flush selection map values to the given beztriple */ short bezt_selmap_flush(KeyframeEditData *ked, BezTriple *bezt) { const char *map = ked->data; diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index 03862405e75..dc5d71b5a1e 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -63,11 +63,6 @@ /* **************************************************** */ -/** - * Only delete the nominated keyframe from provided F-Curve. - * Not recommended to be used many times successively. For that - * there is #delete_fcurve_keys(). - */ void delete_fcurve_key(FCurve *fcu, int index, bool do_recalc) { /* sanity check */ @@ -101,7 +96,6 @@ void delete_fcurve_key(FCurve *fcu, int index, bool do_recalc) } } -/* Delete selected keyframes in given F-Curve */ bool delete_fcurve_keys(FCurve *fcu) { bool changed = false; @@ -140,7 +134,6 @@ void clear_fcurve_keys(FCurve *fcu) /* ---------------- */ -/* duplicate selected keyframes for the given F-Curve */ void duplicate_fcurve_keys(FCurve *fcu) { /* this can only work when there is an F-Curve, and also when there are some BezTriples */ @@ -176,10 +169,6 @@ void duplicate_fcurve_keys(FCurve *fcu) /* **************************************************** */ /* Various Tools */ -/** - * Basic F-Curve 'cleanup' function that removes 'double points' and unnecessary keyframes on - * linear-segments only optionally clears up curve if one keyframe with default value remains. - */ void clean_fcurve(struct bAnimContext *ac, bAnimListElem *ale, float thresh, bool cleardefault) { FCurve *fcu = (FCurve *)ale->key_data; @@ -429,13 +418,6 @@ static void decimate_fcurve_segment(FCurve *fcu, target_fcurve_verts); } -/** - * F-Curve 'decimate' function that removes a certain ratio of curve - * points that will affect the curves overall shape the least. - * If you want to remove based on a error margin, set remove_ratio to 1 and - * simply specify the desired error_sq_max. Otherwise, set the error margin to - * FLT_MAX. - */ bool decimate_fcurve(bAnimListElem *ale, float remove_ratio, float error_sq_max) { FCurve *fcu = (FCurve *)ale->key_data; @@ -495,8 +477,6 @@ typedef struct tSmooth_Bezt { float y1, y2, y3; /* averaged before/new/after y-values */ } tSmooth_Bezt; -/* Use a weighted moving-means method to reduce intensity of fluctuations */ -/* TODO: introduce scaling factor for weighting falloff */ void smooth_fcurve(FCurve *fcu) { int totSel = 0; @@ -600,7 +580,6 @@ typedef struct TempFrameValCache { float frame, val; } TempFrameValCache; -/* Evaluates the curves between each selected keyframe on each frame, and keys the value. */ void sample_fcurve(FCurve *fcu) { BezTriple *bezt, *start = NULL, *end = NULL; @@ -709,7 +688,6 @@ typedef struct tAnimCopybufItem { bool is_bone; /* special flag for armature bones */ } tAnimCopybufItem; -/* This function frees any MEM_calloc'ed copy/paste buffer data */ void ANIM_fcurves_copybuf_free(void) { tAnimCopybufItem *aci, *acn; @@ -740,7 +718,6 @@ void ANIM_fcurves_copybuf_free(void) /* ------------------- */ -/* This function adds data to the keyframes copy/paste buffer, freeing existing data first */ short copy_animedit_keys(bAnimContext *ac, ListBase *anim_data) { bAnimListElem *ale; @@ -1099,8 +1076,6 @@ static void paste_animedit_keys_fcurve( calchandles_fcurve(fcu); } -/* ------------------- */ - const EnumPropertyItem rna_enum_keyframe_paste_offset_items[] = { {KEYFRAME_PASTE_OFFSET_CFRA_START, "START", @@ -1133,11 +1108,6 @@ const EnumPropertyItem rna_enum_keyframe_paste_merge_items[] = { {0, NULL, 0, NULL, NULL}, }; -/** - * This function pastes data from the keyframes copy/paste buffer - * - * \return Status code is whether the method FAILED to do anything - */ short paste_animedit_keys(bAnimContext *ac, ListBase *anim_data, const eKeyPasteOffset offset_mode, diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 95d1ca1e7a6..25d2f6c510b 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -91,7 +91,6 @@ static int delete_key_using_keying_set(bContext *C, wmOperator *op, KeyingSet *k /* ************************************************** */ /* Keyframing Setting Wrangling */ -/* Get the active settings for keyframing settings from context (specifically the given scene) */ eInsertKeyFlags ANIM_get_keyframing_flags(Scene *scene, const bool use_autokey_mode) { eInsertKeyFlags flag = INSERTKEY_NOFLAGS; @@ -133,9 +132,6 @@ eInsertKeyFlags ANIM_get_keyframing_flags(Scene *scene, const bool use_autokey_m /* ******************************************* */ /* Animation Data Validation */ -/* Get (or add relevant data to be able to do so) the Active Action for the given - * Animation Data block, given an ID block where the Animation Data should reside. - */ bAction *ED_id_action_ensure(Main *bmain, ID *id) { AnimData *adt; @@ -177,10 +173,6 @@ bAction *ED_id_action_ensure(Main *bmain, ID *id) return adt->action; } -/** - * Find the F-Curve from the Active Action, - * for the given Animation Data block. This assumes that all the destinations are valid. - */ FCurve *ED_action_fcurve_find(struct bAction *act, const char rna_path[], const int array_index) { /* Sanity checks. */ @@ -190,10 +182,6 @@ FCurve *ED_action_fcurve_find(struct bAction *act, const char rna_path[], const return BKE_fcurve_find(&act->curves, rna_path, array_index); } -/** - * Get (or add relevant data to be able to do so) F-Curve from the Active Action, - * for the given Animation Data block. This assumes that all the destinations are valid. - */ FCurve *ED_action_fcurve_ensure(struct Main *bmain, struct bAction *act, const char group[], @@ -295,9 +283,6 @@ static void update_autoflags_fcurve_direct(FCurve *fcu, PropertyRNA *prop) } } -/* Update integer/discrete flags of the FCurve (used when creating/inserting keyframes, - * but also through RNA when editing an ID prop, see T37103). - */ void update_autoflags_fcurve(FCurve *fcu, bContext *C, ReportList *reports, PointerRNA *ptr) { PointerRNA tmp_ptr; @@ -433,13 +418,6 @@ static void replace_bezt_keyframe_ypos(BezTriple *dst, const BezTriple *bezt) /* TODO: perform some other operations? */ } -/* This function adds a given BezTriple to an F-Curve. It will allocate - * memory for the array if needed, and will insert the BezTriple into a - * suitable place in chronological order. - * - * NOTE: any recalculate of the F-Curve that needs to be done will need to - * be done by the caller. - */ int insert_bezt_fcurve(FCurve *fcu, const BezTriple *bezt, eInsertKeyFlags flag) { int i = 0; @@ -575,15 +553,6 @@ static void subdivide_nonauto_handles(const FCurve *fcu, bezt->h1 = bezt->h2 = HD_ALIGN; } -/** - * This function is a wrapper for #insert_bezt_fcurve(), and should be used when - * adding a new keyframe to a curve, when the keyframe doesn't exist anywhere else yet. - * It returns the index at which the keyframe was added. - * - * \param keyframe_type: The type of keyframe (#eBezTriple_KeyframeType). - * \param flag: Optional flags (eInsertKeyFlags) for controlling how keys get added - * and/or whether updates get done. - */ int insert_vert_fcurve( FCurve *fcu, float x, float y, eBezTriple_KeyframeType keyframe_type, eInsertKeyFlags flag) { @@ -1273,19 +1242,6 @@ static bool insert_keyframe_value(ReportList *reports, return insert_vert_fcurve(fcu, cfra, curval, keytype, flag) >= 0; } -/* Secondary Keyframing API call: - * Use this when validation of necessary animation data is not necessary, - * since an RNA-pointer to the necessary data being keyframed, - * and a pointer to the F-Curve to use have both been provided. - * - * This function can't keyframe quaternion channels on some NLA strip types. - * - * keytype is the "keyframe type" (eBezTriple_KeyframeType), as shown in the Dope Sheet. - * - * The flag argument is used for special settings that alter the behavior of - * the keyframe insertion. These include the 'visual' keyframing modes, quick refresh, - * and extra keyframe filtering. - */ bool insert_keyframe_direct(ReportList *reports, PointerRNA ptr, PropertyRNA *prop, @@ -1453,19 +1409,6 @@ static AnimationEvalContext nla_time_remap(const AnimationEvalContext *anim_eval return *anim_eval_context; } -/** - * Main Keyframing API call - * - * Use this when validation of necessary animation data is necessary, since it may not exist yet. - * - * The flag argument is used for special settings that alter the behavior of - * the keyframe insertion. These include the 'visual' keyframing modes, quick refresh, - * and extra keyframe filtering. - * - * index of -1 keys all array indices - * - * \return The number of key-frames inserted. - */ int insert_keyframe(Main *bmain, ReportList *reports, ID *id, @@ -1692,9 +1635,6 @@ static void deg_tag_after_keyframe_delete(Main *bmain, ID *id, AnimData *adt) } } -/** - * \return The number of key-frames deleted. - */ int delete_keyframe(Main *bmain, ReportList *reports, ID *id, @@ -2016,7 +1956,6 @@ void ANIM_OT_keyframe_insert(wmOperatorType *ot) ot->prop = prop; } -/* Clone of 'ANIM_OT_keyframe_insert' which uses a name for the keying set instead of an enum. */ void ANIM_OT_keyframe_insert_by_name(wmOperatorType *ot) { PropertyRNA *prop; @@ -2811,7 +2750,6 @@ bool autokeyframe_cfra_can_key(const Scene *scene, ID *id) /* --------------- API/Per-Datablock Handling ------------------- */ -/* Checks if some F-Curve has a keyframe for a given frame */ bool fcurve_frame_has_keyframe(const FCurve *fcu, float frame, short filter) { /* quick sanity check */ @@ -2838,7 +2776,6 @@ bool fcurve_frame_has_keyframe(const FCurve *fcu, float frame, short filter) return false; } -/* Returns whether the current value of a given property differs from the interpolated value. */ bool fcurve_is_changed(PointerRNA ptr, PropertyRNA *prop, FCurve *fcu, @@ -2967,7 +2904,6 @@ static bool object_frame_has_keyframe(Object *ob, float frame, short filter) /* --------------- API ------------------- */ -/* Checks whether a keyframe exists for the given ID-block one the given frame */ bool id_frame_has_keyframe(ID *id, float frame, short filter) { /* sanity checks */ @@ -3043,9 +2979,6 @@ bool ED_autokeyframe_pchan( return false; } -/** - * Use for auto-keyframing from the UI. - */ bool ED_autokeyframe_property( bContext *C, Scene *scene, PointerRNA *ptr, PropertyRNA *prop, int rnaindex, float cfra) { diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index e1fd3b07f46..59bb60d8fa0 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -529,12 +529,10 @@ void ANIM_OT_keying_set_active_set(wmOperatorType *ot) /* Keying Set Type Info declarations */ static ListBase keyingset_type_infos = {NULL, NULL}; -/* Built-In Keying Sets (referencing type information). */ ListBase builtin_keyingsets = {NULL, NULL}; /* --------------- */ -/* Find KeyingSet type info given a name. */ KeyingSetInfo *ANIM_keyingset_info_find_name(const char name[]) { /* sanity checks */ @@ -546,7 +544,6 @@ KeyingSetInfo *ANIM_keyingset_info_find_name(const char name[]) return BLI_findstring(&keyingset_type_infos, name, offsetof(KeyingSetInfo, idname)); } -/* Find builtin KeyingSet by name. */ KeyingSet *ANIM_builtin_keyingset_get_named(KeyingSet *prevKS, const char name[]) { KeyingSet *ks, *first = NULL; @@ -582,8 +579,6 @@ KeyingSet *ANIM_builtin_keyingset_get_named(KeyingSet *prevKS, const char name[] /* --------------- */ -/* Add the given KeyingSetInfo to the list of type infos, - * and create an appropriate builtin set too. */ void ANIM_keyingset_info_register(KeyingSetInfo *ksi) { KeyingSet *ks; @@ -603,8 +598,6 @@ void ANIM_keyingset_info_register(KeyingSetInfo *ksi) BLI_addtail(&keyingset_type_infos, ksi); } -/* Remove the given KeyingSetInfo from the list of type infos, - * and also remove the builtin set if appropriate. */ void ANIM_keyingset_info_unregister(Main *bmain, KeyingSetInfo *ksi) { KeyingSet *ks, *ksn; @@ -633,8 +626,6 @@ void ANIM_keyingset_info_unregister(Main *bmain, KeyingSetInfo *ksi) BLI_freelinkN(&keyingset_type_infos, ksi); } -/* --------------- */ - void ANIM_keyingset_infos_exit(void) { KeyingSetInfo *ksi, *next; @@ -654,7 +645,6 @@ void ANIM_keyingset_infos_exit(void) BKE_keyingsets_free(&builtin_keyingsets); } -/* Check if the ID appears in the paths specified by the KeyingSet */ bool ANIM_keyingset_find_id(KeyingSet *ks, ID *id) { /* sanity checks */ @@ -670,7 +660,6 @@ bool ANIM_keyingset_find_id(KeyingSet *ks, ID *id) /* Getters for Active/Indices ----------------------------- */ -/* Get the active Keying Set for the Scene provided */ KeyingSet *ANIM_scene_get_active_keyingset(const Scene *scene) { /* if no scene, we've got no hope of finding the Keying Set */ @@ -689,7 +678,6 @@ KeyingSet *ANIM_scene_get_active_keyingset(const Scene *scene) return BLI_findlink(&builtin_keyingsets, (-scene->active_keyingset) - 1); } -/* Get the index of the Keying Set provided, for the given Scene */ int ANIM_scene_get_keyingset_index(Scene *scene, KeyingSet *ks) { int index; @@ -721,7 +709,6 @@ int ANIM_scene_get_keyingset_index(Scene *scene, KeyingSet *ks) return 0; } -/* Get Keying Set to use for Auto-Keyframing some transforms */ KeyingSet *ANIM_get_keyingset_for_autokeying(const Scene *scene, const char *transformKSName) { /* get KeyingSet to use @@ -739,7 +726,6 @@ KeyingSet *ANIM_get_keyingset_for_autokeying(const Scene *scene, const char *tra /* Menu of All Keying Sets ----------------------------- */ -/* Dynamically populate an enum of Keying Sets */ const EnumPropertyItem *ANIM_keying_sets_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), @@ -808,14 +794,6 @@ const EnumPropertyItem *ANIM_keying_sets_enum_itemf(bContext *C, return item; } -/** - * Get the keying set from enum values generated in #ANIM_keying_sets_enum_itemf. - * - * Type is the Keying Set the user specified to use when calling the operator: - * - type == 0: use scene's active Keying Set - * - type > 0: use a user-defined Keying Set from the active scene - * - type < 0: use a builtin Keying Set - */ KeyingSet *ANIM_keyingset_get_from_enum_type(Scene *scene, int type) { KeyingSet *ks = NULL; @@ -847,7 +825,6 @@ KeyingSet *ANIM_keyingset_get_from_idname(Scene *scene, const char *idname) /* Polling API ----------------------------------------------- */ -/* Check if KeyingSet can be used in the current context */ bool ANIM_keyingset_context_ok_poll(bContext *C, KeyingSet *ks) { if ((ks->flag & KEYINGSET_ABSOLUTE) == 0) { @@ -894,7 +871,6 @@ static void RKS_ITER_overrides_list(KeyingSetInfo *ksi, } } -/* Add new data source for relative Keying Sets */ void ANIM_relative_keyingset_add_source(ListBase *dsources, ID *id, StructRNA *srna, void *data) { tRKS_DSource *ds; @@ -925,14 +901,6 @@ void ANIM_relative_keyingset_add_source(ListBase *dsources, ID *id, StructRNA *s /* KeyingSet Operations (Insert/Delete Keyframes) ------------ */ -/** - * Given a KeyingSet and context info, validate Keying Set's paths. - * This is only really necessary with relative/built-in KeyingSets - * where their list of paths is dynamically generated based on the - * current context info. - * - * Returns 0 if succeeded, otherwise an error code: eModifyKey_Returns - */ eModifyKey_Returns ANIM_validate_keyingset(bContext *C, ListBase *dsources, KeyingSet *ks) { /* sanity check */ @@ -1017,14 +985,6 @@ static eInsertKeyFlags keyingset_apply_keying_flags(const eInsertKeyFlags base_f return result; } -/** - * Given a KeyingSet and context info (if required), - * modify keyframes for the channels specified by the KeyingSet. - * This takes into account many of the different combinations of using KeyingSets. - * - * \returns the number of channels that key-frames were added or - * an #eModifyKey_Returns value (always a negative number). - */ int ANIM_apply_keyingset( bContext *C, ListBase *dsources, bAction *act, KeyingSet *ks, short mode, float cfra) { |