diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-12-08 16:55:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-12-08 17:14:10 +0300 |
commit | 61776befc3f88c373e47ccbdf8c75e2ca0f4e987 (patch) | |
tree | 0214b7c5146300d41b7bcbe99f87c92599608e7f /source/blender/editors/animation | |
parent | 8f1997975dc60bc1c18992458603ecd58dfded6d (diff) |
Cleanup: move public doc-strings into headers for 'editors'
Ref T92709
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/anim_channels_defines.c | 12 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_channels_edit.c | 18 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_deps.c | 6 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_draw.c | 22 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 18 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_ipo_utils.c | 8 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_motion_paths.c | 14 | ||||
-rw-r--r-- | source/blender/editors/animation/fmodifier_ui.c | 11 |
8 files changed, 6 insertions, 103 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 8e0452de8ea..2eaa42ee578 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -4158,7 +4158,6 @@ static void ANIM_init_channel_typeinfo_data(void) } } -/* Get type info from given channel type */ const bAnimChannelType *ANIM_channel_get_typeinfo(bAnimListElem *ale) { /* Sanity checks. */ @@ -4179,7 +4178,6 @@ const bAnimChannelType *ANIM_channel_get_typeinfo(bAnimListElem *ale) /* --------------------------- */ -/* Print debug info string for the given channel */ void ANIM_channel_debug_print_info(bAnimListElem *ale, short indent_level) { const bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale); @@ -4212,7 +4210,6 @@ void ANIM_channel_debug_print_info(bAnimListElem *ale, short indent_level) } } -/* Retrieves the Action associated with this animation channel. */ bAction *ANIM_channel_action_get(const bAnimListElem *ale) { if (ale->datatype == ALE_ACT) { @@ -4232,9 +4229,6 @@ bAction *ANIM_channel_action_get(const bAnimListElem *ale) /* --------------------------- */ -/* Check if some setting for a channel is enabled - * Returns: 1 = On, 0 = Off, -1 = Invalid - */ short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting) { const bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale); @@ -4317,10 +4311,6 @@ short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChanne } \ (void)0 -/* Change value of some setting for a channel - * - setting: eAnimChannel_Settings - * - mode: eAnimChannels_SetFlag - */ void ANIM_channel_setting_set(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting, @@ -4394,7 +4384,6 @@ static bool achannel_is_being_renamed(const bAnimContext *ac, return false; } -/* Draw the given channel */ void ANIM_channel_draw( bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc, size_t channel_index) { @@ -5150,7 +5139,6 @@ static void draw_setting_widget(bAnimContext *ac, } } -/* Draw UI widgets the given channel */ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListElem *ale, diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 69fabd004cc..b97837a76b9 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -74,8 +74,6 @@ /* -------------------------- Selection ------------------------------------- */ -/* Set the given animation-channel as the active one for the active context */ -/* TODO: extend for animdata types... */ void ANIM_set_active_channel(bAnimContext *ac, void *data, eAnimCont_Types datatype, @@ -83,6 +81,8 @@ void ANIM_set_active_channel(bAnimContext *ac, void *channel_data, eAnim_ChannelType channel_type) { + /* TODO: extend for animdata types. */ + ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; @@ -460,7 +460,6 @@ static void anim_channels_select_set(bAnimContext *ac, } } -/* Set selection state of all animation channels in the context. */ void ANIM_anim_channels_select_set(bAnimContext *ac, eAnimChannels_SetFlag sel) { ListBase anim_data = anim_channels_for_selection(ac); @@ -468,7 +467,6 @@ void ANIM_anim_channels_select_set(bAnimContext *ac, eAnimChannels_SetFlag sel) ANIM_animdata_freelist(&anim_data); } -/* Toggle selection state of all animation channels in the context. */ void ANIM_anim_channels_select_toggle(bAnimContext *ac) { ListBase anim_data = anim_channels_for_selection(ac); @@ -588,15 +586,6 @@ static void anim_flush_channel_setting_down(bAnimContext *ac, } } -/* Flush visibility (for Graph Editor) changes up/down hierarchy for changes in the given setting - * - anim_data: list of the all the anim channels that can be chosen - * -> filtered using ANIMFILTER_CHANNELS only, since if we took VISIBLE too, - * then the channels under closed expanders get ignored... - * - ale_setting: the anim channel (not in the anim_data list directly, though occurring there) - * with the new state of the setting that we want flushed up/down the hierarchy - * - setting: type of setting to set - * - on: whether the visibility setting has been enabled or disabled - */ void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAnimListElem *ale_setting, @@ -652,7 +641,6 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac, /* -------------------------- F-Curves ------------------------------------- */ -/* Delete the given F-Curve from its AnimData block */ void ANIM_fcurve_delete_from_animdata(bAnimContext *ac, AnimData *adt, FCurve *fcu) { /* - if no AnimData, we've got nowhere to remove the F-Curve from @@ -708,8 +696,6 @@ void ANIM_fcurve_delete_from_animdata(bAnimContext *ac, AnimData *adt, FCurve *f BKE_fcurve_free(fcu); } -/* If the action has no F-Curves, unlink it from AnimData if it did not - * come from a NLA Strip being tweaked. */ bool ANIM_remove_empty_action_from_animdata(struct AnimData *adt) { if (adt->action != NULL) { diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index 088de80bb65..7a34d8b542a 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -56,9 +56,6 @@ /* **************************** depsgraph tagging ******************************** */ -/* tags the given anim list element for refreshes (if applicable) - * due to Animation Editor editing - */ void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale) { ID *id; @@ -114,8 +111,6 @@ void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale) } } -/* tags the given ID block for refreshes (if applicable) due to - * Animation Editor editing */ void ANIM_id_update(Main *bmain, ID *id) { if (id) { @@ -276,7 +271,6 @@ static void animchan_sync_gplayer(bAnimListElem *ale) /* ---------------- */ -/* Main call to be exported to animation editors */ void ANIM_sync_animchannels_to_data(const bContext *C) { bAnimContext ac; diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index f5a5609aa2e..6589756c526 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -63,7 +63,6 @@ /* *************************************************** */ /* CURRENT FRAME DRAWING */ -/* General call for drawing current frame indicator in animation editor */ void ANIM_draw_cfra(const bContext *C, View2D *v2d, short flag) { Scene *scene = CTX_data_scene(C); @@ -92,7 +91,6 @@ void ANIM_draw_cfra(const bContext *C, View2D *v2d, short flag) /* PREVIEW RANGE 'CURTAINS' */ /* NOTE: 'Preview Range' tools are defined in `anim_ops.c`. */ -/* Draw preview range 'curtains' for highlighting where the animation data is */ void ANIM_draw_previewrange(const bContext *C, View2D *v2d, int end_frame_width) { Scene *scene = CTX_data_scene(C); @@ -127,11 +125,6 @@ void ANIM_draw_previewrange(const bContext *C, View2D *v2d, int end_frame_width) /* *************************************************** */ /* SCENE FRAME RANGE */ -/** - * Draw frame range guides (for scene frame range) in background. - * - * TODO: Should we still show these when preview range is enabled? - */ void ANIM_draw_framerange(Scene *scene, View2D *v2d) { /* draw darkened area outside of active timeline frame range */ @@ -168,10 +161,6 @@ void ANIM_draw_framerange(Scene *scene, View2D *v2d) immUnbindProgram(); } -/** - * Draw manually set intended playback frame range guides for the action in the background. - * Allows specifying a subset of the Y range of the view. - */ void ANIM_draw_action_framerange( AnimData *adt, bAction *action, View2D *v2d, float ymin, float ymax) { @@ -239,11 +228,6 @@ void ANIM_draw_action_framerange( /* *************************************************** */ /* NLA-MAPPING UTILITIES (required for drawing and also editing keyframes). */ -/** - * Obtain the AnimData block providing NLA-mapping for the given channel (if applicable). - * - * TODO: do not supply return this if the animdata tells us that there is no mapping to perform. - */ AnimData *ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale) { /* sanity checks */ @@ -319,10 +303,6 @@ static short bezt_nlamapping_apply(KeyframeEditData *ked, BezTriple *bezt) return 0; } -/* Apply/Unapply NLA mapping to all keyframes in the nominated F-Curve - * - restore = whether to map points back to non-mapped time - * - only_keys = whether to only adjust the location of the center point of beztriples - */ void ANIM_nla_mapping_apply_fcurve(AnimData *adt, FCurve *fcu, bool restore, bool only_keys) { KeyframeEditData ked = {{NULL}}; @@ -350,7 +330,6 @@ void ANIM_nla_mapping_apply_fcurve(AnimData *adt, FCurve *fcu, bool restore, boo /* *************************************************** */ /* UNITS CONVERSION MAPPING (required for drawing and editing keyframes) */ -/* Get flags used for normalization in ANIM_unit_mapping_get_factor. */ short ANIM_get_normalization_flags(bAnimContext *ac) { if (ac->sl->spacetype == SPACE_GRAPH) { @@ -518,7 +497,6 @@ static float normalization_factor_get(Scene *scene, FCurve *fcu, short flag, flo return factor; } -/* Get unit conversion factor for given ID + F-Curve */ float ANIM_unit_mapping_get_factor(Scene *scene, ID *id, FCurve *fcu, short flag, float *r_offset) { if (flag & ANIM_UNITCONV_NORMALIZE) { diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index da5d5543136..c1a09b9d21f 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -362,11 +362,6 @@ static bool nlaedit_get_context(bAnimContext *ac, SpaceNla *snla) /* ----------- Public API --------------- */ -/* Obtain current anim-data context, - * given that context info from Blender context has already been set: - * - AnimContext to write to is provided as pointer to var on stack so that we don't have - * allocation/freeing costs (which are not that avoidable with channels). - */ bool ANIM_animdata_context_getdata(bAnimContext *ac) { SpaceLink *sl = ac->sl; @@ -397,11 +392,6 @@ bool ANIM_animdata_context_getdata(bAnimContext *ac) return (ok && ac->data); } -/* Obtain current anim-data context from Blender Context info - * - AnimContext to write to is provided as pointer to var on stack so that we don't have - * allocation/freeing costs (which are not that avoidable with channels). - * - Clears data and sets the information from Blender Context which is useful - */ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac) { Main *bmain = CTX_data_main(C); @@ -3460,14 +3450,6 @@ static size_t animdata_filter_remove_duplis(ListBase *anim_data) /* ----------- Public API --------------- */ -/** - * This function filters the active data source to leave only animation channels suitable for - * usage by the caller. It will return the length of the list - * - * \param anim_data: Is a pointer to a #ListBase, - * to which the filtered animation channels will be placed for use. - * \param filter_mode: how should the data be filtered - bit-mapping accessed flags. - */ size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, eAnimFilter_Flags filter_mode, diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c index 05837ed17b9..0315b93508b 100644 --- a/source/blender/editors/animation/anim_ipo_utils.c +++ b/source/blender/editors/animation/anim_ipo_utils.c @@ -43,14 +43,6 @@ /* ----------------------- Getter functions ----------------------- */ -/** - * Write into "name" buffer, the name of the property - * (retrieved using RNA from the curve's settings), - * and return the icon used for the struct that this property refers to - * - * \warning name buffer we're writing to cannot exceed 256 chars - * (check anim_channels_defines.c for details). - */ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu) { int icon = 0; diff --git a/source/blender/editors/animation/anim_motion_paths.c b/source/blender/editors/animation/anim_motion_paths.c index 335034fef6e..d4a8e7921d6 100644 --- a/source/blender/editors/animation/anim_motion_paths.c +++ b/source/blender/editors/animation/anim_motion_paths.c @@ -99,12 +99,10 @@ Depsgraph *animviz_depsgraph_build(Main *bmain, return depsgraph; } -/* get list of motion paths to be baked for the given object - * - assumes the given list is ready to be used - */ -/* TODO: it would be nice in future to be able to update objects dependent on these bones too? */ void animviz_get_object_motionpaths(Object *ob, ListBase *targets) { + /* TODO: it would be nice in future to be able to update objects dependent on these bones too? */ + MPathTarget *mpt; /* object itself first */ @@ -356,12 +354,6 @@ static void motionpath_free_free_tree_data(ListBase *targets) } } -/* Perform baking of the given object's and/or its bones' transforms to motion paths - * - scene: current scene - * - ob: object whose flagged motion-paths should get calculated - * - recalc: whether we need to - */ -/* TODO: include reports pointer? */ void animviz_calc_motionpaths(Depsgraph *depsgraph, Main *bmain, Scene *scene, @@ -369,6 +361,8 @@ void animviz_calc_motionpaths(Depsgraph *depsgraph, eAnimvizCalcRange range, bool restore) { + /* TODO: include reports pointer? */ + /* Sanity check. */ if (ELEM(NULL, targets, targets->first)) { return; diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c index b94ee68e276..c4d8484e6a8 100644 --- a/source/blender/editors/animation/fmodifier_ui.c +++ b/source/blender/editors/animation/fmodifier_ui.c @@ -891,9 +891,6 @@ static void panel_register_stepped(ARegionType *region_type, /** \name Panel Creation * \{ */ -/** - * Checks if the panels match the active strip / curve, rebuilds them if they don't. - */ void ANIM_fmodifier_panels(const bContext *C, ID *owner_id, ListBase *fmodifiers, @@ -969,17 +966,12 @@ static ListBase fmodifier_copypaste_buf = {NULL, NULL}; /* ---------- */ -/* free the copy/paste buffer */ void ANIM_fmodifiers_copybuf_free(void) { /* just free the whole buffer */ free_fmodifiers(&fmodifier_copypaste_buf); } -/* copy the given F-Modifiers to the buffer, returning whether anything was copied or not - * assuming that the buffer has been cleared already with ANIM_fmodifiers_copybuf_free() - * - active: only copy the active modifier - */ bool ANIM_fmodifiers_copy_to_buf(ListBase *modifiers, bool active) { bool ok = true; @@ -1009,9 +1001,6 @@ bool ANIM_fmodifiers_copy_to_buf(ListBase *modifiers, bool active) return ok; } -/* 'Paste' the F-Modifier(s) from the buffer to the specified list - * - replace: free all the existing modifiers to leave only the pasted ones - */ bool ANIM_fmodifiers_paste_from_buf(ListBase *modifiers, bool replace, FCurve *curve) { FModifier *fcm; |