Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-10-07Cleanup: redundant parenthesisCampbell Barton
2022-09-06Cleanup: spelling in comments, formatting, move comments into headersCampbell Barton
2022-07-29Cleanup: Move RNA path functions into own C++ fileJulian Eisel
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
2022-06-03Cleanup: spelling in commentsCampbell Barton
2022-05-13Cleanup: spelling in comments, capitalize tagsCampbell Barton
Also add missing task-ID reference & remove colon after \note as it doesn't render properly in doxygen.
2022-04-20Cleanup: spelling in commentsCampbell Barton
2022-04-14NLA: Keyframe Remap Through Upper StripsWayde Moss
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
2022-03-14Auto-generate RNA-structs declarations in `RNA_prototypes.h`Julian Eisel
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
2022-02-14Merge branch 'blender-v3.1-release'Bastien Montagne
2022-02-14Fix T95601: Missing handling of keyingsets ID pointers in ↵Bastien Montagne
lib_query/foreach_id code. This will have to be backported to 2.93 and possibly 2.83 if possible.
2022-02-11File headers: SPDX License migrationCampbell Barton
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
2022-02-07Curves: Rename "Hair" types, variables, and functions to "Curves"Hans Goudey
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
2021-12-07Cleanup: move public doc-strings into headers for 'blenkernel'Campbell Barton
- 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
2021-10-14Cleanup: pass the sizeof(..) as the second arg for array allocationCampbell Barton
By argument naming and convention this is the intended argument order.
2021-08-12Fix T89805: NLA crash without active trackPhilipp Oeser
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
2021-08-05Cleanup: remove redundant parenthesisCampbell Barton
2021-07-30Cleanup: clang-format (re-run after v12 version bump)Campbell Barton
2021-07-21Fix incorrect use of BLI_assert with error stringsCampbell Barton
Some asserts were never raised because of invalid checks.
2021-07-15Animation: add function to blend Action into poseSybren A. Stüvel
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.
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-05-14Cleanup: spelling, rename metas to meta-strips / meta-ballsCampbell Barton
2021-05-12Cleanup: use our own code style for doxy-gen comment blocksCampbell Barton
2021-05-12NLA: Extract ..get_inverted_upper_snapshot()Wayde Moss
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
2021-04-09Cleanup: use our own code style for doxy-gen comment blocksCampbell Barton
2021-03-01Cleanup: rename some animation-related functionsSybren A. Stüvel
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.
2021-03-01Cleanup: refactor `BKE_animsys_store_rna_setting()`Sybren A. Stüvel
Lower the cognitive complexity of `BKE_animsys_store_rna_setting()` by flipping conditions and using early returns. No functional changes.
2021-03-01Cleanup: remove superfluous `animsys_evaluate_action_ex()` callSybren A. Stüvel
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.
2021-02-17Fix: NLA Blend Domain Enable All TypoWayde Moss
Introduced by my recent commit: rBc48360c2559a Accidentally used 4 instead of `necs->length`.
2021-02-17Fix: NLA Blends Non-Animated Upper Channel ValuesWayde Moss
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
2021-02-06UI: Fix Typos in Comments and Docsluzpaz
Approximately 91 spelling corrections, almost all in comments. Differential Revision: https://developer.blender.org/D10288 Reviewed by Harley Acheson
2021-02-06Fix: Disabled NLA Interferes with Action EvalWayde Moss
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).
2021-02-06NLA: Refactor Transition, Use Snapshot Blend FuncWayde Moss
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
2021-02-05Fix T85380: NLA Evaluation Missing Null CheckWayde Moss
Introduced by commit: rB40b7929cc040
2021-02-04NLA: Fix nlasnapshot_blend() Misplaced Null CheckWayde Moss
From original commit: rB40b7929cc040
2021-02-04NLA: Extract nlasnapshot_blend()Wayde Moss
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
2021-01-20Cleanup: spellingCampbell Barton
2021-01-15Nla: Rename NlaEvalChannel->valid to domainWayde Moss
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
2021-01-15NLA: Redundant NlaEvalChannel Valid Mask WriteWayde Moss
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
2021-01-15Nla Refactor: is_fcurve_evaluatable()Wayde Moss
No functional changes. Future patches {D8867} {D8296} make use of it. Reviewed by: sybren, ChrisLend Differential Revision: http://developer.blender.org/D9691
2021-01-15Nla Refactor: Split animsys_evaluate_nla()Wayde Moss
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
2020-12-21Nla Refactor: Better blend function parm namingWayde Moss
**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
2020-12-15Cleanup: type check failure, discarded-qualifiers warningsCampbell Barton
Caused by 7f6ffe9195c105a2ed9776b907aa2e6e34ed4bf3
2020-12-15Nla Refactor: Blend functions explicit Div0 checkWayde Moss
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
2020-12-15Nla Refactor: nlaevalchan_validate_index_ex()Wayde Moss
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
2020-10-19Spelling: It's Versus ItsHarley Acheson
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required. Differential Revision: https://developer.blender.org/D9250 Reviewed by Campbell Barton
2020-09-19Cleanup: spellingCampbell Barton
2020-09-15Fix: NLA, transition to Meta Strip uses wrong timeWayde Moss
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
2020-09-10Refactor: move keyingset .blend I/O to blenkernelJacques Lucke
Ref T76372