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-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-14Fix T89734: incorrect dependency cycle with id property on modifierJacques Lucke
Differential Revision: https://developer.blender.org/D11851
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-23Fix (studio reported) crash on Undo in some cases.Bastien Montagne
Would crash when adding or removing a collection directly to the master collection of a scene. Consequence of change to handle depsgraph-controlled evaluation of some IDs (like excluded collections which do not get evaluated and do not get a COW anymore). See rBcf4258673755 and D10907. Note that this mostly demonstrates once again how weak and flacky our handling of embedded IDs still remains, with some part of the code handling them as independent IDs, some as fully local/private data, some as a mix of both... and lots and lots of custom handling code and corner cases that are a bottomless pit of issues. Also quiet incredible that this was not reported already, luckily this original change did not make it to 2.93 release.
2021-05-25Cleanup: spellingCampbell Barton
2021-05-21Cleanup: use nullptrJacques Lucke
2021-05-21Fix T85752: Collection Instance Crash when instancing collections with ↵Bastien Montagne
disabled subcollections Root of the issue was actually hidden deep in depsgraph itself: it would not properly update all of its COW IDs using a datablock when depsgraph decides to evaluate or un-evaluate it. This would lead to evaluated IDs pointing to either: - orig IDs when there was an evaluated version of those (annoying bug, but not a crashing one). - old address of previously evaluated IDs that no longer exists in the depsgraph (causing the crash from the report e.g.). This commit adds an extra step at the end of nodes building, that goes over all of already existing IDs in the depsgraph to check whether they do one of the two things above, and tag them for COW update if so. NOTE: This only affects depsgraph (re-)building, not its evaluation. This remains consistent with the fact that operations that may change the depsgraph content (like Collection exclusion etc.) need to trigger a rebuild. NOTE: Performances: Worst case scenarii, like (un-)excluding a whole character collection in a production file, lead to 5% to 10% extra processing time in depsgraph building. Most of it comming from extra COW processing (in depsgraph's update in `build_step_finalize`), the detection loop itself only accounts for 1% to 2% of the whole building time. Maniphest Tasks: T85752 Differential Revision: https://developer.blender.org/D10907
2021-05-12Nodes: add boilerplate for texture and material socketsJacques Lucke
The sockets are not exposed in any nodes yet. They work similar to the Object/Collection sockets, which also just reference a data block. This is part of D11222.
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-02-05Depsgraph: Remove no-op evaluation functionSergey Sharybin
Make the SHADING_PARAMETERS operation on node tree a real no-op. The function used as a callback was only doing a debug print. The issue with this function was that an original ID was passed as an argument. This is a violation of design, and if anything it should be left up to the implementation to check whether depsgraph is active. There are no functional changes for users in the interface. The only difference is that the debug print will no longer happen.
2021-02-05Cleanup: Use lambda instead of function bindSergey Sharybin
More detailed explanation why it is a preferred way of coding nowadays can be found at https://clang.llvm.org/extra/clang-tidy/checks/modernize-avoid-bind.html Resolves modernize-avoid-bind Clang-Tidy warning. Differential Revision: https://developer.blender.org/D10320
2021-01-29Depsgraph: Remove redundant copy-on-write operationsSergey Sharybin
This change removes copy-on-write operations from ID nodes which do not need copy-on-write. Should be no functional changes, as before the copy-on-write operation would do nothing for those nodes anyway.
2021-01-29Fix 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
2021-01-29Fix T85139: Force field texture missing depsgraph relationPhilipp Oeser
If a force field was of type "Texture", any changes of that texture (e.g. its type - as reported in T85139 - or also its properties) were not properly updating rigid bodies and particle systems. Now ensure that texture is actually in the depsgraph and set up relation accordingly. Also fixes T75198. Maniphest Tasks: T85139 Differential Revision: https://developer.blender.org/D10234
2021-01-28Revert "Depsgraph: Remove redundant copy-on-write operations"Brecht Van Lommel
This reverts commit 76fd41e9db19dd2a33fae0e690f76792b13d49ed. This should have been reverted along with 0f95f51361d73fbd8ba8d80b3b65da930dcf3b20, since this change by itself is causing crashes when the depsgraph accesses a non-existent copy-on-write component. Ref T84717
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-13Depsgraph: Remove redundant copy-on-write operationsSergey Sharybin
This change removes copy-on-write operations from ID nodes which do not need copy-on-write. Should be no functional changes, as before the copy-on-write operation would do nothing for those nodes anyway.
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
2021-01-12Fix T84397: Creating and removing many objects very quickly causes a crashSergey Sharybin
The root of the issue was caused by the dependency graph using ID pointer to map evaluated state from old depsgraph to new one upon relations update. This was failing when IDs were re-allocated rapidly: was possible that Object ID's evaluated state assigned to Mesh and vice versa. Now depsgraph uses Session UUID to identify which IDs to restore evaluated state to. The session UUID is stored in the IDNode, so that id_orig is not dereferenced on depsgraph update since the ID might be freed. The root of the issue is identified by Campbell, original patch was done by Bastien, thanks! Also thanks to Oliver and Ray and everyone else for testing!
2020-12-19Cleanup: Split SEQ_sequencer.h fileRichard Antalik
2020-12-11Nodes: add Collection socket typeJacques Lucke
The implementation is pretty much the same as for Object sockets. The socket color is the one that is used for collections in the outliner. Part of D9739.
2020-12-07Cleanup: partial Clang-Tidy modernize-loop-convertSybren A. Stüvel
Modernize loops by using the `for(type variable : container)` syntax. Some loops were trivial to fix, whereas others required more attention to avoid semantic changes. I couldn't address all old-style loops, so this commit doesn't enable the `modernize-loop-convert` rule. Although Clang-Tidy's auto-fixer prefers to use `auto` for the loop variable declaration, I made as many declarations as possible explicit. To me this increases local readability, as you don't need to fully understand the container in order to understand the loop variable type. No functional changes.
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: use ELEM macroCampbell Barton
2020-11-01Rename BKE_sequencer.hRichard Antalik
Reviewed By: sergey Differential Revision: https://developer.blender.org/D9349
2020-10-19Spelling: MiscellaneousHarley Acheson
Corrects 34 miscellaneous misspelled words. Differential Revision: https://developer.blender.org/D9248 Reviewed by Campbell Barton
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-09-01Fix: Active rigidbodies would not recive updates after the stopped being ↵Sebastian Parborg
animated Because depsgraph isn't rebuild for animated properies, we have to assume that active bodies will always want to have updates from the rigidbody simulation.
2020-08-28Fix Rigidbody depsgraph passive and constraint transform relations.Sebastian Parborg
We need to have transforms from passive objects if they are animated or driven by parent relations. This is not immediately obvious as the object transform matrix will still be available, it is just one frame behind in some cases. Fixed dependency cycles if there is a constraint between two rigid bodies. Because bullet keeps track of its simulated bodies, we do not need to supply objects transforms as bullet should already have them. I need combine these two fixes because otherwise we will get depsgraph warnings that nodes are missing that it expects to be there. Reviewed By: Sergey, Jacques Differential Revision: http://developer.blender.org/D8732
2020-08-21Cleanup: rename iterators over sequences to be more clear about what they do.Bastien Montagne
No functional changes expected.
2020-08-03Merge branch 'blender-v2.90-release'Bastien Montagne
2020-08-03Fix T79222: Assert due to multiple building of same scene sequencer in ↵Bastien Montagne
depsgraph. Just check and skip building if it has already been done before. Thanks to @sergey for the help.
2020-07-30Fix T79117: dependency cycle with passive rigid body objectsJacques Lucke
Reviewers: zeddb Differential Revision: D8431
2020-07-22Depsgraph: build ids referenced by socketsJacques Lucke
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-16Fix T78920: missing depsgraph relation when using sound strips in VSESybren A. Stüvel
Having a sound strip in the VSE caused a missing relation error to be logged on the console. This was caused by the AUDIO depsgraph component not having an entry node. This commits adds that node, and sets up relations correctly. Differential Revision: https://developer.blender.org/D8290 Reviewed By: Sergey
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-25Revert "Fix T78071: Drivers reading object visibility not updating ↵Sybren A. Stüvel
automatically" This reverts commit baa0da3e69a1225cd18c075be5563c7d811b5347. The commit causes some issues I didn't foresee, I'd rather take the time to do it properly than hastily try and commit a fix for it.
2020-06-25Fix T78071: Drivers reading object visibility not updating automaticallySybren A. Stüvel
An object can be targeted by a driver that reads its `hide_viewport` or `hide_render` property. The existence of such a driver will create a relation between the 'sync base flags' depsgrpah node, and the datablock containing the driver. When the object is hidden, however, it has no base, and thus it had no 'sync base flags' depsgraph node. To support such a driver, that depsgraph node is now always added, but for hidden objects it will just be a no-op. If the node is not used by anything, it will be automatically disconnected and have a negligible effect on performance.
2020-06-23Fix T77712: Crash on proxied rig, custom bone shape, driver targeting rigSybren A. Stüvel
It turns out that `DepsgraphNodeBuilder::build_object_data_geometry(Object *object, bool is_object_visible)` was called for the custom shape with `is_object_visible=false` when there are drivers, and `is_object_visible=true` when there aren't any.
2020-06-10Depsgraph: use blender::Vector instead of std::vectorJacques Lucke
We decided that `blender::Vector` should be the default choice for a vector data structure in Blender. Reviewers: sergey Differential Revision: https://developer.blender.org/D7981
2020-05-28Depsgraoh: Fix missing texture node allocationSergey Sharybin
It was causing wrong binding for image animation: since there was no ID node for texture at the moment of build_animdata original texture ID was passed to the callback. This is not what is supposed to happen. This is part of fix for T65889.
2020-05-25Simulations: pass simulation data block to update functionJacques Lucke
2020-05-25Merge remote-tracking branch 'origin/blender-v2.83-release'Sybren A. Stüvel
2020-05-25Fix T76897: Lamp Power Not Updating from DriverSybren A. Stüvel
Lamps were not tagged with `ID_RECALC_SHADING` when they were updated from drivers. As a result, Cycles considered the lamp as unchanged. This is resolved by having a (seemingly non-functional) callback in a new `LIGHT_UPDATE` depsgraph node. This patch unconditionally adds the `LIGHT_UPDATE` node + the relation from the lamp's PARAMETERS node. Differential Revision: https://developer.blender.org/D7822 Reviewed by: brecht
2020-05-19Merge branch 'blender-v2.83-release'Philipp Oeser