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-06-22Cleanup: Spelling MistakesLeon Zandman
This patch fixes many minor spelling mistakes, all in comments or console output. Mostly contractions like can't, won't, don't, its/it's, etc. Differential Revision: https://developer.blender.org/D11663 Reviewed by Harley Acheson
2021-06-16BLI: add C++ wrapper for task isolationJacques Lucke
This makes it easier to use task isolation in c++ code. Previously, one either had to check `WITH_TBB` (possibly indirectly through `WITH_OPENVDB`) or one had to use the C function which is less convenient.
2021-06-15BLI: use explicit task isolation, no longer part of parallel operationsBrecht Van Lommel
After looking into task isolation issues with Sergey, we couldn't find the reason behind the deadlocks that we are getting in T87938 and a Sprite Fright file involving motion blur renders. There is no apparent place where we adding or waiting on tasks in a task group from different isolation regions, which is what is known to cause problems. Yet it still hangs. Either we do not understand some limitation of TBB isolation, or there is a bug in TBB, but we could not figure it out. Instead the idea is to use isolation only where we know we need it: when holding a mutex lock and then doing some multithreaded operation within that locked region. Three places where we do this now: * Generated images * Cached BVH tree building * OpenVDB lazy grid loading Compared to the more automatic approach previously used, there is the downside that it is easy to miss places where we need isolation. Yet doing it more automatically is also causing unexpected issue and bugs that we found no solution for, so this seems better. Patch implemented by Sergey and me. Differential Revision: https://developer.blender.org/D11603
2021-04-26Cleanup: Replace modifyVolume with modifyGeometrySetHans Goudey
This allows us to remove a callback from the modifier type info struct. In the future the these modifiers might just be replaced by nodes internally anyway, but in the meantime it's nice to unify the handling of evaluated geometry a bit. Differential Revision: https://developer.blender.org/D11080
2021-04-20Geometry Nodes: support geometry nodes modifier on volume objectsJacques Lucke
Differential Revision: https://developer.blender.org/D11011
2021-04-08BKE: Refactor volume bounding box codeHans Goudey
This commit splits of the function that generates a bounding box for a volume into a new function, so that the min and max coordinate can be retrieved from volume data without an object. Also some cleanup: using the float3 type.
2021-04-08BKE: Add a utility to transform a shallow copy of a volume gridHans Goudey
Often you need to apply a transformation to a grid without changing the original, and it's necessary to avoid a deep copy of the actual data. OpenVDB has a function to do this, this commit simply adds a wrapper to transform and use that function with blender's `float4x4` data type. Split from D10906
2021-04-08Cleanup: Use const arguments for volume codeHans Goudey
The problem was that you could getting write access to a grid from a `const Volume *` without breaking const correctness. I encountered this when working on support for volumes in the bounding box node. For geometry nodes there is an important distinction between getting data "for read" and "for write", with the former returning a `const` version of the data. Also, for volumes it was necessary to cast away const, since all of the relevant functions in `volume.cc` didn't have const versions. This patch adds `const` in these places, distinguising between "for read" and "for write" versions of functions where necessary. The downside is that loading and unloading in the global volume cache needs const write-access to some member variables. I see that as an inherent problem that comes up with caching that never has a beautiful solution anyway. Some of the const-ness could probably be propogated futher in EEVEE code, but I'll leave that out, since there is another level of caching. Differential Revision: https://developer.blender.org/D10916
2021-04-08Cleanup: enable modernize-use-equals-default checkJacques Lucke
This removes a lot of unnecessary code that is generated by the compiler automatically. In very few cases, a defaulted destructor in a .cc file is still necessary, because of forward declarations in the header. I removed some defaulted virtual destructors, because they are not necessary, when the parent class has a virtual destructor already. Defaulted constructors are only necessary when there is another constructor, but the class should still be default constructible. Differential Revision: https://developer.blender.org/D10911
2021-02-25Refactor: IDTypeInfo: Add `owner_get` to get owner of embedded IDs.Bastien Montagne
This concerns currently only collections (`master_collection` of scenes) and root node trees. It removes the matching type-specific helpers (`BKE_collection_master_scene_search` and `BKE_node_tree_find_owner_ID`). No functional change expected here. NOTE: Current implementation of `owner_get` is far from optimal, we could probably do it better, see {T69169}. NOTE: While it could also have it, shapekeys IDTypeInfo was left out of this change for now. Mainly because it sould not be used currently, and we ultimately want to demote shape keys from ID status anyway.
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-02Cleanup: take grid reference instead of shared pointer as parameterJacques Lucke
This makes the function usable in more contexts.
2021-01-22LibOverride: Add an 'post apply' callback to IDTypeInfo.Bastien Montagne
Currently this is needed to properly tag PointCache's for info update (fixes an issue reported in T82503). Suspect we may need this in more cases in the future though, RNA assign/update processes are not always 100% enough to deal with complicated corner cases.
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-19Volumes: fix calling BKE_volume_load from multiple threadsJacques Lucke
`BKE_volume_is_loaded` uses `grids.filepath` to determine if the grids are already loaded. The issue was that `grids.filepath` was set before the grids were loaded, resulting in incorrect early returns for other threads. Differential Revision: https://developer.blender.org/D10150
2021-01-05Cleanup: clang tidyJacques Lucke
2020-12-14LibOverride: Do not store some heavy data from override IDs.Bastien Montagne
This commit removes geometry from meshes and shapekeys, and embedded files, from liboverride IDs. This data is never overrideable, there is no reason to store extra useless copies of it in production files. See T78944. Note that we may add more data to be skipped on write for liboverrides in the future, but this commit should address all the most important cases already. Reviewed By: brecht Differential Revision: https://developer.blender.org/D9810
2020-11-09Cleanup: Clang-tidy, modernize-use-nullptr.Ankit Meel
2020-11-09Cleanup: clang-formatCampbell Barton
2020-11-06Cleanup: Clang-Tidy modernize-use-nullptrSybren A. Stüvel
Replace `NULL` with `nullptr` in C++ code. No functional changes.
2020-11-04Merge branch 'blender-v2.91-release' into masterJacques Lucke
2020-11-04Fix T82393: Volume to Mesh modifier with sequence fails during renderingJacques Lucke
The issue was that the volume for the current frame might not have been loaded already by the time the modifier runs. The solution is simply to make sure that the volume is loaded. This is similar to the Volume Displace modifier.
2020-11-03Add a callback to `IDTypeInfo` to allow preservation of some data accross ↵Bastien Montagne
memfile undos This is essentially adding that new callback, and using it only for already existing Scene's 3DCursor. Note that the place where this is called has been moved again, after all have been lib-linked, such that those callbacks may also work on ID pointers. Maniphest Tasks: T71759 Differential Revision: https://developer.blender.org/D9237
2020-10-20Volumes: Fix compilation when building without openVDBClément Foucault
And remove a warning.
2020-10-20Volumes: simplify volumes in modifiers or on loadJacques Lucke
This changes how the simplify volumes setting works. Before, it only affeted viewport rendering. This was an issue, because all internal computations would still have to happen on the high resolution volumes. With this patch, the simplify setting already affects file loading and procedural generation of volumes. Rendering does not have to care about the simplify option anymore, it just gets the correct simplified version from the depsgraph. Reviewers: brecht Differential Revision: https://developer.blender.org/D9176
2020-10-12Cleanup: remove duplicate codeJacques Lucke
This code segment is exactly the same as above. Looks like it was copied accidentally.
2020-10-09Revert "CleanUp: Introduce `eMeshBatchDirtyMode` enum"Jeroen Bakker
This reverts commit 0796807720882731cdb70be144aa182e9b0b9ee5.
2020-10-08Cleanup/refactor: `BKE_libblock_alloc` -> `BKE_id_new` in ID creation code.Bastien Montagne
Better use higher-level code from common ID management when possible. Helps to de-duplicate logic, and reduces outside usages of more 'dangerous' functions. Note that we could get rid of many of those `BKE_<id_type>_add` functions now, but on the other hand several of those take extra parameters and perform additional actions, so think we can keep them all for now as 'non-standard ID specific creation functions'.
2020-10-07Refactor: remove `BKE_<id_type>_copy` functions.Bastien Montagne
Those were only shallow wrappers around `BKE_id_copy`, barely used (even fully unused in some cases), and we want to get rid of those ID-specific helpers for the common ID management tasks. Also prevents weird custom behaviors (like `BKE_object_copy`, who was the only basic ID copy function to reset user count of the new copy to zero). Part of 71219.
2020-10-07Refactor `BKE_id_copy` to return the new ID pointer.Bastien Montagne
No reasons to keep the new ID pointer as parameter here. Part of T71219.
2020-10-07Refactor `BKE_id_copy_ex` to return the new ID pointer.Bastien Montagne
Note that possibility to pass the new ID pointer as parameter was kept, as this is needed for some rather specific cases (like in depsgraph/COW, when copying into already allocated memory). Part of T71219.
2020-10-07Python API: add volume.grids.save(filepath) to save grids and metadata to diskBrecht Van Lommel
Particularly useful now that we can dynamically generate volume using modifiers. Not exposed in the user interface currently, but it can be used by add-ons that need to export an entire scene including volumes.
2020-10-07CleanUp: Introduce `eMeshBatchDirtyMode` enumJeroen Bakker
It used to be an `int mode`.
2020-10-05Fix building without OPENVDBCampbell Barton
2020-10-05Volumes: more generic way to handle different openvdb typesJacques Lucke
Reviewers: brecht Differential Revision: https://developer.blender.org/D9093
2020-10-03Cleanup: Remove/replace C standard library assert() and header usagesJulian Eisel
We have our own assert implementation, `BLI_assert()` that is prefered over the C standard library one. Its output is more consistent across compilers and makes termination on assert failure optional (through `WITH_ASSERT_ABORT`). In many places we'd include the C library header without ever accessing it.
2020-10-01Volumes: copy display settings in BKE_volume_new_for_evalJacques Lucke
2020-09-11Refactor: move Volume .blend I/O to IDTypeInfo callbacksJacques Lucke
2020-09-04Cleanup: Clang-Tidy readability-const-return-type fixesSybren A. Stüvel
No functional changes.
2020-08-28IDTypeInfo: add .blend file io callbacksJacques Lucke
This is part of T76372. It adds the `blend_write`, `blend_read_data`, `blend_read_lib` and `blend_read_expand` which correspond to the various steps when reading and writing .blend files. Having these callbacks allows us to decentralize the blenloader code a lot more. This has the affect that code related to any specific ID type is less scattered. Reviewers: mont29 Differential Revision: https://developer.blender.org/D8670
2020-08-07Cleanup: Blenkernel, 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/blenkernel` module. No functional changes.
2020-08-06Cycles: load OpenVDB file earlier in Blender exportBrecht Van Lommel
In an upcoming bugfix we'll use OpenVDB data structures directly to build mesh for sparse OpenVDB volumes, loading them OpenVDB grids earlier and removing any references to Blender data structures makes that easier. This also makes changes to Blender volumes to support this, so Cycles can take ownership of a grid without Blender having to keep its own reference to it. This should also be useful in a future Python API. Ref D8401
2020-07-06Fix T78608: Memory leak in Material properties: "Data from SCE".Bastien Montagne
Caused by recent own refactor of cache presevation handling in readfile, EEVEE's lightcache are weird birds that can also be saved in .blend files, need a special handling for those 'persistent' caches...
2020-07-03Move volume to new cache management system for undo.Bastien Montagne
2020-07-03Clang-tidy: enable readability-container-size-empty warningJacques Lucke
Reviewers: sergey Differential Revision: https://developer.blender.org/D8197
2020-05-20Refactor: Move pointcloud and volume foreach_id to new IDTypeInfo structure.Bastien Montagne
2020-05-20Cleanup: Keep common IDTypeInfo code separated from ID type specific API.Bastien Montagne
Also remove useless IDTypeInfo callbacks.
2020-05-08Fix T76498: Refactoring - Rename BKE modifiers funtionsAntonio Vazquez
2020-05-07Merge branch 'blender-v2.83-release'Brecht Van Lommel
2020-05-07Fix T76468: volume sequence render not using correct frame in rendersBrecht Van Lommel
Render datablocks were copying state from original datablocks, where the frame number and loaded volume grids were out of sync.