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
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.
2019-08-23RNA: Cleanup PointerRNA structJacques Lucke
The old layout of `PointerRNA` was confusing for historic reasons: ``` typedef struct PointerRNA { struct { void *data; } id; struct StructRNA *type; void *data; } PointerRNA; ``` This patch updates it to: ``` typedef struct PointerRNA { struct ID *owner_id; struct StructRNA *type; void *data; } PointerRNA; ``` Throughout the code base `id.data` was replaced with `owner_id`. Furthermore, many explicit pointer type casts were added which were implicit before. Some type casts to `ID *` were removed. Reviewers: brecht, campbellbarton Differential Revision: https://developer.blender.org/D5558
2019-08-02Cleanup: spellingCampbell Barton
2019-08-01Cleanup: misc spelling fixesCampbell Barton
T68035 by @luzpaz
2019-07-31Fix negative booleanSergey Sharybin
Was a nice looking invention, but is obviously wrong. Is likely no function changes, since -false is like -0 which is 0 and which false. And -true is like -<non-zero> which is non-zero as well. Spotted by Sybren, thanks!
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-05-28Fix T65175: nodetree animation stays linked after duplicating a lampPhilipp Oeser
Reviewers: mont29, brecht Maniphest Tasks: T65175 Differential Revision: https://developer.blender.org/D4956
2019-05-19Cleanup: doxygen parametersCampbell Barton
2019-05-16Fix T64681: evaluate curves with generative modifiers and no keys.Alexander Gavrilov
Introduce a new function and use it everywhere, including automatic curve deletion checks to guarantee consistency.
2019-05-15Animation: treat F-Curves with no keys as if muted/not existing.Alexander Gavrilov
When normally editing curves, deleting the last keyframe also deletes the curve. Thus if for some reason it didn't happen, e.g. maybe due to removing keys directly via Python, skip the bad curve instead of resetting the channel to zero.
2019-05-01ClangFormat: run with ReflowComments on source/Campbell Barton
Prepare for enabling ReflowComments.
2019-04-30Fix T63865: Animated Influence slider of NLA Strip doesn't updateSergey Sharybin
Add special case to construct PointerRNA from evaluated NLA strip to an original one when flushing animation back to the original ID. Reviewers: brecht Maniphest Tasks: T63865 Differential Revision: https://developer.blender.org/D4762
2019-04-27Cleanup: comments (long lines) in blenkernelCampbell Barton
2019-04-22Cleanup: style, use braces for blenkernelCampbell Barton
2019-04-20NLA: check that properties are animatable.Alexander Gavrilov
2019-04-18Cleanup: comment blocksCampbell Barton
2019-04-17Animation: Refactor storage usage during fcurve modifier evaluationJacques Lucke
Previously, when a fcurve modifier used storage, many heap allocations were done. This caused major slowdowns as described in T63656. Furthermore, the storage usage was a special case only used by the Cycles modifier. This refactor makes storage usage the "normal" case. That reduces the overall complexity. The storage is stack allocated now. The framerate on the provided test scene went up from ~5 fps to ~16 fps. Reviewers: angavrilov Differential Revision: https://developer.blender.org/D4701
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-03-08Cleanup: use plural names for Main listsCampbell Barton
Convention was not to but after discussion on 918941483f7e we agree its best to change the convention. Names now mostly follow RNA. Some exceptions: - Use 'nodetrees' instead of 'nodegroups' since the struct is called NodeTree. - Use 'gpencils' instead of 'grease_pencil' since 'gpencil' is a common abbreviation in the C code. Other exceptions: - Leave 'wm' as it's a list of one. - Leave 'ipo' as is for versioning.
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-27Cleanup: file rename lamp -> lightCampbell Barton
2019-02-27Cleanup: rename lamp -> lightCampbell Barton