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-07-26Merge branch 'master' into geometry-nodes-iterative-cachegeometry-nodes-rigid-body-integrationLukas Tönne
2022-07-21Cleanup: Simplify relation flags assignmentSergey Sharybin
2022-07-21Cleanup: Unused forward declarationSergey Sharybin
2022-07-21Fix T99885: Invalid dependency graph state when curves surface is invisibleSergey Sharybin
Differential Revision: https://developer.blender.org/D15510
2022-07-21Fix T99733: Objects with driven visibility are evaluated when not neededSergey Sharybin
The issue was caused by the fact that objects with driven or animated visibility were considered visible by the dependency graph evaluation. This change makes it so the dependency graph evaluation is aware of visibility which might be changing. This is achieved by evaluating the path of the graph which affects objects visibility and adjusts to it before evaluating the rest of the graph. There is some time penalty to this, but there does not seem to be a way to fully avoid this penalty. With the production shot from the heist project the FPS drops by a tenth of a frame (~9.4 vs ~9.3 fps) when adding a driver to an object which keeps it visible. Note that this is a bit hard to measure since the FPS fluctuates quite a bit throughout the playback. On the other hand, having a driver on a visibility of a heavy object from character and setting visibility to false gives big speedup. Also worth noting that there is no penalty at all when there are no animated visibilities in the scene. Differential Revision: https://developer.blender.org/D15498
2022-07-21Depsgraph: Clear operation evaluation flags early onSergey Sharybin
The goal is to make it possible to evaluate the graph in multiple passes without evaluating the same node multiple times. Currently should not be any functional changes.
2022-07-19Depsgraph: Make animated properties API receive const IDSergey Sharybin
Semantically it is more correct as the cache does not modify the ID. There is need to do couple of const casts since the BKE (which is in C) does not easily allow to iterate into f-curves of const ID. Should be no functional changes.
2022-07-19Depsgraph: Cleanup, Make variable less ambiguous and more clearSergey Sharybin
2022-07-19Depsgraph: Make variable naming more clearSergey Sharybin
Disambiguate from nodes visibility flags.
2022-07-19Depsgraph: Cleanup, use nested namespace definitionSergey Sharybin
2022-07-19Depsgraph: Localize synchronization component visibility handlingSergey Sharybin
Move it from generic visibility handling to the synchronization component node implementation. Should be no functional changes.
2022-07-19Depsgraph: Cleanup, comments wrapping and spacing between linesSergey Sharybin
Should make it easier to read. No functional changes expected.
2022-07-19Depsgraph: Introduce operation code for visibility operationSergey Sharybin
No functional changes, just makes code more semantically clear.
2022-07-19Depsgraph: Cleanup, don't mic static function and anonymous namespaceSergey Sharybin
2022-07-19Depsgraph: Refactor evaluation into smaller reusable functionsSergey Sharybin
Should be no functional changes.
2022-07-19Depsgraph: Cleanup, use nested namespace definitionSergey Sharybin
2022-07-19Depsgraph: Make name and name tag optional in component nodeSergey Sharybin
Matches the builder API, making some code less verbose.
2022-07-19Depsgraph: Clarify comment in the component nodeSergey Sharybin
2022-07-19Depsgraph: Use single task pool during evaluationSergey Sharybin
Not sure why multiple pools were created: the pool should be able to handle two sets of tasks. Perhaps non-measurable improvement in terms of performance but this change simplifies code a bit.
2022-07-15Render: camera depth of field support for armature bone targetsDamien Picard
This is useful when using an armature as a camera rig, to avoid creating and targetting an empty object. Differential Revision: https://developer.blender.org/D7012
2022-07-07Fix T99386: Driven modifiers are always re-evaluated during animationSergey Sharybin
Even if the driver is not dependent on time the modifiers were always re-evaluated during playback. This is due to the legacy nature of the check whether modifier depends on time or not: it was simply checking for sub-string match for modifier in the F-Curve and drivers RNA paths. Nowadays such dependencies are created by the dependency graph builder, which allows to have more granular control over what depends on what. The code is now simplified to only check for "static" dependency of the modifier form time: for example, Wave modifier which always depends on time (even without explicit animation involved). This change also fixes missing relation from the animation component to the shader_fx modifiers, fixing race condition. Additional files used to verify relations: - Geometry: F13257368 - Grease Pencil: F13257369 - Shader FX: F13257370 In these files different types of modifiers have an animated property, and the purpose of the test is to verify that the modifiers do react to the animation and that there is a relation between animation and geometry components of the object. The latter one can only be checked using the dependency graph relation visualization. The drivers are not tested by these files. Those are not typically depend on time, and if there were missing relation from driver to the modifier we'd receive a bug report already. As well as if there was a bug in missing time relation to a driver we'd also receive a report. Differential Revision: https://developer.blender.org/D15358
2022-07-04Cleanup: Clarify relation name for time relation to modifierSergey Sharybin
2022-06-29Geometry Nodes: Experimental rigid body integration.Lukas Tönne
This is an exploration of how geometry nodes might be coupled with rigid bodies and iterative simulations in general. It's a very rough-and-ready implementation, not meant as a final version, but rather to prove the possiblity and to find challenging areas where redesign is needed. The core additions are: - Geometry nodes to flag points and/or instances as rigid bodies. - Depsgraph integration to ensure the necessary order of operations between modifiers and rigid body pre/post simulation updates. - Simple cache feature to store arbitrary geometry and loop back into the next iteration.
2022-06-10Cleanup: Clang tidyHans Goudey
2022-06-08Fix T98618: Drivers don't automatically update when changing active cameraSergey Sharybin
Active camera is a property of Scene, so need to take scene changes into account for such drivers to work reliably. The fix covers all the common cases of such configurations, but some of them might not be yet fully supported. Mainly cases when the target ID is not covered by the copy-on-write mechanism. There is a fuller explanation available in the code for the ease of reading by the future generations. Differential Revision: https://developer.blender.org/D15146
2022-06-03Constraints: introduce wrapper functions to access target lists.Alexander Gavrilov
Instead of directly accessing constraint-specific callbacks in code all over blender, introduce two wrappers to retrieve and free the target list. This incidentally revealed a place within the Collada exporter in BCAnimationSampler.cpp that didn't clean up after retrieving the targets, resulting in a small memory leak. Fixing this should be the only functional change in this commit. This was split off from D9732. Differential Revision: https://developer.blender.org/D13844
2022-06-01Cleanup: spelling in comments, use doxy sectionsCampbell Barton
2022-05-30Cleanup: Clang tidyHans Goudey
Mostly duplicate includes, also use nullptr, and using default member initializers.
2022-05-30Nodes: add separately allocated run-time data for bNodeTreeJacques Lucke
`bNodeTree` has a lot of run-time embedded in it currently. Having a separately allocated run-time struct has some benefits: * Run-time data is not stored in files. * Makes it easy to use c++ types as run-time data. * More clear distinction between what data only exists at run-time and which doesn't. This commit doesn't move all run-time data to the new struct yet, only the data where I know for sure how it is used. The remaining data can be moved separately. Differential Revision: https://developer.blender.org/D15033
2022-05-27Merge branch 'blender-v3.2-release'Sergey Sharybin
2022-05-27Fix T98379: Wrong evaluation when deactivating/activating collectionsSergey Sharybin
This is a regression caused by a230445caec6. The internal cause of the issue was that the synchronization component was no longer tagged as visible (and hence not evaluated) as it not connected to any directly visible IDs. Changed the logic in a way that if any component of an ID is evaluated the synchronization component will be evaluated as well. The naming of the flag in the component node is a bit confusing, but for the simplicity of the change for the upcoming release left it unchanged.
2022-05-25Cleanup: spelling, unbalanced doxy sectionsCampbell Barton
2022-05-24Depsgraph: Implement backtrace functionalitySergey Sharybin
The goal is to make it easier to track down sources of errors during the dependency graph builder. With this change whenever a relation can not be added a trace to the entity which requested the relation will be printed. For example: ``` Failed to add relation "Copy Location" Could not find op_from: OperationKey(type: BONE, component name: 'MissingBone', operation code: BONE_DONE) Trace: Depth Type Name ----- ---- ---- 1 Object Armature.001 2 Pose Channel Bone 3 Constraint Copy Location ``` On an implementation detail traced places where `checkIsBuiltAndTag` is called, with some additional places to help tracking pose channels, constraints, and modifiers. Further improvements in granularity are possible, but that could happen as a followup development once the core part is proven to work. An example of such improvement would be to have entries in the trace which will indicate NLA and drivers building. Currently it might be a bit confusing to see IDs in the trace referenced from driver. Even with such limitation the current state of the patch brings a very valuable information (some information is much better than no information at all). Differential Revision: https://developer.blender.org/D15017
2022-05-24Cleanup: Else after return in depsgraph codeSergey Sharybin
2022-05-18Merge branch 'blender-v3.2-release'Sergey Sharybin
2022-05-18Fix T98157: improve animation fps with better check in depsgraphJacques Lucke
Previously, the depsgraph assumed that every node tree might contain a reference to a video. This resulted noticeable overhead when there was no video. Checking whether a node tree contained a video was relatively expensive to do in the depsgraph. It is cheaper now due to the structure of the new node tree updater. This also adds an additional run-time field to `bNodeTree` (there are quite a few already). We should move those to a separate run-time struct, but not as part of a bug fix. Differential Revision: https://developer.blender.org/D14957
2022-05-16Merge remote-tracking branch 'origin/blender-v3.2-release'Sybren A. Stüvel
2022-05-16Fix T96289: Crash when accessing mesh via `ob.data` in a driverSybren A. Stüvel
Fix a crash when a driver variable targets an object and uses `data.shape_keys.key["name"].value` in its expression. The fix consists of adding an extra relation from the targeted object's `GEOMETRY` component to the driver evaluation. This ensures that its `data` pointer has been evaluated by the depsgraph and is safe to follow. This also resolves the concern raised on rB56407432a6aa. Reviewed by: brecht Differential Revision: https://developer.blender.org/D14956
2022-05-06Cleanup: quiet missing-declarations warningsCampbell Barton
2022-05-05Cleanup: Better const correctness for DEG_get_eval_flags_for_idSergey Sharybin
The ID is not modified by this function, so it can be const. Needed to tweak const correctness for original ID accessor as well. Additionally, did the same for accessor of evaluated ID for symmetry.
2022-04-14Fix T97262: Crash with specific view layer setupSergey Sharybin
Originally was noticed when using a linked background scene and a scene camera from another (local) scene. The root issue was that relation from view layer to object's base flags evaluation was using wrong view layer. This is because the relation was created between object and currently built view layer, and it only was happening once (since the object-level relations are only built once). Depending on order in which `build_object` was called it was possible that relation from a wrong view layer was used. Now the code is better split to indicate which parts of object relations are built when object comes from a base in the view layer, and which ones are built on indirect linking of object to the dependency graph. This patch makes relations correct in the cases when the same object is used as a base in both active and set scenes. But, the operation which handles object-level flags might not behave correctly as there is no known design of what is the proper thing to do in this case. Making a clear design and implementation of case when object is shared between active and set scene is outside of the scope of this patch. Differential Revision: https://developer.blender.org/D14626
2022-04-13Cover some DNA files with C++ utility macrosSergey Sharybin
Solves compilation warning with Clang, and moves manipulation with DNA structures to the designed way for C++. The tests and few other places are update to the new code by Jacques. Ref T96847 Maniphest Tasks: T96847 Differential Revision: https://developer.blender.org/D14625
2022-04-11Cleanup: malformed C-style comment blocks, spellingCampbell Barton
- Missing star prefix. - Unnecessary indentation. - Blank line after dot-points (otherwise doxygen merges with the previous dot-point). - Use back-slash for doxygen commands. - Correct spelling.
2022-04-05Curves: fix edit mode detectionKévin Dietrich
This adds missing cases to detect edit mode for Curves objects. Unlike other object types, Curves do not have specific edit data, rather we edit the original data directly, and rely on `Object.mode`. For this, `BKE_object_data_is_in_editmode` had to be modified to take a pointer to the object. This affects two places: the outliner and the dependency graph. For the former place, the object pointer is readily available, and we can use it. For the latter, the object pointer is not available, however since it is used to update edit mode pointers, and since Curves do not have such data, we can safely pass null to the function here. This also fixes the assertion failure that happens when closing a file in edit mode. Differential Revision: https://developer.blender.org/D14330
2022-04-05Fix T97003: color-management settings can't be animatedCampbell Barton
Regression in [0] which missed excluding FRAME_CHANGE from deg_recalc_flags_for_legacy_zero causing all DEG_id_tag_update(&scene->id, 0) calls to re-calculate animation data. When this tagging was done in the RNA update function, changing key-framed values in the UI would be immediate reset to their keyed-values. Thanks to Philipp Oeser for finding the root cause. [0]: 35aedd87e78d44aa0a622d26261ecac7ece12925
2022-04-01Cycles: enable Alembic procedural for final rendersKévin Dietrich
The Alembic procedural was only enabled during viewport renders originally because it did not have any caching strategy. Now that is does, we can allow its usage in final renders. This also removes the `dag_eval_mode` argument passing to `ModifierTypeInfo.dependsOnTime` which was originally added to detect if we are doing a viewport render for enabling the procedural. Differential Revision: https://developer.blender.org/D14520
2022-03-31Depsgraph: minor optimization in order of checksCampbell Barton
Checking BKE_image_user_id_has_animation loops over ID users which never needs to run for material & world data-blocks.
2022-03-31Cleanup: spelling, trailing space for comment-blocksCampbell Barton
2022-03-30Cleanup: spelling in commentsCampbell Barton
2022-03-26Cleanup: quiet compiler warningCampbell Barton