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-02-06UI: Fix Typos in Comments and Docsluzpaz
Approximately 91 spelling corrections, almost all in comments. Differential Revision: https://developer.blender.org/D10288 Reviewed by Harley Acheson
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 raw string literalSergey Sharybin
Resolves modernize-raw-string-literal Clang-Tidy warning The way warning works is it suggests to use raw literal when overhead of having escape characters is higher than the overhead of having raw literal syntax (talking about code size overhead). This means that the warning will not trigger for "foo\"bar". Differential Revision: https://developer.blender.org/D10322
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-29Merge branch 'blender-v2.92-release'Brecht Van Lommel
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 T84717: missing 3D viewport updates when changing shading settingsBrecht Van Lommel
Previously this relied on the dependency graph to detect changes in the screen datablock, which would then notify the renderers. This was rather indirect an not even really by design. Instead use notifiers to tag specific 3D viewports to be updated. Includes changes to BKE_scene_get_depsgraph to accept a const Scene pointer. Testing if this works correctly requires adding back commits 81d444c and 088904d, since those have been temporarily reverted. Differential Revision: https://developer.blender.org/D10235
2021-01-29Geometry Nodes: missing null check for volume objectsJacques Lucke
The problem was found by Dalai in T84606.
2021-01-29Merge branch 'blender-v2.92-release'Philipp Oeser
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-29Merge remote-tracking branch 'origin/blender-v2.92-release'Dalai Felinto
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-28Merge branch 'blender-v2.92-release'Sergey Sharybin
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-27Merge branch 'blender-v2.92-release'Sergey Sharybin
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-22Cleanup: correct last spelling cleanupCampbell Barton
2021-01-22Cleanup: spelling, remove outdated/invalid commentsCampbell Barton
2021-01-21Geometry Nodes: initial support for volumesJacques Lucke
For the most part, this just adds boilerplate code for volume support in geometry nodes: * Add `VolumeComponent` next to `MeshComponent`, etc. * Support `VolumeComponent` in depsgraph object iterator. Furthermore, I added initial volume support in a few nodes: * The Object Info node outputs an object instance when the input is a volume object (that will be the same for mesh objects soonish, to avoid copies). * Support transforming a `VolumeComponent` in the Transform node. * Support the `VolumeComponent` in Join Geometry nodes, but only when just one of the inputs has a volume component for now. Right now, there is no way to create a `VolumeComponent`, because the Object Info node outputs an object instance. The `VolumeComponent` will be necessary for upcoming nodes, which will generate volumes on the fly. Viewport selection does not work correctly with `VolumeComponent`s currently. I don't know why that is. That can be figured out a bit later, once we can actually create new volumes in geometry nodes. Ref T84604. Differential Revision: https://developer.blender.org/D10147
2021-01-20Cleanup: spellingCampbell Barton
2021-01-18Fix T84250: Eevee world/material parameter animation not updating the viewportPhilipp Oeser
The WORLD_UPDATE operation (needed to free the gpu material) was already defined in DepsgraphNodeBuilder::build_world, but corresponding relation was only set up for changes in the nodetree, not for changes in the world/material itself in DepsgraphRelationBuilder::build_world. Direct changes to these surface properties in the UI were updating properly through RNA property update callbacks, but these are not called from the animation system. So now add these relations in the depsgraph. Not 100% sure this is the right place for this (since e.g. eevee engine seems to handle e.g. animated light paramters just fine through EEVEE_cache_populate / eevee_light_setup, but properly freeing gpu materials wont happen for worlds in e.g eevee_id_world_update and also not for materials) Maniphest Tasks: T84250 Differential Revision: https://developer.blender.org/D9959
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-19Cleanup: Rename BKE_sequencer functionsRichard Antalik
API functions get SEQ_ prefix. Intern functions get seq_ prefix Functions also have appropriate category included in name.
2020-12-16Cleanup: remove redundant struct declarationsCampbell Barton
2020-12-15Geometry Nodes: support evaluating mesh object to geometry setJacques Lucke
This implements the design proposed in T83357. The goal is to allow the geometry nodes modifier on mesh objects to output instances and potentially other geometry types. Both problems are tackled by allowing mesh objects to evaluate to a geometry set, instead of just a single mesh id data block. The geometry set can contain a mesh but also other data like instances and a point cloud. I can't say that I'm sure that this commit won't introduce bugs. Mainly the temporary object creation during rendering seems a bit brittle. BUT, we can be reasonably sure that this commit will not introduce regressions (at least not ones, that are hard to fix). This is because the code has been written in a way that minimizes changes for existing functionality. Given that we intend to hide the point cloud object for the next release, we won't even have to worry about temporary object creation for now. An important part of the technical design is to make sure that `ObjectRuntime->data_eval` contains the same data before and after this patch. This helps to make sure, that existing code paths are impacted as little as possible. Instead of fully replacing `data_eval`, there is `geometry_set_eval`, which contains all the geometry components an object evaluated to (including the data referenced by `data_eval`). For now, not much code has to be aware of `geometry_set_eval`. Mainly the depsgraph object iterator and the instances system have to know about it. Reviewers: brecht Differential Revision: https://developer.blender.org/D9851
2020-12-15Cleanup: reduce indirect DNA header inclusionCampbell Barton
Remove DNA headers, using forward declarations where possible. Also removed duplicate header, header including it's self and unnecessary inclusion of libc system headers from BKE header.
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-09Cleanup: various clang tidy fixesJacques Lucke
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-use-usingSybren A. Stüvel
Replace `typedef` with `using` in C++ code. In the case of `typedef struct SomeName { ... } SomeName;` I removed the `typedef` altogether, as this is unnecessary in C++. Such cases have been rewritten to `struct SomeName { ... };` No functional changes.
2020-12-04Cleanup: Clang-Tidy, modernize-use-overrideSybren A. Stüvel
No functional changes.
2020-12-04Cleanup: Clang-Tidy, modernize-deprecated-headersSybren A. Stüvel
No functional changes.
2020-12-02Geometry Nodes: support geometry components in depsgraph object iteratorJacques Lucke
Objects can evaluate to a geometry set instead of a single ID (only point cloud objects for now). In the depsgraph object iterator, the evaluated geometry components are expanded into temporary objects. It's important to note that instanced objects can also contain geometry components. Therefore, they have to be split up into multiple objects as well in some cases. At a high level the iterator works like so: ``` for object in depsgraph: for component in object: yield object_from_component(component) for dupli in make_duplis_list(object): for component in dupli: yield object_from_component(component) ``` DEG_iterator_objects_next has been cleaned up, to make this structure a bit more apparent. This should not change anything for objects that are not point clouds.
2020-12-02Geometry Nodes: initial scattering and geometry nodesJacques Lucke
This is the initial merge from the geometry-nodes branch. Nodes: * Attribute Math * Boolean * Edge Split * Float Compare * Object Info * Point Distribute * Point Instance * Random Attribute * Random Float * Subdivision Surface * Transform * Triangulate It includes the initial evaluation of geometry node groups in the Geometry Nodes modifier. Notes on the Generic attribute access API The API adds an indirection for attribute access. That has the following benefits: * Most code does not have to care about how an attribute is stored internally. This is mainly necessary, because we have to deal with "legacy" attributes such as vertex weights and attributes that are embedded into other structs such as vertex positions. * When reading from an attribute, we generally don't care what domain the attribute is stored on. So we want to abstract away the interpolation that that adapts attributes from one domain to another domain (this is not actually implemented yet). Other possible improvements for later iterations include: * Actually implement interpolation between domains. * Don't use inheritance for the different attribute types. A single class for read access and one for write access might be enough, because we know all the ways in which attributes are stored internally. We don't want more different internal structures in the future. On the contrary, ideally we can consolidate the different storage formats in the future to reduce the need for this indirection. * Remove the need for heap allocations when creating attribute accessors. It includes commits from: * Dalai Felinto * Hans Goudey * Jacques Lucke * Léo Depoix
2020-11-24Viewport: cannot select object by clicking on its instancesJacques Lucke
Selecting an object by clicking on its instances only worked, when the object itself is visible. However, it is possible to hide the object and still keep the instances visible. The solution is to give every object the correct `select_id` in the depsgraph object iterator right before rendering. Reviewers: fclem, brecht Differential Revision: https://developer.blender.org/D9640
2020-11-17Clang-tidy, fix bugprone-exception-escape.Ankit Meel
Remove redundant call to `ofstream::close()` from `~PSStrokeRenderer` and `~TextStrokeRenderer`. ofstream will be destructed automatically. - For `~Depsgraph`, `std::function`'s constructor can throw. - Passing throwing statements in the lambda will not be detected by clang-tidy. Fix these issues by using lambda as function argument. Reviewed By: sergey, sybren Differential Revision: https://developer.blender.org/D9497
2020-11-16Cleanup: clang-formatCampbell Barton
2020-11-12Merge branch 'blender-v2.91-release' into masterPhilipp Oeser
2020-11-12Fix asserts when two (or more) SplineIK constraints have the same rootPhilipp Oeser
Only a single DEG operation node `POSE_SPLINE_IK_SOLVER` should be added in this case [ see `build_splineik_pose`, same is already done for overlapping IK in `build_ik_pose`] ref T82347. Reviewers: sybren Maniphest Tasks: T82347 Differential Revision: https://developer.blender.org/D9471
2020-11-09Cleanup: fix some clang tidy issuesJacques Lucke
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: Clang-Tidy, modernize-use-bool-literalsSergey Sharybin
2020-11-06Cleanup: Clang-Tidy, modernize-redundant-void-argSergey Sharybin
2020-11-06Cleanup: Clang-Tidy, readability-redundant-member-initSergey Sharybin
2020-11-06Cleanup: use STR_ELEM macroCampbell Barton