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-11-06Cleanup: Nodes: Use const arguments, avoid recursive iterationHans Goudey
Use the node topology cache and avoid modifying the node tree in a non-threadsafe way to improve the predictability of using the helper function. Replaces the implementation from e0d40471364aafca967b6ebd52.
2022-11-05Cleanup: Remove unused node functionHans Goudey
2022-11-05Cleanup: Use Vector in group input/output node update functionsHans Goudey
Also reduce the scope of variables and use ListBase macros
2022-11-05Cleanup: Remove unnecessary node type registraction functionsHans Goudey
These functions provided little benefit compared to simply setting the function pointers directly.
2022-10-04Cleanup: replace UNUSED macro with commented args in C++ codeHans Goudey
This is the conventional way of dealing with unused arguments in C++, since it works on all compilers. Regex find and replace: `UNUSED\((\w+)\)` -> `/*$1*/`
2022-09-25Cleanup: remove redundant double parenthesisCampbell Barton
2022-09-22Cleanup: Use const arguments for node group poll functionHans Goudey
Also make the disabled hint argument optional.
2022-07-23Fix T99830: missing update after reordering node group socketsJacques Lucke
2022-05-31Fix T98501: setting node socket default value is very slowJacques Lucke
The issue was that the extend socket (the last empty socket in Input/Output nodes) was repeatedly removed and added again, which caused more updates than necessary. Now, the extend socket is kept if it existed already. Differential Revision: https://developer.blender.org/D15084
2022-04-18Fix T97002: Preserve multi socket link orderLeon Schittek
Preserve multi socket link order when copying nodes or adding a new group input sockets by linking directly to multi inputs from the group input node's extension socket. This is done by also copying the `multi_input_socket_index` when the new links are created by copying existing or temporary links. Reviewed By: Hans Goudey Differential Revision: http://developer.blender.org/D14535
2022-02-26Cleanup: typos in comments.Kévin Dietrich
2022-02-23Cleanup: Remove repeated word in commentsCampbell Barton
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-14Fix T94827: Group Input/Output cannot connect to custom socketsPhilipp Oeser
Caused by rBa5c59fb90ef9. Since Group Input and Output sockets happen to be of type `SOCK_CUSTOM` [and since rBa5c59fb90ef9 custom py defined sockets are too :)] a check introduced in rB513066e8ad6f that prevents connections for `SOCK_CUSTOM` triggered. Now refine the check, so it specifically looks for NODE_GROUP_INPUT / NODE_GROUP_OUTPUT, too (this keeps the intention intact to not connect group inputs to group outputs and vice versa, but allows custom py defined sockets to connect again) and put it in new utility function. Maniphest Tasks: T94827 Differential Revision: https://developer.blender.org/D13817
2022-01-04Cleanup: Remove bNodeType flag from base registration functionsAaron Carlisle
This flag is only used a few small cases, so instead of setting the flag for every node only set the required flag for the nodes that require it. Mostly the flag is used to set `ntype.flag = NODE_PREVIEW` For nodes that should have previews by default which is only some compositor nodes and some texture nodes. The frame node also sets the `NODE_BACKGROUND` flag. All other nodes were setting a flag of 0 which has no purpose. Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D13699
2021-12-30Cleanup: clang-tidy modernize-redundant-void-argAaron Carlisle
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-14Cleanup: Simplify node group input and output socket verificationHans Goudey
This commit refactors the way the socket lists for group nodes, and group input/output nodes are verified to match the group's interface. Previously the `bNodeSocket.new_sock` pointer was used to temporarily mark the new sockets. This made the code confusing and more complicated than necessary. Now the old socket list is saved, and sockets are moved directly from the old list to a new list if they match, or a new socket is created directly in the new list. This change is split from D13518, which aims to remove the `new_node` and `new_sock` pointers. In the future this code might be removed entirely in favor of using node socket declarations. Differential Revision: https://developer.blender.org/D13543
2021-12-11Cleanup: Use const argumentsHans Goudey
Also remove unnecessary function to set a node type's label function that duplicated its definition, and make another function static.
2021-12-10Cleanup: Use const argument, rename variablesHans Goudey
The const argument makes sense because these are the "source" sockets, even though a const cast is necessary at one point. The name "interface_socket" is an improvement over "stemp" because the latter sounds like "temporary", or it confuses the old socket template system with a node group's interface.
2021-12-10Cleanup: move public doc-strings into headers for 'nodes'Campbell Barton
Ref T92709
2021-12-02Fix: Add tooltip translation marker to disabled hintsHans Goudey
This was overlooked, as it seems there's no way for these strings to be translated currently. Generally it's not that clear whether `N_` or `TIP_` should be used in this case, but `TIP_` seems more consistent. To avoid the cost of the translation lookup when the UI text isn't necessary, we could allow the disabled hint argument to be optional. Differential Revision: https://developer.blender.org/D13141
2021-11-25Fix: Crash when muting the Group Output nodeErik
This fixes a crash when muting the "Group Output" node. It should not be possible to mute it so this patch sets the `no_muting`-variable on it. Differential Revision: https://developer.blender.org/D13364
2021-11-17Cleanup: use same function for updating internal links for all nodesJacques Lucke
Previously, node types had a callback that creates internal links. Pretty much all nodes used the same callback though. The exceptions are the reroute node (which probably shouldn't be mutable anyway) and some input/output nodes that are not mutable. Removing the callback helps with D13246, because it makes it easier to reason about which internal links are created and when they change. In the future, the internal links should be part of the node declaration.
2021-10-12Cleanup: Attempt to fix benign macOS compile warningsHans Goudey
2021-10-01Fix T87536: incorrect socket types in reroute nodesJacques Lucke
This refactors and fixes the code that propagates socket types through reroute nodes. In my tests it is faster than the previous code. The difference becomes larger the more reroute nodes there are, because the old code had O(n^2) runtime, while the new code runs in linear time. Differential Revision: https://developer.blender.org/D12716
2021-09-30Cleanup: move node_common.c to c++Jacques Lucke
Buildbot compiled without problems.