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-08-09Fix depsgraph check for tag during evaluationSergey Sharybin
- Only do print when asked for tags debugging. - Add missing newline to the message.
2021-07-19Revert "Depsgraph: Implement 'ID_RECALC_GEOMETRY_DEFORM'"Germano Cavalcante
This reverts commits bfa3dc91b75407b063f2ac991b176d98c050f92d, 52b94049f2a71a74f52247f83657cf3a5c8712b4, ae379714e4f1eca74f5f77532a6e959f29445236, a770faa811ee62837eb540b0bd83ca0770f16663, 4ed029fc02b022cb5ff28ed3ce70992c450d2be5, 101a493ab556c6597ac91fba204059be67b35990 and 62a2faa7ef39130446716d7a06215cd1df1eb2ac. And fixes T89955. Changing the dependency graph is a can of worms and the result is a kind of unpredictable. A different solution will be planned.
2021-07-18Fix T89929: Crash when hiding in the render a previously keyframed volumeGermano Cavalcante
Regression introduced in {rBbfa3dc91b754}. `ID_RECALC_GEOMETRY` should tag all operations of the `GEOMETRY` component and not just the operation of node `GEOMETRY_EVAL_INIT`.
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-13Depsgraph: Implement 'ID_RECALC_GEOMETRY_DEFORM'Germano Cavalcante
During a mesh transformation in edit mode (Move, Rotate...), only part of the batch cache needs to be updated. This commit allows only update only the drawn batches seen in `BKE_object_data_eval_batch_cache_deform_tag` if the new `ID_RECALC_GEOMETRY_DEFORM` flag is used. This new flag is used in the transforms operation for edit-mesh and results in 1.6x overall speedup in heavy subdiv cube. Differential Revision: https://developer.blender.org/D11599
2021-06-24Depsgraph: support flushing parameters without a full COW updateCampbell Barton
Avoid computationally expensive copying operations when only some settings have been modified. This is done by adding support for updating parameters without tagging for copy-on-write. Currently only mesh data blocks are supported, other data-blocks can be added individually. This prepares for changing values such as edit-mesh auto-smooth angle in edit-mode without duplicating all mesh-data. The benefit will only be seen when the user interface no longer tags all ID's for copy on write updates. ID_RECALC_GEOMETRY_ALL_MODES has been added to support situations where non edit-mode geometry is modified in edit-mode. While this isn't something user are likely to do, Python scripts may change the underlying mesh. Reviewed By: sergey Ref D11377
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-22Fix T89196: Depsgraph use-after-free after scene switching undoSergey Sharybin
Delay depsgraph visibility update tagging until it is known that graph relations are up to date, and until it is known that the graph is actually needed to be evaluated. Differential Revision: https://developer.blender.org/D11660
2021-06-22Cleanup: Use more clear visibility tag function nameSergey Sharybin
No functional changes. Just makes it clear this is not an immediate update, and will make an upcoming change more localized.
2021-04-26Depsgraph: support depending on collection geometryJacques Lucke
This fixes T87666 and T83252. The boolean modifier and geometry nodes can depend on the geometry of an entire collection. Before, the modifiers had to manually create relations to all the objects in the collection. This worked for the most part, but was cumbersome and did not solve all issues. For example, the modifiers were not properly updated when objects were added/removed from the referenced collection. This commit introduces the concept of "collection geometry" in the depsgraph. The geometry of a collection depends on the transforms and geometry of all the objects in it. The boolean modifier and geometry nodes can now just depend on the collection geometry instead of creating all the dependencies themselves. Differential Revision: https://developer.blender.org/D11053
2021-04-19Fix crash with Alembic export after recent persistent data bugfixBrecht Van Lommel
We weren't clearing the recalc flags for that case.
2021-04-19Fix T87535, T87295: issues with new persistent data optionBrecht Van Lommel
Some persistent data code was disable due to a deeper design issue, which meant some updates were not communicated to renderers. Dependency graph updates work in two passes, once where Blender scene animation updates are done, then app handler scripts can run to make further scene modifications, and then the depsgraph is updated again to take those into account. Previously the viewport would update renderers twice when such app handler scripts were present. Now both viewport and persistent data rendering update the renderers only once, accumulating updates from both passes.
2021-04-06Fix render crash in some .blend files after Persistent Data changesBrecht Van Lommel
Must always clear recalc flags, even if no editors use them, the depsgraph execution itself also depends on them.
2021-04-05Render: faster animation and re-rendering with Persistent DataBrecht Van Lommel
For Cycles, when enabling the Persistent Data option, the full render data will be preserved from frame-to-frame in animation renders and between re-renders of the scene. This means that any modifier evaluation, BVH building, OpenGL vertex buffer uploads, etc, can be done only once for unchanged objects. This comes at an increased memory cost. Previously there option was named Persistent Images and had a more limited impact on render time and memory. When using multiple view layers, only data from a single view layer is preserved to keep memory usage somewhat under control. However objects shared between view layers are preserved, and so this can speedup such renders as well, even single frame renders. For Eevee and Workbench this option is not available, however these engines will now always reuse the depsgraph for animation and multiple view layers. This can significantly speed up rendering. These engines do not support sharing the depsgraph between re-renders, due to technical issues regarding OpenGL contexts. Support for this could be added if those are solved, see the code comments for details.
2021-03-01Cleanup: spellingCampbell Barton
2021-01-28Fix T85142: BMW scene quits BlenderSergey Sharybin
Technically, the crash was caused by revert which happened in rBcd24712c2c5: it reverted some code which is essential for rB76fd41e9db1. Bring back the essential code for the removal of un-needed Copy-on-Write operations, so that the crash doesn't happen. What was causing the crash is the ID tag assuming Copy-on-Write operation always exists.
2021-01-27Fix T84717: Missing viewport update after shading changesSergey Sharybin
Revert "Fix T83411: Crash when using a workspace/layout data path in a driver" The fix for the crash exposed design violation in the viewport shading updates, which is for some reason relying on dependency graph tag of interface data. The viewport module did not respond to the issue in 2 weeks, and the architect considered missing update for multiple users a more serious issue than a crash in a very specific case. This reverts commit 0f95f51361d73fbd8ba8d80b3b65da930dcf3b20.
2021-01-13Fix T83411: Crash when using a workspace/layout data path in a driverSergey Sharybin
Building IDs which are not covered by copy-on-write process was not implemented, which was causing parameters block not present, and, hence causing crashes in areas which expected parameters to present. First part of this change is related on making it so Copy-on-Write is optional for ID nodes in the dependency graph. Second part is related on using a generic builder for all ID types which were not covered by Copy-on-Write before. The final part is related on making it so build_id() is properly handling ParticleSettings and Grease Pencil Data. Before they were not covered there at all, and they need special handling because they do have own build functions. Not sure it worth trying to split those parts, as they are related to each other and are not really possible to be tested standalone. Open for a second opinion though. Possible nut-tightening is to re-organize build_id() function so that every branch does return and have an assert at the end, so that missing ID type in the switch statement is easier to spot even when using compilers which do not report missing switch cases. As for question "why not use default" the answer is: to make it more explicit and clear what is a decision when adding new ID types. We do not want to quietly fall-back to a non-copy-on-write case for a newly added ID types. Differential Revision: https://developer.blender.org/D10075
2020-12-04Cleanup: Clang-Tidy, modernize-deprecated-headersSybren A. Stüvel
No functional changes.
2020-11-07Cleanup: Clang-tidy, modernize-concat-nested-namespacesAnkit Meel
2020-11-06Cleanup: Clang-Tidy modernize-use-nullptrSybren A. Stüvel
Replace `NULL` with `nullptr` in C++ code. No functional changes.
2020-11-06Cleanup: use ELEM macroCampbell Barton
2020-08-20Depsgraph: refactor tagging after time changesJacques Lucke
This reverts {rB1693a5efe91999b60b3dc0bdff727473b3bd00bb} and implements an alternative solution. The old patch had the problem that the depsgraph would always evaluate at the current frame of the original scene (even when `DEG_evaluate_on_framechange` was used). Now it is possible to evaluate the depsgraph at a specific frame without having to change the original scene. Reviewers: sergey, sybren Differential Revision: https://developer.blender.org/D8616
2020-08-07Cleanup: Depsgraph, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/depsgraph` module. No functional changes.
2020-08-07Clang-Tidy: Address readability-redundant-string-initSergey Sharybin
2020-08-04Refactor: rename SpaceType->new to SpaceType->createJacques Lucke
The data member `new` was conflicting with the `new` keyword when `BKE_screen.h` was included in C++ files. Reviewers: sergey Differential Revision: https://developer.blender.org/D8459
2020-07-22Simulation: improve depsgraph integrationJacques Lucke
A simulation data block has an embedded node tree, which requires special handling in a couple of places. Some of those places were missing beforehand. This also adds a relation to make sure that the simulation is evaluated after animations on the embedded node tree are evaluated.
2020-07-03Clang-Tidy: Enable redundant static qualifier warningSergey Sharybin
This change enables readability-static-definition-in-anonymous-namespace warning in .clang-tidy configuration.
2020-06-29Depsgraph: introduce blender::deg namespaceJacques Lucke
Reviewers: sergey Differential Revision: https://developer.blender.org/D8150
2020-06-26Fix T78071: Drivers reading object visibility not updating automaticallySybren A. Stüvel
A driver reading `Object.hide_viewport` would break when that object was hidden. Hidden objects don't have the `OBJECT_BASE_FLAGS` node in the depsgraph, but that node was required for the driver to work. Now the `OBJECT_FROM_LAYER` component (which optionally contains the `OBJECT_FROM_LAYER` node) has explicit `ENTRY` and `EXIT` nodes, which are used for relations with other components. These relations now remain valid, even when the `OBJECT_FROM_LAYER` node is absent. Differential Revision: https://developer.blender.org/D8124 Reviewed By: sergey
2020-06-15Fix unhandled RECALC options in depsgraph code after recent change.Bastien Montagne
Spotted by @LazyDodo on IRC, thanks.
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-28Depsgraph: Use BLI::Map in more placesJacques Lucke
Reviewers: sergey Differential Revision: https://developer.blender.org/D7519
2020-04-14Fix T75542: toggling modifier visibility not working correct with undo speedupBrecht Van Lommel
The problem was that in direct_link_id_restore_recalc, recalc_undo_accumulated should contain the changes from the target state to the current state. However it had already been cleared at that point, to start accumulating changes up to the next undo push. Delaying the clear of this flag seems like the obvious solution, but it's hard to find the right place for that (if there is one). Instead this splits up the flag into two separate variables. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D7402
2020-04-08Fix missed depsgraph update after undo in some casesBrecht Van Lommel
Forgot to take into account legacy DEG_id_tag_update with zero flag.
2020-04-07Undo: change depsgraph recalc flags handling to improve performanceBrecht Van Lommel
These changes only have an effect when the experimental Undo Speedup preference is enabled. * For DEG_id_tag_update, accumulate recalc flags immediately before the undo push happens instead of afterwards. Otherwise the undo state does not contain enough flags, and the current state may contain too many flags. This also means we call DEG_id_tag_update after undo with the accumulated flags to ensure they are flushed to other datablocks. * For undo, accumulate recalc flags in id->recalc and clear accumulated flags immediately. Not clearing would cause circular behavior where accumulated flags may never end up being cleared. This matches what happens after an undo push where these are also cleared, indicating that the undo state and current in-memory state match exactly. * Don't change id->recalc of identical datablocks, it should not be needed. There is one exception for armatures where pointers across datablocks exist which otherwise would cause problems. There may be a better solution to this but it seems to work in agent 327 production files. * This contains a change in undofile.c to avoid detecting all datablocks as changed for the first of the two undo steps, where we restore to the state of the last undo push before going to the one before. Without this the whole system is much less efficient. However this is unsafe in the sense that if an app handler or operators edits a datablock after an undo push, that change will not be undone. It can be argued that this is acceptable behavior, since a following undo push will include that change and this may already have unexpected side effects. Ref T60695 Differential Revision: https://developer.blender.org/D7339
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-03-19Cleanup/refactor: remove BKE_idcode, in favour of BKE_idtype.Bastien Montagne
Mpving utils from idcode to idtype proved to be somewhat painful for some reasons, but now all looks good. Had to add a fake/empty shell for the special snowflake too, `ID_LINK_PLACEHOLDER/INDEX_ID_NULL`...
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-03-17Add accumulated recalc flags to IDs.Bastien Montagne
Those accumulated flags get cleared every time an undo step is written to memfile. Preliminary work for undo-speedup. Part of T60695/D6580.
2020-01-28Cleanup: changed NULL to nullptr in depsgraph C++ codeSybren A. Stüvel
No functional changes.
2019-10-15Fix T70771: Texture nodes in Compositor causes infinite updateSergey Sharybin
2019-10-11Depsgraph: Inform when update or tag happens during evaluationSergey Sharybin
It is not allowed to do tagging or updates while dependency graph is in the middle of evaluation. This is something what is simple to violate from python code. This change adds some sanity checks. The request to update view layer or dependency graph will raise an exception in Python now, so it's easy for scripters to notice. Tagging for update will do silent return unless running with debug command line argument. This is because it's a bit tricky to know which exact dependency graph corresponds to a context from which an update tag was triggered. Differential Revision: https://developer.blender.org/D6035
2019-10-10Fix T65134: Duplicated proxies in several scenes don't workSergey Sharybin
This is something which worked in Blender 2.79. Need to do special trickery to ensure peoxy_from points to a proper object. Differential Revision: https://developer.blender.org/D6040
2019-10-09Fix missing clear of ID types tagsSergey Sharybin
Got lost in previous optimization commit.
2019-10-08Depsgraph: Avoid threading for trivial operationsSergey Sharybin
Found this while looking into T70463, solves the high spinning times mentioned in T70463#791026. Sounds logical that iterating over an array to modify a single property is faster than doing it in threads. But strangely, doing it for both nodes and its components is still faster in threads here. Gives extra speedup with a file mentioned in the report. Reviewed By: brecht, mont29 Differential Revision: https://developer.blender.org/D6017
2019-10-08Depsgraph: Don't force time update when legacy flag 0 is usedSergey Sharybin
2019-09-11Depsgraph: Introduce depsgraph registrySergey Sharybin
Allows to access dependency graphs created for render engines to inform them about changes in .blend file structure from the Python handlers. Reviewers: brecht Differential Revision: https://developer.blender.org/D5724
2019-09-11Depsgraph: Pass bmain to depsgraph object creationSergey Sharybin
Currently unused, but will allow to keep of an owner of the depsgraph. Could also simplify other APIs in the future by avoiding to pass bmain explicitly to relation update functions and things like that.