From ffc4c126f5416b04a01653e7a03451797b98aba4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Dec 2021 17:19:15 +1100 Subject: Cleanup: move public doc-strings into headers for 'blenkernel' - 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. - Minor improvements to doc-strings. Ref T92709 --- source/blender/blenkernel/nla_private.h | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'source/blender/blenkernel/nla_private.h') diff --git a/source/blender/blenkernel/nla_private.h b/source/blender/blenkernel/nla_private.h index 3e13ba602a4..93014c1b859 100644 --- a/source/blender/blenkernel/nla_private.h +++ b/source/blender/blenkernel/nla_private.h @@ -165,18 +165,30 @@ typedef struct NlaKeyframingContext { /* --------------- NLA Functions (not to be used as a proper API) ----------------------- */ -/* convert from strip time <-> global time */ +/** + * Convert non clipped mapping for strip-time <-> global time: + * `mode = eNlaTime_ConvertModes[] -> NLATIME_CONVERT_*` + * + * Only secure for 'internal' (i.e. within AnimSys evaluation) operations, + * but should not be directly relied on for stuff which interacts with editors. + */ float nlastrip_get_frame(NlaStrip *strip, float cframe, short mode); /* --------------- NLA Evaluation (very-private stuff) ----------------------- */ /* these functions are only defined here to avoid problems with the order * in which they get defined. */ +/** + * Gets the strip active at the current time for a list of strips for evaluation purposes. + */ NlaEvalStrip *nlastrips_ctime_get_strip(ListBase *list, ListBase *strips, short index, const struct AnimationEvalContext *anim_eval_context, const bool flush_to_original); +/** + * Evaluates the given evaluation strip. + */ void nlastrip_evaluate(PointerRNA *ptr, NlaEvalData *channels, ListBase *modifiers, @@ -184,6 +196,9 @@ void nlastrip_evaluate(PointerRNA *ptr, NlaEvalSnapshot *snapshot, const struct AnimationEvalContext *anim_eval_context, const bool flush_to_original); +/** + * write the accumulated settings to. + */ void nladata_flush_channels(PointerRNA *ptr, NlaEvalData *channels, NlaEvalSnapshot *snapshot, @@ -193,6 +208,14 @@ void nlasnapshot_enable_all_blend_domain(NlaEvalSnapshot *snapshot); void nlasnapshot_ensure_channels(NlaEvalData *eval_data, NlaEvalSnapshot *snapshot); +/** + * Blends the \a lower_snapshot with the \a upper_snapshot into \a r_blended_snapshot according + * to the given \a upper_blendmode and \a upper_influence. + * + * For \a upper_snapshot, blending limited to values in the \a blend_domain. + * For Replace blend-mode, this allows the upper snapshot to have a location XYZ channel + * where only a subset of values are blended. + */ void nlasnapshot_blend(NlaEvalData *eval_data, NlaEvalSnapshot *lower_snapshot, NlaEvalSnapshot *upper_snapshot, @@ -200,6 +223,14 @@ void nlasnapshot_blend(NlaEvalData *eval_data, const float upper_influence, NlaEvalSnapshot *r_blended_snapshot); +/** + * Using \a blended_snapshot and \a lower_snapshot, we can solve for the \a r_upper_snapshot. + * + * Only channels that exist within \a blended_snapshot are inverted. + * + * For \a r_upper_snapshot, disables \a NlaEvalChannelSnapshot->remap_domain for failed inversions. + * Only values within the \a remap_domain are processed. + */ void nlasnapshot_blend_get_inverted_upper_snapshot(NlaEvalData *eval_data, NlaEvalSnapshot *lower_snapshot, NlaEvalSnapshot *blended_snapshot, -- cgit v1.2.3