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-03-17Nodes: Add support to mute node wiresCharlie Jolly
This patch adds the ability to mute individual wires in the node editor. This is invoked like the cut links operator but with a new shortcut. Mute = Ctrl + Alt Cut = Ctrl Dragging over wires will toggle the mute state for that wire. The muted wires are drawn in red with a bar across the center. Red is used in the nodes context to indicate invalid links, muted links and internal links. When a wire is muted it exposes the original node buttons which are normally hidden when a wire is connected. Downstream and upstream links connected using reroute nodes are also muted. Outside scope of patch: - Add support for pynodes e.g. Animation Nodes - Requires minor change to check for muted links using the `is_muted` link property or the `is_linked` socket property. Maniphest Tasks: T52659 Differential Revision: https://developer.blender.org/D2807
2021-03-16Compositor: Redesign Cryptomatte node for better usabilityJeroen Bakker
In the current implementation, cryptomatte passes are connected to the node and elements are picked by using the eyedropper tool on a special pick channel. This design has two disadvantages - both connecting all passes individually and always having to switch to the picker channel are tedious. With the new design, the user selects the RenderLayer or Image from which the Cryptomatte layers are directly loaded (the type of pass is determined by an enum). This allows the node to automatically detect all relevant passes. Then, when using the eyedropper tool, the operator looks up the selected coordinates from the picked Image, Node backdrop or Clip and reads the picked object directly from the Renderlayer/Image, therefore allowing to pick in any context (e.g. by clicking on the Combined pass in the Image Viewer). The sampled color is looked up in the metadata and the actual name is stored in the cryptomatte node. This also allows to remove a hash by just removing the name from the matte id. Technically there is some loss of flexibility because the Cryptomatte pass inputs can no longer be connected to other nodes, but since any compositing done on them is likely to break the Cryptomatte system anyways, this isn't really a concern in practise. In the future, this would also allow to automatically translate values to names by looking up the value in the associated metadata of the input, or to get a better visualization of overlapping areas in the Pick output since we could blend colors now that the output doesn't have to contain the exact value. Idea + Original patch: Lucas Stockner Reviewed By: Brecht van Lommel Differential Revision: https://developer.blender.org/D3959
2021-03-10Nodes: Sortable Multi Input SocketsFabian Schempp
This Patch removes the auto sorting from Multi-Input Sockets and allows the links to be sorted by drag and drop instead. As a minor related change, it fixes the drawing of the mute line to connect to the first input instead of the socket's center.
2021-03-08Fix T86373: crash picking colors in geometry nodesocketsPhilipp Oeser
Caused by {rB85421c4fab02}. Above commit treated `SOCK_RGBA` and `SOCK_STRING` the same in `std_node_socket_draw`. That would turn a RGBA button into a text button (for attribute search), leading to trouble. Note these were just treated the same prior to above commit because both were doing the layout split. Now just give RGBA sockets their own case. Maniphest Tasks: T86373 Differential Revision: https://developer.blender.org/D10646
2021-03-02Geometry Nodes: Attribute search drop-downHans Goudey
This commit adds a search for existing attributes when you click on an attribute field. This is useful because otherwise you have to remember which attributes should be available at each node in the tree. The fundamental complication is that this information is not accessible statically. So the search data is only a cache from the previous node tree evaluation. The information is added with `BKE_nodetree_attribute_hint_add`, currently for every input geometry socket for a single node. This is only an initial implementation, and later versions will expose the data type and domain of the attributes. Differential Revision: https://developer.blender.org/D10519
2021-02-24UI: Make node virtual sockets more visibleFabian Schempp
This commit tweaks how virtual sockets (unconnected node group input and output sockets) are drawn to make them more recognizable. The outline is changed to a gray color, and they get a dark inner color. Differential Revision: https://developer.blender.org/D10080
2021-02-11UI: Multi-input node socket spacing and interactionFabian Schempp
This commit makes links connected to multi-input sockets spread verticaly along the socket. Sockets grow if more links are connected and the node layout updates accordingly. Links are sorted by their incoming angle to avoid crossing links. Also, link picking is updated to work with spread links and bezier links. Currently the multi-input sockets are used in the join geometry node. The mutli-input sockets look like a vertical rounded rectangle. Currently they do not support the other custom socket shapes. Reviewed By Hans Goudey, with cleanup and additional edits Differential Revision: https://developer.blender.org/D10181
2021-02-09Cleanup: Register node property layout callbacks in filesHans Goudey
This commit moves the property layout callbacks for node types to their implementation files from `drawnode.c`. This was proposed a while ago in T75724. **Benefits** - Fewer files need to be changed when adding a new node. - Makes it possible to reuse functions from the node's implementation in the layout code. - Except for RNA, all of the node "inputs" are in the same place. - Code gets shorter overall, avoids the large switch statements. **Downsides** - Requires including two UI headers. - Requires adding an editors dependency to the nodes folder. This commit only changes function nodes and geometry nodes, more can be moved later. Differential Revision: https://developer.blender.org/D10352
2021-02-05Geometry Nodes: add Volume to Mesh nodeJacques Lucke
This node takes a volume and generates a mesh on it's "surface". The surface is defined by a threshold value. Currently, the node only works on volumes generated by the Points to Volume node. This limitation will be resolved soonish. Ref T84605. Differential Revision: https://developer.blender.org/D10243
2021-02-05Geometry Nodes: support fixed pivot axis in Align Rotation to Vector nodeJacques Lucke
When the pivot axis is not set to auto, the node will try to align the rotation to vector as best as possible, given the selected rotation axis. Ref T85211. Differential Revision: https://developer.blender.org/D10292
2021-02-05Geometry Nodes: Add Attribute Proximity NodeVictor-Louis De Gusseme
This node calculates a distance from each point to the closest position on a target geometry, similar to the vertex weight proximity modifier. Mapping the output distance to a different range can be done with an attribute math node after this node. A drop-down changes whether to calculate distances from points, edges, or faces. In points mode, the node also calculates distances from point cloud points. Design task and use cases: T84842 Differential Revision: https://developer.blender.org/D10154
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-02-03Geometry Nodes: Add Collection Info NodeSebastian Parborg
Implements a node to get collection objects. These objects are then passed along as instances in the node tree. Follow up tasks: Multiple nodes does not support instancing yet: T85159 Changing collection offset does not trigger a refresh: T85274 Reviewed By: Jacques, Dalai, Hans Differential Revision: http://developer.blender.org/D10151
2021-01-26Geometry Nodes: Support all operations in the "Attribute Math" nodeHans Goudey
This adds the ability to use all the math operations in the regular utility "Math" node. The code is quite similar to the attribute vector math node, with the simplification that the result is always a float. Differential Revision: https://developer.blender.org/D10199
2021-01-26Geometry Nodes: new Points to Volume nodeJacques Lucke
This implements a new geometry node based on T84606. It is the first node that generates a `VolumeComponent`. Differential Revision: https://developer.blender.org/D10169
2021-01-25Merge branch 'blender-v2.92-release'Campbell Barton
2021-01-25Fix T84324: Crash when combining two scenes in compositor.Jeroen Bakker
In the CompositorOperation::deinitExecution the viewer could be freed at the same time it was drawn in the image editor or node editor. There is a guard for that but wasn't added during the migration of the two editors to the draw manager.
2021-01-25Cleanup: pass 'rctf' rectangle to 2D box drawing functionsCampbell Barton
Passing 4x arguments for the rectangle, mixed in with round-box radius & color wasn't very readable. Instead, pass a `rctf` as the first argument to UI box drawing functions.
2021-01-21Geometry Nodes: new Attribute Sample Texture nodeJacques Lucke
This node allows sampling a texture for every vertex based on some mapping attribute. Typical attribute names are the name of a uv map (e.g. "UVMap") and "position". However, every attribute that can be converted to a vector implicitly is supported. It should be noted that as of right now, uv map attributes can only be accessed after a Point Distribute node. Ref T82584. Differential Revision: https://developer.blender.org/D10121
2021-01-20Cleanup: Store runtime space node variables in a separate structHans Goudey
This commit moves runtime-only variables from the `SpaceNode` DNA struct to a private struct in `node_intern.h`. Before, it was hard to tell which data needed to be saved in files, this should make it more clear. Node that the `edittree` field is basically a runtime variable, since it's set from the `treepath` list on read, but moving it would require some more invasive changes that I don't think are worth it right now. Also, not all of the moved variables were explicitly cleared on read-- `aspect` is set at the start of a redraw, `cursor` is set in a region callback, and `recalc` was used as an update flag. Differential Revision: https://developer.blender.org/D10141
2021-01-19Merge branch 'blender-v2.92-release'Sebastian Parborg
2021-01-19Geometry Nodes - Object Info: option to apply obj transform to the geometryDalai Felinto
By design the modified object transformations should still work and affect the geometry nodes results. The current behaviour, however, would make the geometry from the object info to not be affected by the modified object transformations. This patch changes that by default. In a similar fashion the Location, Rotation and Scale sockets outputs should be aware of whether the output should be in the global space or in the space of the nodetree. To solve this, the patch introduces a new transformation space "enum" where users can pick "Original" or "Relative" space. Original -------- Output the geometry relative to the input object transform, and the location, rotation and scale relative to the world origin. Relative -------- Bring the input object geometry, location, rotation and scale into the modified object maintaining the relative position between the two objects in the scene. Relative space violates a bit the design of the nodetree. The geometry in this case is transformed so that moving the modified object doesn't interfere with the geometry. This is particularly useful for the boolean node for instance. "Original" is the default space, but old files are set to "Relative" for backwards compatibility. Differential Revision: https://developer.blender.org/D10124
2021-01-15Cleanup: Add const in various places in node codeHans Goudey
Also includes some various other minor cleanups, like using bool instead of int in a couple places.
2021-01-13Nodes: use green color again for shader sockets and shader categoryBrecht Van Lommel
The green is still distinct from the more turquoise use for geometry, and they are never used in the same node graph. The use of red makes sense, but would need changes to other sockets and categories to set it apart well. Ref T82689
2021-01-13Geometry Nodes: Add "Point Translate" and "Point Scale" nodesHans Goudey
The translate node moves every point in the geometry, and the scale node multiplies the "scale" attribute of the input geometry by its input. While these operations are already possible with the "Attribute" nodes, these new nodes fit nicely with the nodes specifically for changing the "rotation" attribute that already exist, and they provide a simpler way to do the same thing. Differential Revision: https://developer.blender.org/D10100
2021-01-13UI: Use gray color for float sockets in nodesPablo Vazquez
The shade is too close to RGBA sockets. Related to T82689
2021-01-13Geometry Nodes: Rename "Rotate Points" to "Point Rotate"Hans Goudey
This is consistent with the other node names, giving (almost) all of the nodes in the "Point" category the same prefix.
2021-01-13UI: Revert design changes to data-block selector for the 2.92 releaseJulian Eisel
Partially reverts 2250b5cefee7. Removing the user count and fake user count icons was controversial (which was expected) and there are a few further changes needed, that won't make it in time for the release, see D9946. While there is a design to bring back the user count and fake user indicators, a new design idea was proposed that the UI team wants to follow. This came too late for the 2.92 release, the new design is targeted at the 2.93 release now. Meanwhile, UI team decision was to simply revert the design changes. The new design is being worked on in https://developer.blender.org/T84669. Note that this commit does not revert some internal changes done in 2250b5cefee7. Namely the introduction of `ed_util_ops.c` and data-block operators in there. These will still be needed in the new design.
2021-01-13Compositor: "Save as Render" for the file output nodeRobert Guetzkow
This commit adds the "Save as Render" feature to the file output node, that allows to disable the application of the configured view transform and other color management settings on the image. If disable it uses the standard view transform instead. This feature was originally suggested in T83842 and is part of the color management improvements task in T68926. With this feature it is possible to toggle the application of the color management settings for each input socket of the File Output node individually. Reviewed By: brecht Maniphest Tasks: T68926, T83842 Differential Revision: https://developer.blender.org/D9921
2021-01-13Cleanup: spellingCampbell Barton
2021-01-12Geometry Nodes: new Align Rotation to Vector nodeJacques Lucke
This adds a new Align Rotation to Vector node based on the mockup in T83669. Reviewers: HooglyBoogly, simonthommes Differential Revision: https://developer.blender.org/D10081
2021-01-11Geometry Nodes: Attribute Vector Math NodeHans Goudey
This patch implements the same operations and interface as the regular vector math node, but it runs for every element of the attribute. This should expand what's possible with geometry nodes quite a bit. Differential Revision: https://developer.blender.org/D9914
2021-01-10UI: Improve node group input / output list interfaceHans Goudey
This commit replaces the two-column list for editing node group inputs and outputs with a cleaner solution with two panels. The new layout has several benefits: - It uses the vertical space in the node editor sidebar better. - It should be more familiar because of similarity with other UI lists. - It should look better with consistent alignment and icons. Note that displaying the "Name" property outside of the list itself is a bit inconsistent and could possibly be removed in the future. Differential Revision: https://developer.blender.org/D9683
2021-01-05Fix T84389: RGB Curves node shows "tone" option outside of compositorPhilipp Oeser
Since the introduction in rB4de7c0c3105a, the option is only used in the compositor, it has no effect elsewhere [texture nodes, shader nodes]. Now only show the option for the compositor. Maniphest Tasks: T84389 Differential Revision: https://developer.blender.org/D10005
2021-01-05Compositor: Alpha ModeJeroen Bakker
{D9211} introduced pre-multiplying the color for the keying node. This pre-multiplication should also be done by other keying nodes and should be the default operation for alpha node. This patch will change the logic of keying nodes (Cryptomatte Node, Channel Matte, Chroma Matte, Color Matte, Difference Matte, Distance Matte, Luminance Matte) and breaks old files. The Set alpha node has a mode parameter. This parameter changes the logic to `Apply Mask` the alpha on the RGBA channels of the input color or only replace the alpha channel (old behavior). The replace mode is automatically set for older files. When adding new files the the multiply mode is set. Reviewed By: Sergey Sharybin Differential Revision: https://developer.blender.org/D9630
2020-12-23Geometry Nodes: new Rotate Points nodeJacques Lucke
This node updates the "rotation" attribute on points. Multiple ways to specify the rotation are supported. Differential Revision: https://developer.blender.org/D9883 Ref T83668.
2020-12-19Cleanup: Remove unused variables from the bNode structHans Goudey
In some cases the variables were set but never used anywhere. Differential Revision: https://developer.blender.org/D9889
2020-12-18UI: Redesigned data-block selectorsJulian Eisel
The previous design is rather old and has a couple of problems: * Scalability: The current solution of adding little icon buttons next to the data-block name field doesn't scale well. It only works if there's a small number of operations. We need to be able to place more items there for better data-block management. Especially with the introduction of library overrides. * Discoverability: It's not obvious what some of the icons do. They appear and disappear, but it's not obvious why some are available at times and others not. * Unclear Status: Currently their library status (linked, indirectly linked, broken link, library override) isn't really clear. * Unusual behavior: Some of the icon buttons allow Shift or Ctrl clicking to invoke alternative behaviors. This is not a usual pattern in Blender. This patch does the following changes: * Adds a menu to the right of the name button to access all kinds of operations (create, delete, unlink, user management, library overrides, etc). * Make good use of the "disabled hint" for tooltips, to explain why buttons are disabled. The UI team wants to establish this as a good practise. * Use superimposed icons for duplicate and unlink, rather than extra buttons (uses less space, looks less distracting and is a nice + consistent design language). * Remove fake user and user count button, they are available from the menu now. * Support tooltips for superimposed icons (committed mouse hover feedback to master already). * Slightly increase size of the name button - it was already a bit small before, and the move from real buttons to superimposed icons reduces usable space for the name itself. * More clearly differentiate between duplicate and creating a new data-block. The latter is only available in the menu. * Display library status icon on the left (linked, missing library, overridden, asset) * Disables "Make Single User" button - in review we weren't sure if there are good use-cases for it, so better to see if we can remove it. Note that I do expect some aspects of this design to change still. I think some changes are problematic, but others disagreed. I will open a feedback thread on devtalk to see what others think. Differential Revision: https://developer.blender.org/D8554 Reviewed by: Bastien Montagne Design discussed and agreed on with the UI team, also see T79959.
2020-12-18Geometry Nodes: support randomly picking instances from collectionJacques Lucke
This uses the "id" attribute to randomly pick instances from a collection for each point. There is one issue. When the collection is updated (e.g. when an object is added to it), the nodes modifier is not automatically updated. It seems like we don't have the infrastructure to support this dependency yet. The same issue exists in the Boolean modifier and with collision collections. This should be solved separately soonish. When "Whole Collection" is disabled, one direct child of the input collection is instanced at each point. A direct child can be an object or a collection. Currently, all objects are picked approximately equally often. In the future, we will provide more control over which point gets which instance. Differential Revision: https://developer.blender.org/D9884 Ref T82372.
2020-12-18Function Nodes: Input VectorDalai Felinto
Ref: T82651 Normally people use "Combine XYZ" to input a vector, but it is more interesting to have an explicit vector input. So this is basically "Combine XYZ" without any input sockets, the values are stored in the node itself. Differential Revision: https://developer.blender.org/D9885
2020-12-17Geometry Nodes: Point separate and attribute compare nodesHans Goudey
This patch adds two related nodes, a node for separating points and mesh vertices based on a boolean attribute input, and a node for creating boolean attributes with comparisons. See the differential for an example file and video. Point Separate (T83059) The output in both geometries is just point data, contained in the mesh and point cloud components, depending which components had data in the input geometry. Any points with the mask attribute set to true will be moved from the first geometry output to the second. This means that for meshes, all edge and face data will be removed. Any point domain attributes are moved to the correct output geometry as well. Attribute Compare (T83057) The attribute compare does the "Equal" and "Not Equal" operations by comparing vectors and colors based on their distance from each other. For other operations, the comparison is between the lengths of the vector inputs. In general, the highest complexity data type is used for the operation, and a new function to determine that is added. Differential Revision: https://developer.blender.org/D9876
2020-12-17Geometry Nodes: add Attribute Color Ramp nodeJacques Lucke
Differential Revision: https://developer.blender.org/D9861 Ref T82585.
2020-12-16Geometry Nodes: Poisson disk point distribution node/methodDalai Felinto
This patch does two things: * Introduce a Seed to the random distribution method * Bring in a new distribution method for the point scattering node Patch Review: https://developer.blender.org/D9787 Note: This commit doesn't not handle doversion. Which means that users need to manually update their files that were using the Point Distribute node and reconnect inputs to the "Maximum Density" socket. Original patch by Sebastian Parborg, with changes to not rely on the cy libraries and overall cleanup. Patch review by Jacques Lucke, besides help with the new "heap" system that was required for this algorithm. Based on Cem Yuksel. 2015. Sample Elimination for Generating Poisson Disk Sample. Sets. Computer Graphics Forum 34, 2 (May 2015), 25-32 http://www.cemyuksel.com/research/sampleelimination/
2020-12-16Geometry Nodes: rename node to Attribute RandomizeJacques Lucke
Previously, the node was called Random Attribute. For consistency reasons, we move the "Attribute" part of the name to the front.
2020-12-11Geometry Nodes: support instancing collectionsJacques Lucke
The Point Instance node can instance entire collections now. Before, only individual collections were supported. Randomly selecting objects from the collection on a per point basis is not support, yet. Last part of D9739. Ref T82372.
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-11Geometry Nodes: add Attribute Mix nodeJacques Lucke
This node can be used to mix two attributes in various ways. The blend modes are the same as in the MixRGB shader node. Differential Revision: https://developer.blender.org/D9737 Ref T82374.
2020-12-10Geometry Nodes: Attribute Fill NodeHans Goudey
This commit adds a node that fills every element of an attribute with the same value. Currently it supports float, vector, and color attributes. An immediate use case is for "billboard" scattering. Currently people are using the same input to a Random Attribute node's min and max input to fill every element of a vector with the same value, which is an unintuitive way to accomplish the same thing. Differential Revision: https://developer.blender.org/D9790
2020-12-02Geometry Nodes: unify icons -> use ICON_NODETREE for everythingDalai Felinto
Until there is a icon made specially for this, the nodetree icon is up for grabs. Using it in the nodegroup + modifier + editor helps the users to make a connection on where to edit those modifiers.
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