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-02-22Cleanup: clang-formatCampbell Barton
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-01-06Cleanup: anim, remove `const` declarations from pass-by-value paramsSybren A. Stüvel
Remove `const` from pass-by-value parameters in function declarations. The variables passed as parameters can never be modified by the function anyway, so declaring them as `const` is meaningless. Having the declaration there could confuse, especially as it suggests it does have a meaning, training people to write meaningless code.
2022-01-06Correct error when moving doc-strings into headerCampbell Barton
Error in ffc4c126f5416b04a01653e7a03451797b98aba4, which moved doc-strings from implementation into headers. Some changes in BKE_animsys.h needed to done manually as there were already doc-strings in both the header and implementation (with overlapping information). When making these changes some doc-strings were removed unintentionally. Thanks for @sybren for the heads up.
2021-12-23Cleanup: remove BKE_animdata_driver_path_hackSybren A. Stüvel
The `BKE_animdata_driver_path_hack()` function has had almost no effect since rB51b796ff1528, and basically boils down to: ``` return base_path ? base_path : RNA_path_from_ID_to_property(ptr, prop); ``` Since `base_path` was `NULL` in the majority of cases, it's just been replaced by a direct call to `RNA_path_from_ID_to_property()`. The conditional now just appears in one remaining case. This relates to T91387. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D13646
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-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-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-03-11Cleanup: remove unnecessary `const` from function declarationSybren A. Stüvel
No functional changes.
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-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-16Cleanup: remove redundant struct declarationsCampbell Barton
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-10-15Fix T81580: No doversion for Emission StrengthDalai Felinto
The new parameter made so that previously keyed Alpha values were lost and instead the new "Emission Strength" was keyed. Issue introduced with the original commit of Emission Strength: b248ec97769f Note: Files created since the issue (September 17) that keyframed the Emission Strength will have to fix their files manually. Differential Revision: https://developer.blender.org/D9221
2020-09-30Cleanup: sort struct declarationsCampbell Barton
2020-09-10Refactor: move keyingset .blend I/O to blenkernelJacques Lucke
Ref T76372
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-08-06Fix T79408: ungroup operation update animation data incorrectlyJacques Lucke
Reviewers: sybren, sergey Differential Revision: https://developer.blender.org/D8464
2020-07-20Animation: Fix MSVC warning about C incompatibility of `AnimationEvalContext`Sybren A. Stüvel
Thanks @JacquesLucke for pointing this out. No functional changes.
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-05-08Cleanup: take includes out of 'extern "C"' blocksJacques Lucke
Surrounding includes with an 'extern "C"' block is not necessary anymore. Also that made it harder to add any C++ code to some headers, or include headers that have "optional" C++ code like `MEM_guardedalloc.h`. I tested compilation on linux and windows (and got help from @LazyDodo). If this still breaks compilation due to some linker error, the header containing the symbol in question is probably missing an 'extern "C"' block. Differential Revision: https://developer.blender.org/D7653
2020-04-16Cleanup: remove unused scene argumentCampbell Barton
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: add missing #includes to some headersSybren A. Stüvel
It should be possible to `#include` any header without having to worry about its dependencies. I didn't go and check all include files for this, just the ones that caused me errors while I was refactoring the `anim_sys.c` file. No functional changes.
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-29Refactor: Add C++ guard code to headersSergey Sharybin
C++ is used more and more, and it is becoming more and more annoying to keep track of whether header have C++ guard or not. Is easier and more clear to be consistent in all headers and have such guards in all headers.
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-09-27Cleanup: structs, cmake file listsCampbell Barton
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-08-25Cleanup: redundant struct declarationsCampbell Barton
2019-07-31Animation: Remove depsgraph argument from a lot of APISergey Sharybin
Use explicit boolean flag to indicate whether flush to original data is needed or not. Makes it possible to avoid confusion on whether an evaluated or any depsgraph can be passed to the API. Allows to remove depsgraph from bAnimContext as well. Reviewers: brecht Differential Revision: https://developer.blender.org/D5379
2019-06-12Cleanup: spelling in commentsCampbell Barton
2019-04-27Cleanup: comments (long lines) in blenkernelCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-02-28Depsgraph: Keep objects which has animated visibilitySergey Sharybin
This allows dependency graph to evaluate drivers of those objects and put them to a correct state. It will increase memory usage since now we can no longer save it by skipping copy-on-write for such objects. It will also currently make things slower, because we do not have granular enough visibility update of components in the dependency graph. Can do it later when the rest of the changes are finished. This commit does not update restriction flags on the base, since that is somewhat tricky to do currently: need to somehow see whether object is disabled due to flags on collection or due to own flags. Differential Revision: https://developer.blender.org/D4419
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-02Cleanup: remove author/date info from doxy headersCampbell Barton
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-31Fix T59495, T59992, T59904, T59178, T60598: broken keyframed value editing.Brecht Van Lommel
This removes a bunch of animation/driver evaluations and recalc flags that should be redundant in the new depsgraph, and were incorrectly affecting the evaluated scene in a permanent way. Still two cases that could be removed if the depsgraph is improved, in BKE_object_handle_data_update and BKE_cachefile_update_frame. For physics subframe interpolation there are also still calls to BKE_object_where_is_calc that should ideally be removed as well, though they are not known to cause keyframing bugs. Differential Revision: https://developer.blender.org/D4274
2019-01-28Cleanup: sort forward declarations of enum & structCampbell Barton
Done using: source/tools/utils_maintenance/c_sort_blocks.py
2019-01-15Cleanup: commas at the end of enumsCampbell Barton
Without this clang-format may wrap them onto a single line.
2019-01-14Keyframing: refactor insertion code to allow property-global NLA tweaks.Alexander Gavrilov
Supporting a strip blending type that treats quaternions as a unit also means being able to adjust all sub-channels as a unit when inserting keyframes. This requires refactoring keyframe insertion code to retrieve array property values for all channels at once, before iterating over the indices being inserted.
2019-01-08Typo fixesJoshua Leung
2018-12-14NLA: insert keyframes correctly for strips with non-Replace mode.Alexander Gavrilov
NLA strips support using the keyframe values in a variety of ways: adding, subtracting, multiplying, linearly mixing with the result of strips located below in the stack. This is intended for layering tweaks on top of a base animation. However, when inserting keyframes into such strips, it simply inserts the final value of the property, irrespective of these settings. This in fact makes the feature nearly useless. To fix this it is necessary to evaluate the NLA stack below the edited strip and correctly compute the raw key that would produce the intended final value, according to the mode and influence. Differential Revision: https://developer.blender.org/D3927
2018-11-23Return truth when animation fix changed animationSergey Sharybin
This can be used to inform higher level modules that animation is changed and that dependency graph likely requires relations update now.
2018-11-14Merge branch 'master' into blender2.8Campbell Barton