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-12-08Cleanup: clang-formatAaron Carlisle
2021-12-08Cleanup: Nodes: clang-tidy modernize-redundant-void-argAaron Carlisle
2021-10-14Nodes: add boilerplate for image socketsCharlie Jolly
The sockets are not exposed in any nodes yet. They work similar to the Object/Collection/Texture sockets, which also just reference a data block. Based on rB207472930834 Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D12861
2021-10-03Cleanup: spelling in commentsCampbell Barton
2021-08-23Fix T88107: rename Convertor to Converter nodes to correct spellingJames Partsafas
Differential Revision: https://developer.blender.org/D11198
2021-07-06Nodes: Adds button to groups to change type of sockets.Lukas Tönne
The menu lists all socket types that are valid for the node tree. Changing a socket type updates all instances of the group and keeps existing links to the socket. If changing the socket type leads to incorrect node connections the links are flagged as invalid (red) and ignored but not removed. This is so users don't lose information and can then fix resulting issues. For example: Changing a Color socket to a Shader socket can cause an invalid Shader-to-Color connection. Implementation details: The new `NODE_OT_tree_socket_change_type` operator uses the generic `rna_node_socket_type_itemf` function to list all eligible socket types. It uses the tree type's `valid_socket_type` callback to test for valid types. In addition it also checks the subtype, because multiple RNA types are registered for the same base type. The `valid_socket_type` callback has been modified slightly to accept full socket types instead of just the base type enum, so that custom (python) socket types can be used by this operator. The `nodeModifySocketType` function is now called when group nodes encounter a socket type mismatch, instead of replacing the socket entirely. This ensures that links are kept to/from group nodes as well as group input/output nodes. The `nodeModifySocketType` function now also takes a full `bNodeSocketType` instead of just the base and subtype enum (a shortcut `nodeModifySocketTypeStatic` exists for when only static types are used). Differential Revision: https://developer.blender.org/D10912
2021-05-17Geometry Nodes: update callbacks with 2 new socket typesWannes Malfait
2021-05-12Geometry Nodes: Link error when implicit conversion isn't possibleWannes Malfait
This turns links red if no implicit conversion can be made between the from socket and the to socket. For geometry nodes this happens with object, geometry, collection, and string sockets that are connected to a different type. The change is simply implementing a callback that is already implemented for other node tree types. Differential Revision: https://developer.blender.org/D11229
2021-04-30Nodes: Add a callback to check for valid socket typeWannes Malfait
This adds a callback to bNodeTreeType to check which socket types are valid for the tree type. Function has been implemented for the normal tree types, and can be implemented for custom node trees with python, by adding a `classmethod` to the tree. However, only builtin socket types are supported. This is relevant for T87049, but it also has the advantage that it is now clear which node trees support which sockets. Previously this was assumed to be known by all developers. Differential Revision: https://developer.blender.org/D10938
2021-04-16Fix T87359: set group output in geometry node tree update callbackWannes Malfait
This also fixes T85511. Differential Revision: https://developer.blender.org/D10970
2021-03-10Add 'foreach_nodeclass' for geometry nodetreesPhilipp Oeser
This way we get a choice when we click on node links in the Properties Editor. This also changes some of the more permissive poll functions on some nodes back to being "shading-only" (these were made permissive in rBb78f2675d7e5 for simulation nodes, but have not found their way into geometry nodes yet). ref b279fef85d1a / T86416 / D10671 Maniphest Tasks: T86416 Differential Revision: https://developer.blender.org/D10673
2021-01-16Fix T84713: Geometry nodes reroute sockets have incorrect typeWannes Malfait
This implements the node tree update function, which is needed so that the reroutes get updated to the correct type. It is based on the same code in the shader and compositor node trees. Differential Revision: https://developer.blender.org/D10123
2020-12-04Cleanup: Clang-Tidy, modernize-deprecated-headersSybren A. Stüvel
No functional changes.
2020-12-02Geometry Nodes: active modifier + geometry nodes editorHans Goudey
This commit adds functions to set and get the object's active modifier, which is stored as a flag in the ModifierData struct, similar to constraints. This will be used to set the context in the node editor. There are no visible changes in this commit. Similar to how the node editor context works for materials, this commit makes the node group displayed in the node editor depend on the active object and its active modifier. To keep the node group from changing, just pin the node group in the header. * Shortcuts performed while there is an active modifier will affect only that modifier (the exception is the A to expand the modifiers). * Clicking anywhere on the empty space in a modifier's panel will make it active. These changes require some refactoring of object modifier code. First is splitting up the modifier property invoke callback, which now needs to be able to get the active modifier separately from the hovered modifier for the different operators. Second is a change to removing modifiers, where there is now a separate function to remove a modifier from an object's list, in order to handle changing the active. Finally, the panel handler needs a small tweak so that this "click in panel" event can be handled afterwards.
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