Age | Commit message (Collapse) | Author |
|
|
|
Adds `rna_path.cc` and `RNA_path.h`.
`rna_access.c` is a quite big file, which makes it rather hard and
inconvenient to navigate. RNA path functions form a nicely coherent unit
that can stand well on it's own, so it makes sense to split them off to
mitigate the problem. Moreover, I was looking into refactoring the quite
convoluted/overloaded `rna_path_parse()`, and found that some C++
features may help greatly with that. So having that code compile in C++
would be helpful to attempt that.
Differential Revision: https://developer.blender.org/D15540
Reviewed by: Brecht Van Lommel, Campbell Barton, Bastien Montagne
|
|
|
|
Also add missing task-ID reference & remove colon after \note as it
doesn't render properly in doxygen.
|
|
|
|
Add a new operator, "Start Tweaking Strip Actions (Full Stack)", which
allows you to insert keyframes and preserve the pose that you visually
keyed while upper strips are evaluating,
The old operator has been renamed from "Start Tweaking Strip Actions" to
"Start Tweaking Strip Actions (Lower Stack)" and remains the default for
the hotkey {key TAB}.
**Limitations, Keyframe Remapping Failure Cases**:
1. For *transitions* above the tweaked strip, keyframe remapping will
fail for channel values that are affected by the transition. A work
around is to tweak the active strip without evaluating the upper NLA
stack.
It's not supported because it's non-trivial and I couldn't figure it
out for all transition combinations of blend modes. In the future, it
would be nice if transitions (and metas) supported nested tracks
instead of using the left/right strips for the transitions. That
would allow the transitioned strips to overlap in time. It would also
allow N strips to be part of the (previously) left and right strips,
or perhaps even N strips being transitioned in sequence (similar to a
blend tree). Proper keyframe remapping through all that is currently
beyond my mathematical ability. And even if I could figure it out,
would it make sense to keyframe remap through a transition?
//This case is reported to the user for failed keyframe insertions.//
2. Full replace upper strip that contains the keyed channels.
//This case is reported to the user for failed keyframe insertions.//
3. When the same action clip occurs multiple times (colored Red to
denote it's a linked strip) and vertically overlaps the tweaked
strip, then the remapping will generally fail and is expected to
fail.
I don't plan on adding support for this case as it's also non-trivial
and (hopefully) not a common or expected use case so it shouldn't be
much of an issue to lack support here.
For anyone curious on the cases that would work, it works when the
linked strips aren't time-aligned and when we can insert a keyframe
into the tweaked strip without modifying the current frame output of
the other linked strips. Having all frames sampled and the strip
non-time aligned leads to a working case. But if all key handles are
AUTO, then it's likely to fail.
//This case is not reported to the user for failed keyframe
insertions.//
4. When using Quaternions and a small strip influence on the tweaked
Combine strip. This was an existing failure case before this patch
too but worth a mention in case it causes confusion. D10504 has an
example file with instructions.
//This case is not reported to the user for failed keyframe insertions. //
5. When an upper Replace strip with high influence and animator keys to
Quaternion Combine (Replace is fine). This case is similar to (4)
where Quaternion 180 degree rotation limitations prevent a solution.
//This case is not reported to the user for failed keyframe insertions.//
Reviewed By: sybren, RiggingDojo
Differential Revision: https://developer.blender.org/D10504
|
|
So far it was needed to declare a new RNA struct to `RNA_access.h` manually.
Since 9b298cf3dbec we generate a `RNA_prototypes.h` for RNA property
declarations. Now this also includes the RNA struct declarations, so they don't
have to be added manually anymore.
Differential Revision: https://developer.blender.org/D13862
Reviewed by: brecht, campbellbarton
|
|
|
|
lib_query/foreach_id code.
This will have to be backported to 2.93 and possibly 2.83 if possible.
|
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
Based on discussions from T95355 and T94193, the plan is to use
the name "Curves" to describe the data-block container for multiple
curves. Eventually this will replace the existing "Curve" data-block.
However, it will be a while before the curve data-block can be replaced
so in order to distinguish the two curve types in the UI, "Hair Curves"
will be used, but eventually changed back to "Curves".
This patch renames "hair-related" files, functions, types, and variable
names to this convention. A deep rename is preferred to keep code
consistent and to avoid any "hair" terminology from leaking, since the
new data-block is meant for all curve types, not just hair use cases.
The downside of this naming is that the difference between "Curve"
and "Curves" has become important. That was considered during
design discussons and deemed acceptable, especially given the
non-permanent nature of the somewhat common conflict.
Some points of interest:
- All DNA compatibility is lost, just like rBf59767ff9729.
- I renamed `ID_HA` to `ID_CV` so there is no complete mismatch.
- `hair_curves` is used where necessary to distinguish from the
existing "curves" plural.
- I didn't rename any of the cycles/rendering code function names,
since that is also used by the old hair particle system.
Differential Revision: https://developer.blender.org/D14007
|
|
- 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
|
|
By argument naming and convention this is the intended argument order.
|
|
Was reported for a file which does not have an active track set in
AnimData even though it was in strip twek mode (but this was accessed in
is_nlatrack_evaluatable()).
Root cause for this is not totally clear, but I assume the situation is
described as part T87681 (and is fixed in D11052).
This patch here just prevents the crash for files that are already in the
borked state.
Reviewers: sybren
Maniphest Tasks: T89805
Differential Revision: https://developer.blender.org/D12085
|
|
|
|
|
|
Some asserts were never raised because of invalid checks.
|
|
Add function `BKE_pose_apply_action_blend()`, which blends a given
Action into current pose. The Action is evaluated at a specified frame,
and the result is applied to the armature's pose.
A blend factor can be given to blend between the current pose and the
one in the Action. Quaternions are interpolated with SLERP; it is
assumed that their FCurves are consecutively stored in the Action.
This function will be used in the upcoming new Pose Library.
|
|
This shows the text as part of the assertion message.
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
|
|
|
|
|
|
Extracts `nlasnapshot_blend_get_inverted_upper_snapshot()` from
`BKE_animsys_nla_remap_keyframe_values()`
This introduces a new struct member:
`NlaEvalChannelSnapshot->remap_domain` and marks which values of
`blended_snapshot` are processed for remapping/used-for-inverting.
Effectively, it marks which values have successfully been remapped and
can be further used for remapping.
`nlasnapshot_blend_get_inverted_upper_snapshot()`:
output snapshot `r_upper_snapshot` has each channel's `remap_domain`
written to which effectively marks the successfully remapped values.
The only reason a value is not in the remap domain is if inversion
failed or it wasn't marked to be remapped.
`..get_inverted_upper_snapshot()` has a variant `nlasnapshot_blend()`
from {D10220}, but this patch doesn't depend on it at all. A third
variant will later be added `..get_inverted_lower_snapshot()`.
Altogether, these three functions allow solving for any of
(lower_snapshot, upper_snapshot, blended_snapshot) given the other two.
The function `..get_inverted_lower_snapshot()` will also similarly
process the remap domain of the blended and lower snapshot.
added assertions within `nlasnapshot_blend()` and
`..get_inverted_upper_snapshot()` to future proof branches dealing with
blendmode and mixmodes. (suggested by sybren)
No user functional changes
Reviewed By: sybren
Differential Revision: https://developer.blender.org/D10222
|
|
|
|
Rename:
- `BKE_animsys_store_rna_setting` → `BKE_animsys_rna_path_resolve`
- `BKE_animsys_read_rna_setting` → `BKE_animsys_read_from_rna_path`
- `BKE_animsys_write_rna_setting` → `BKE_animsys_write_to_rna_path`
The concept of "RNA setting" is unclear; the new names reflect better
what the functions actually do.
No functional changes.
|
|
Lower the cognitive complexity of `BKE_animsys_store_rna_setting()` by
flipping conditions and using early returns.
No functional changes.
|
|
Remove `animsys_evaluate_action()` and rename
`animsys_evaluate_action_ex()` to it. The only function of the former
was to call the latter, with the exact same parameters.
No functional changes.
|
|
Introduced by my recent commit: rBc48360c2559a
Accidentally used 4 instead of `necs->length`.
|
|
Issue introduced by my commit: rB40b7929cc040
**User-level Problem**:
The issue resulted in a full-replace upper strip with only a Z location
channel full-replacing the XY location channels of the lower stack.
replaced to default. The expected behavior is that only the Z location
channel is affected.
**Technical-level Problem**:
Before the problematic commit, fcurves were blended as they were read.
So only existing animated channels would blend. My recent commit
changed the process to read all fcurve values into an isolated
upper_snapshot then blend with the lower stack. There is no data stored
to know whether the upper snapshot channel values were sampled from
fcurves or were default values. Only those sampled from fcurves should
be blended.
**Solution**:
Added a `blend_domain` bitmask member to NlaEvalChannelSnapshot.
The blending function only blends values within the `blend_domain`.
Sampled fcurve values are now marked as within the `blend_domain`.
We also now always copy the lower snapshot to the result snapshot which
only matters when they aren't the same. Currently, it's always the same
so the change is more for future unseen cases.
Reviewed By: sybren, #animation_rigging
Differential Revision: https://developer.blender.org/D10339
|
|
Approximately 91 spelling corrections, almost all in comments.
Differential Revision: https://developer.blender.org/D10288
Reviewed by Harley Acheson
|
|
Introduced by my commit: rB09709a7e64ff
This bug effectively enabled the NLA when it should be disabled, when
all tracks muted or no strips exist. Specifically, the NLA Action Track
settings would be used (extrapolation, blendmode, influence).
|
|
The function `nlastrip_evaluate_transition()` has been slightly
modified to use `nlasnapshot_blend()` instead of it's own special
blending function `nlaeval_snapshot_mix_and_free()`.
No user functional changes
Reviewed By: sybren, #animation_rigging
Differential Revision: https://developer.blender.org/D10221
|
|
Introduced by commit: rB40b7929cc040
|
|
From original commit: rB40b7929cc040
|
|
Refactor
//nlastrip_evaluate_actionclip()// and //nlaeval_blend_value()// into
//nlasnapshot_blend()//, //nlastrip_evaluate_actionclip()//,
//nlasnapshot_from_action()//.
**Motivations**:
* {T83615} Requires reading all pose bone fcurves before being able to
apply pre-blend transforms. The function //nlasnapshot_from_action()//
achieves this. This effectively removed the need to specially handle
Quaternion blend queuing so that code has been removed.
* {D8296} Adds support for keyframe remapping through an upper stack of
strips. Instead of introducing a variant of the form:
//nlastrip_evaluate_actionclip_inverted_get_lower()//,
//nlastrip_evaluate_actionclip()// will later be extended to take an
`evaluation_mode` as input to avoid duplicating the recursion functions
related to //nlastrip_evaluate()//.
* //nlasnapshot_blend()// will eventually have variants of
//nlasnapshot_blend_get_inverted_lower_snapshot()// and
//nlasnapshot_blend_get_inverted_upper_snapshot()// which are all
independent of NlaStrips and NlaTracks, further simplifying the
blending implementation. Ideally, //nlastrip_evaluate()// would get
renamed to //nlasnapshot_blend_strip()// but that'll be a later patch
to avoid unnecessary patches slowing the review of more important
patches.
No User-side Functional changes
Reviewed By: sybren, #animation_rigging
Differential Revision: https://developer.blender.org/D10220
|
|
|
|
For term consistency with usage.
The clarity is more for consistency with the nla domain() processing
function names and the core struct member name it stores the results
in, "valid". The name "domain", which implies a function can operate
on it, seems more natural than "valid", which implies something is
wrong if false.
No functional changes.
Reviewed by: sybren
Differential Revision: http://developer.blender.org/D9692
|
|
The field will already be properly written to in (anim_sys.c)
nla_eval_domain_action(). It's easier to understand the property's
usage after removing the redundancy.
No functional changes.
Reviewed by: ChrisLend, sybren
Differential Revision: http://developer.blender.org/D9689
|
|
No functional changes.
Future patches {D8867} {D8296} make use of it.
Reviewed by: sybren, ChrisLend
Differential Revision: http://developer.blender.org/D9691
|
|
No intended functional changes.
Refactors animsys_evaluate_nla() into 2 versions:
animsys_evaluate_nla_for_keyframing(), animsys_evaluate_nla_for_flush()
to make it clear what data is being calculated and why.
Dummy strip creation has been refactored to two separate functions,
animsys_create_tweak_strip() and animsys_create_action_track_strip().
Both are evaluated differently from other strips and eachother. There's
no need to interweave them. A future patch D8296, generally requires
both strips.
___
XXX anim_sys.c) nlatrack_find_tweaked() is a temporary work around.
If anyone has any insight into this problem, help is appreciated.
Reviewed by: sybren
Differential Revision: http://developer.blender.org/D9696
|
|
**Renames parms**:
| **old name** | **new name**
| old_value | lower_value
| target_value | blended_value
| value | strip_value
| inf | influence
**Reason**: {D8296} allows full nla stack evaluation with proper
keyframing support. These names should make it more intuitive how all
the data gets processed and inverted. Note, that I do use the term
"strip_value" instead of something like "fcurve_value" of the tweak
strip. Technically, "strip_value" is closer to what is solved for.
For example, if a noise fmodifier was active for the fcurve, then the
remapping would appear to be wrong. In the future, further solving can
be done afterward, outside of the nla system, to remove the effects of
fmodifiers.
**Renames functions**:
| nla_invert_blend_value | nla_blend_get_inverted_strip_value
| nla_invert_combine_value | nla_combine_get_inverted_strip_value
**Reason**: D8296 adds get_inverted_lower_value() variants,
so "invert" alone is too vague.
**Renames NlaKeyframingContext member**:
| nla_channels | lower_eval_data
**Reason**: D8296 evaluates the upper stack. This name makes it more
obvious what data is stored there.
No functional changes (relative to the dependency below)
Split from {D9247}
Depends on {D9694} since the code was so close to eachother.
Reviewed By: sybren
Differential Revision: https://developer.blender.org/D9695
|
|
Caused by 7f6ffe9195c105a2ed9776b907aa2e6e34ed4bf3
|
|
It's an explicit check to prevent division by zero if caller hasn't
done the check. Future patch {D8867} will not use the nla remap
function and thus not do the check. This patch also replaces some
float (==) equality checks with IS_EQF().
Split from {D9247}
Reviewed By: sybren
Differential Revision: https://developer.blender.org/D9694
|
|
And removes redundant index local variable. Future patches {D8296} and
{D8867} make use of this function.
No functional changes.
Split from {D9247}
Reviewed By: sybren
Differential Revision: https://developer.blender.org/D9693
|
|
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required.
Differential Revision: https://developer.blender.org/D9250
Reviewed by Campbell Barton
|
|
|
|
Copy correct time to temporary strips used for evaluation of NLA
Transition strips.
When a transition is placed next to a meta strip, the transition would
use the wrong strip time, using the time of the meta strip instead of
its own.
Reviewed by: sybren
Differential Revision: https://developer.blender.org/D8287
|
|
Ref T76372
|
|
This is in preparation for https://developer.blender.org/D8665.
|