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-09-02Cleanup: Remove unnecessary struct keyword usage in node editorHans Goudey
2022-08-27Cleanup: pass notifiers as constCampbell Barton
2022-05-24Drag & drop: Use session UUID of IDs instead of name for droppingJulian Eisel
Dropping would pass the name of the ID to drop to the properties of the drop operator. This would then lookup the ID by name. With linking and/or library overrides, multiple IDs of the same name and type may exist, which is why the session UUID should be used instead. All operators used for dropping support this now and the drop code passes the session UUID instead of the name. Also see 917c096be6b9 and 8f79fa9c6780. Some drop operators were already using the session UUIDs. This converts the remaining ones. The "name" property is kept working as before, since some scripts use this. Side-effect: The "Name" property won't show up in the Adjust Last Operation anymore, which was the case for some of these operators, and its value won't be remembered over multiple executions of the operator. Both were not at all useful from what I can tell, and I doubt this was done intentionally.
2022-05-18Fix build error on WIN32 from `_bpy.context_members`Campbell Barton
As of [0] which references context arrays from the Python API, C++ name mangling caused 'node_context_dir' not to be found for WIN32. [0]: c8edc458d13c0483907d0fe6f44f6e2887263b57
2022-05-06Cleanup: spelling in comments, use doxygen commentsCampbell Barton
2022-05-05Fix T97575: Toggling fullscreen causes compositor recalcCampbell Barton
The root of the issue is that compositor is using refresh mechanism to handle recalc. The safest fix which does not require deep refactor is to check to whether node space was tagged for refresh from listener (currently it is listeners which are responsible for tackling compositor tree recalc). Differential Revision: https://developer.blender.org/D14856
2022-04-28VSE: Add precise drag and drop and strip previewsSebastian Parborg
This patch adds the drag and drop strip previews in the VSE. It also adds two new functions to the drag and drop API. 1. "draw_in_view" for callbacks that wants to draw elements in local viewport coordinates 2. "on_drag_start" that can be used for prefetching data only once at the start of the drag. Reviewed By: Julian, Campbell Differential Revision: http://developer.blender.org/D14560
2022-03-19Revert "Compositor: Support backdrop offset for the Viewer node"Brecht Van Lommel
This reverts commit 33409f9f1cd42e899f2706fe7878e5e89b50d617, as it breaks panning in the image editor. Fixes T96543
2022-03-17Compositor: Support backdrop offset for the Viewer nodeHabib Gahbiche
This is only part of the experimental "Full Frame" mode (disabled by default). See T88150. Currently the viewer node uses buffer paddings to display image offset in the backdrop as a temporal solution implemented for {D12466}. This solution is inefficient memory and performance-wise. Another issue is that the paddings are part the image when saved. This patch instead sets the offset in the Viewer node image as variables and makes the backdrop take it into account when drawing the image or any related gizmo. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D12750
2022-03-16Geometry Nodes: Remove legacy node codeHans Goudey
This commit removes the implementations of legacy nodes, their type definitions, and related code that becomes unused. Now that we have two releases that included the legacy nodes, there is not much reason to include them still. Removing the code means refactoring will be easier, and old code doesn't have to be tested and maintained. After this commit, the legacy nodes will be undefined in the UI, so 3.0 or 3.1 should be used to convert files to the fields system. The net change is 12184 lines removed! The tooltip for legacy nodes mentioned that we would remove them before 4.0, which was purposefully a bit vague to allow us this flexibility. In a poll in a devtalk post showed that the majority of people were okay with removing the nodes. https://devtalk.blender.org/t/geometry-nodes-backward-compatibility-poll/20199 Differential Revision: https://developer.blender.org/D14353
2022-03-14Auto-generate RNA-structs declarations in `RNA_prototypes.h`Julian Eisel
So far it was needed to declare a new RNA struct to `RNA_access.h` manually. Since 9b298cf3dbec we generate a `RNA_prototypes.h` for RNA property declarations. Now this also includes the RNA struct declarations, so they don't have to be added manually anymore. Differential Revision: https://developer.blender.org/D13862 Reviewed by: brecht, campbellbarton
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-01-28Fix typo in comment.temp-T95279-remap-referenced-dataJeroen Bakker
2022-01-26ID: Fix failing test cases.Jeroen Bakker
This fixes failing test cases when using `make test`. See {D13615} for more information. The fix will perform the id remapping one item at a time. Although not really nice, this isn't a bottleneck. The failing test cases is because space_node stores pointers multiple times and didn't update all pointers. It was not clear why it didn't do it, but changing the behavior more to the previous behavior fixes the issue at hand. I prefer to remove the double storage of the node tree pointers (in snode and path) to reduce pointer management complexity.
2022-01-26Performance: Remap multiple items in UIJeroen Bakker
During sprite fright loading of complex scenes would spend a long time in remapping ID's The remapping process is done on a per ID instance that resulted in a very time consuming process that goes over every possible ID reference to find out if it needs to be updated. If there are N of references to ID blocks and there are M ID blocks that needed to be remapped it would take N*M checks. These checks are scattered around the place and memory. Each reference would only be updated at most once, but most of the time no update is needed at all. Idea: By grouping the changes together will reduce the number of checks resulting in improved performance. This would only require N checks. Additional benefits is improved data locality as data is only loaded once in the L2 cache. It has be implemented for the resyncing process and UI editors. On an Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz 16Gig the resyncing process went from 170 seconds to 145 seconds (during hotspot recording). After this patch has been applied we could add similar approach to references (references between data blocks) and functionality (tagged deletion). In my understanding this could reduce the resyncing process to less than a second. Opening the village production file between 10 and 20 seconds. Flame graphs showing that UI remapping isn't visible anymore (`WM_main_remap_editor_id_reference`) * Master {F12769210 size=full} * This patch {F12769211 size=full} Reviewed By: mont29 Maniphest Tasks: T94185 Differential Revision: https://developer.blender.org/D13615
2022-01-25Revert "Performance: Remap multiple items in UI"Jeroen Bakker
This reverts commit 948211679f2a0681421160be0d3b90f507bc0be7. This commit introduced some regressions in the test suite. As this change is a core part of blender Bastien and I decided to revert it as the solution isn't clear and needs more investigation. The following tests FAILED: 62 - blendfile_liblink (SEGFAULT) 63 - blendfile_library_overrides (SEGFAULT) It fails in (id_us_ensure_real)
2022-01-25Performance: Remap multiple items in UIJeroen Bakker
During sprite fright loading of complex scenes would spend a long time in remapping ID's The remapping process is done on a per ID instance that resulted in a very time consuming process that goes over every possible ID reference to find out if it needs to be updated. If there are N of references to ID blocks and there are M ID blocks that needed to be remapped it would take N*M checks. These checks are scattered around the place and memory. Each reference would only be updated at most once, but most of the time no update is needed at all. Idea: By grouping the changes together will reduce the number of checks resulting in improved performance. This would only require N checks. Additional benefits is improved data locality as data is only loaded once in the L2 cache. It has be implemented for the resyncing process and UI editors. On an Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz 16Gig the resyncing process went from 170 seconds to 145 seconds (during hotspot recording). After this patch has been applied we could add similar approach to references (references between data blocks) and functionality (tagged deletion). In my understanding this could reduce the resyncing process to less than a second. Opening the village production file between 10 and 20 seconds. Flame graphs showing that UI remapping isn't visible anymore (`WM_main_remap_editor_id_reference`) * Master {F12769210 size=full} * This patch {F12769211 size=full} Reviewed By: mont29 Maniphest Tasks: T94185 Differential Revision: https://developer.blender.org/D13615
2022-01-21Fix Python API docs build errorHans Goudey
There is probably a better solution that's possible, but the few other things I tried didn't work, and the build error should be resolved for the buildbots. This is similar to the "breaks" in the namespace for functions declared in `ED_node.h`.
2022-01-20Cleanup: Move node editor files to proper namespaceHans Goudey
This commit moves code in all node editor files to the `blender::ed::space_node` namespace, except for C API functions defined in `ED_node.h`, which can only be moved once all areas calling them are moved to C++. The change is fairly straightforward, I just moved a couple of "ED_" code blocks around to make the namespace more contiguous, and there's the method for adding a pointer to a struct in a C++ namespace in DNA. Differential Revision: https://developer.blender.org/D13871
2022-01-18Cleanup: Remove unused node editor toolbar fileHans Goudey
This file was added nine years ago, and was unused then. Now with active tools we use a different approach to create toolbars, so the file is not relevant.
2022-01-11Cleanup: Remove unused "active ID" node flagHans Goudey
The value of this flag was only retrieved in `nodeGetActiveID`, which wasn't used anywhere. Other than that, the `NODE_ACTIVE_ID` and related functions seem to come from the Blender internal renderer. Differential Revision: https://developer.blender.org/D13770
2021-12-25Cleanup: use new c++ guarded allocator APIAaron Carlisle
API added in rBa3ad5abf2fe85d623f9e78fefc34e27bdc14632e
2021-12-21Nodes: refactor node tree update handlingJacques Lucke
Goals of this refactor: * More unified approach to updating everything that needs to be updated after a change in a node tree. * The updates should happen in the correct order and quadratic or worse algorithms should be avoided. * Improve detection of changes to the output to avoid tagging the depsgraph when it's not necessary. * Move towards a more declarative style of defining nodes by having a more centralized update procedure. The refactor consists of two main parts: * Node tree tagging and update refactor. * Generally, when changes are done to a node tree, it is tagged dirty until a global update function is called that updates everything in the correct order. * The tagging is more fine-grained compared to before, to allow for more precise depsgraph update tagging. * Depsgraph changes. * The shading specific depsgraph node for node trees as been removed. * Instead, there is a new `NTREE_OUTPUT` depsgrap node, which is only tagged when the output of the node tree changed (e.g. the Group Output or Material Output node). * The copy-on-write relation from node trees to the data block they are embedded in is now non-flushing. This avoids e.g. triggering a material update after the shader node tree changed in unrelated ways. Instead the material has a flushing relation to the new `NTREE_OUTPUT` node now. * The depsgraph no longer reports data block changes through to cycles through `Depsgraph.updates` when only the node tree changed in ways that do not affect the output. Avoiding unnecessary updates seems to work well for geometry nodes and cycles. The situation is a bit worse when there are drivers on the node tree, but that could potentially be improved separately in the future. Avoiding updates in eevee and the compositor is more tricky, but also less urgent. * Eevee updates are triggered by calling `DRW_notify_view_update` in `ED_render_view3d_update` indirectly from `DEG_editors_update`. * Compositor updates are triggered by `ED_node_composite_job` in `node_area_refresh`. This is triggered by calling `ED_area_tag_refresh` in `node_area_listener`. Removing updates always has the risk of breaking some dependency that no one was aware of. It's not unlikely that this will happen here as well. Adding back missing updates should be quite a bit easier than getting rid of unnecessary updates though. Differential Revision: https://developer.blender.org/D13246
2021-12-15Cleanup: Remove no-op node preview function callsHans Goudey
This patch removes no-op node editor preview code (`PR_NODE_RENDER`) and most calls to `BKE_node_preview_init_tree`. The only remaining call is in the compositor. - Shader nodes previews don't seem to do anything. - In-node previews for the texture node system doesn't work either. This is a first step to refactoring to remove `preview_xsize`, `preview_ysize`, and `prvr` from nodes in DNA, aligned with the general goal of removing runtime/derived data from data structs. Differential Revision: https://developer.blender.org/D13578
2021-12-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-12-08Cleanup: Clang-Tidy modernize-redundant-void-argAaron Carlisle
2021-12-04Cleanup: Use references in node editor, other improvementsHans Goudey
This helps to tell when a pointer is expected to be null, and avoid overly verbose code when dereferencing. This commit also includes a few other cleanups in this area: - Use const in a few places - Use `float2` instead of `float[2]` - Remove some unnecessary includes and old code The change can be continued further in the future.
2021-12-03Cleanup: Const, use references, C++ typesHans Goudey
Also remove some unnecessary includes
2021-12-02UI: Add an option to display the node editor context pathHans Goudey
Since we have the overlays popover, it makes sense to allow toggling the context path like in the 3D viewport. This commit adds a property, and turns it on by default in existing files. Differential Revision: https://developer.blender.org/D13248
2021-11-19Cleanup: Simplify node editor link dragging storageHans Goudey
Now that `node_intern.hh` is a C++ header, we can use C++ types there. This patch replaces the linked list of dragged links with a vector. Also, the list of drag operator custom data, `nldrag`, doesn't seem to need to be a list at all, so I just made it a unique pointer. Differential Revision: https://developer.blender.org/D13252
2021-11-19Merge branch 'blender-v3.0-release'Jacques Lucke
2021-11-18Node Editor: Change minimum zoomErik
Now with Geometry Nodes in Blender, trees can become much bigger than before. This changes the minimum zoom value in the node editor. Differential Revision: https://developer.blender.org/D13254
2021-11-13Cleanup: spelling in comments, comment block formattingCampbell Barton
2021-11-12Cleanup: Move remaning node editor files to C++Hans Goudey
Differential Revision: https://developer.blender.org/D13200