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
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
2020-08-26Logging: change error to warningJacques Lucke
This is in preparation for https://developer.blender.org/D8665.
2020-08-20Fix T63675: Keying outside NLA strip not possibleWayde Moss
Allow adding keys outside of the NLA strip, when Sync Length is activated. Before this, an animator would have to exit tweak mode, adjust the strip length, then enter tweak mode again. Now the animator can freely insert and modify keys outside of the strip bounds. They will never have to touch the strip bounds directly. Reviewed By: sybren Differential Revision: https://developer.blender.org/D7533
2020-08-01Cleanup: spellingCampbell Barton
2020-07-20T77086 Animation: Passing Dependency Graph to DriversSybren A. Stüvel
Custom driver functions need access to the dependency graph that is triggering the evaluation of the driver. This patch passes the dependency graph pointer through all the animation-related calls. Instead of passing the evaluation time to functions, the code now passes an `AnimationEvalContext` pointer: ``` typedef struct AnimationEvalContext { struct Depsgraph *const depsgraph; const float eval_time; } AnimationEvalContext; ``` These structs are read-only, meaning that the code cannot change the evaluation time. Note that the `depsgraph` pointer itself is const, but it points to a non-const depsgraph. FCurves and Drivers can be evaluated at a different time than the current scene time, for example when evaluating NLA strips. This means that, even though the current time is stored in the dependency graph, we need an explicit evaluation time. There are two functions that allow creation of `AnimationEvalContext` objects: - `BKE_animsys_eval_context_construct(Depsgraph *depsgraph, float eval_time)`, which creates a new context object from scratch, and - `BKE_animsys_eval_context_construct_at(AnimationEvalContext *anim_eval_context, float eval_time)`, which can be used to create a `AnimationEvalContext` with the same depsgraph, but at a different time. This makes it possible to later add fields without changing any of the code that just want to change the eval time. This also provides a fix for T75553, although it does require a change to the custom driver function. The driver should call `custom_function(depsgraph)`, and the function should use that depsgraph instead of information from `bpy.context`. Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D8047
2020-07-03Cleanup: Blendkernel, Clang-Tidy else-after-return fixes (incomplete)Sybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/blenkernel` module. Not all warnings are addressed in this commit. No functional changes.
2020-04-20Simulations: Add new simulation data blockJacques Lucke
This data block will be the container for simulation node trees. It will be used for the new particle node system (T73324). The new data block has the type `ID_SIM`. It is not visible to users and other developers by default yet. To enable it, activate the cmake option `WITH_NEW_SIMULATION_TYPE`. New simulation data blocks can be created by running `bpy.data.simulations.new("name")`. Reviewers: brecht Differential Revision: https://developer.blender.org/D7225
2020-04-16Cleanup: unused variable warningPhilipp Oeser
Not needed since rB1685f5824d91.
2020-04-16Cleanup: remove unused scene argumentCampbell Barton
2020-04-15Cleanup: remove (unused) RNA update cachePhilipp Oeser
Introduced in 2011 in rB6a392e8cb505, it was disabled again soon after in rBb062056c05a3 and traces to it partly removed in rB21744217cea9. Now remove completely. quote @sergey: We shouldn't be having partially working unused code. If we ever need some sort of update cache it would need to have clear design first, and the code could be resurrected from history if needed. Differential Revision: https://developer.blender.org/D7432
2020-04-03Code Quality: Replace for loops with LISTBASE_FOREACHDalai Felinto
Note this only changes cases where the variable was declared inside the for loop. To handle it outside as well is a different challenge. Differential Revision: https://developer.blender.org/D7320
2020-04-03Cleanup: Animation, move AnimData API to `anim_data.c`/`BKE_anim_data.h`Sybren A. Stüvel
The `BKE_animsys.h` and `anim_sys.c` files already had a an "AnimData API" section. The code in that section has now been split off, and placed into `BKE_anim_data.h` and `anim_data.c`. All files that used to include `BKE_animsys.h` have been adjusted to only include the animation headers they need (sometimes none). No functional changes.
2020-04-03Cleanup: Rename ScrArea variables from sa to areaJulian Eisel
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432. Now the area and region naming conventions should be less confusing. Mostly a careful batch rename but had to do few smaller fixes. Also ran clang-format on affected files.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-18Objects: add Volume object type, and prototypes for Hair and PointCloudBrecht Van Lommel
Only the volume object is exposed in the user interface. It is based on OpenVDB internally. Drawing and rendering code will follow in another commit. https://wiki.blender.org/wiki/Source/Objects/Volume https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Volumes Hair and PointCloud object types are hidden behind a WITH_NEW_OBJECT_TYPES build option. These are unfinished, and included only to make it easier to cooperate on development in the future and avoid tricky merges. https://wiki.blender.org/wiki/Source/Objects/New_Object_Types Ref T73201, T68981 Differential Revision: https://developer.blender.org/D6945
2020-02-10Cleanup/refactor: Rename `BKE_library` files to `BKE_lib`.Bastien Montagne
Note that `BKE_library.h`/`library.c` were renamed to `BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here. Part of T72604.
2020-01-13Refactor: Make construction of resolved RNA path reusableSergey Sharybin
It is somewhat different from RNA_path_resolve_property_full(), mainly since it's properly setting array index from the f-curve.
2019-11-29Refactor: Make animated RNA value read/write more reusableSergey Sharybin
Currently unused, but needed for coming fix.
2019-11-29Cleanup: Remove unused functionSergey Sharybin
2019-11-27Cleanup: warningsCampbell Barton
2019-11-26Anim: added BKE_object_moves_in_time(object) functionSybren A. Stüvel
This function exposes the already-existing static `object_moves_in_time()` function, and optionally recursively checks the parent object for animatedness as well. I also added checking `AnimData::overrides` to `BKE_animdata_id_is_animated()`. This ensures that, apart from the optional recursion to the parent object, the function has the same functionality.
2019-11-26Anim: made object param of BKE_animdata_id_is_animated() constSybren A. Stüvel
No functional changes.
2019-11-26Alembic export: don't assume transform is always animatedSybren A. Stüvel
Instead of always writing the transform on every frame, it's now checked whether the object is animated at all. This could be made stricter to reduce false positives, for example by checking FCurves and drivers to see whether translation/rotation/scale is animated. However, this approach is already better than the `return true` we had before. This commit adds the BKE_animdata_id_is_animated(id) function, which returns true if the ID datablock has non-empty animation data. This is determined by checking the the active action's fcurves, the drivers, and NLA tracks.
2019-11-24Cleanup: doxygen commentsCampbell Barton
Also correct some outdated symbol references, add missing 'name' commands.
2019-09-25Fix T69573: Driver Value does not slide along the actual value in the Driver ↵Sybren A. Stüvel
Editor This change is two-fold: - Ensure the result of the F-Curve evaluation is stored on the FCurve object. This was done in 2.79 but lost when we moved to more granular per-curve evaluation from the depsgraph. - Flush this result from the CoW copy back to the original. Reviewed by: sergey Differential Revision: https://developer.blender.org/D5888
2019-09-17Cleanup/sanitize a bit Action copying within `BKE_animdata_copy()`.Bastien Montagne
Whole animdata copying code would need much more love, but we can as well sanitize some pieces of it when we hit them, for now.