Age | Commit message (Collapse) | Author |
|
|
|
The group output node did not have the same size padding as the group
input, leading to the node looking different and actually being smaller.
Differential Revision: https://developer.blender.org/D13092
|
|
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
|
|
Currently, custom sockets are no longer supported for automatic linking
when dropping a node on a link. This is because SOCK_CUSTOM is given a
negative priority and is ignored. To fix this, SOCK_CUSTOM is now given
the lowest priority and the rest of the sockets got their priority
incremented.
Reviewed By: Jacques Lucke
Differential Revision: https://developer.blender.org/D13403
|
|
This is only meant to be used for development purposes for now,
not to show warnings to the user.
Differential Revision: https://developer.blender.org/D13348
|
|
`std::stringstream` already returns a `std::string`, and there is no
particular reason to use short here instead of int.
|
|
Adds a new overlay called "Timings" to the Geometry Node editor.
This shows the node execution time in milliseconds above the node.
For group nodes and frames, the total time for all nodes inside
(recursively) is shown. Group output node shows the node tree total.
The code is prepared for easily adding new rows of information
to the box above the node in the future.
Differential Revision: https://developer.blender.org/D13256
|
|
Currently the geometry nodes evaluator always stores a field for every
type that supports it, even if it is just a single value. This results in a lot
of overhead when there are many sockets that just contain a single
value, which is often the case.
This introduces a new `ValueOrField<T>` type that is used by the geometry
nodes evaluator. Now a field will only be created when it is actually
necessary. See D13307 for more details. In extrem cases this can speed
up the evaluation 2-3x (those cases are probably never hit in practice
though, but it's good to get rid of unnecessary overhead nevertheless).
Differential Revision: https://developer.blender.org/D13307
|
|
|
|
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
|
|
|
|
The old code did not work when there were multiple ids with
the same name (which can happen when ids are linked in).
The solution is to use the session ids instead. Those are different
even when two ids have the same name.
Differential Revision: https://developer.blender.org/D11116
|
|
|
|
D13044 allowed the link color overlay to be used with custom sockets.
This no longer works due to a condition that checks if the socket is
standard or not, which was in place to avoid bad indexing of the
std_node_socket_colors array. Since that array is no longer used, this
condition needs to be removed.
Differential Revision: https://developer.blender.org/D13274
Reviewed By: Hans Goudey
|
|
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
|
|
Socket drawing can be heavy with many nodes.
This patch skips drawing them on scale < 0.2
when they are barely visible anyway.
Differential Revision: https://developer.blender.org/D13255
|
|
Using `struct` everywhere is unnecessary in C++, and the typedefs
are also unnecessary.
|
|
|
|
Differential Revision: https://developer.blender.org/D13098
|
|
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.
|
|
|
|
Allow the use of floating-point values for font point sizes, which
allows greater precision and flexibility for text output.
See D8960 for more information, details, and justification.
Differential Revision: https://developer.blender.org/D8960
Reviewed by Campbell Barton
|
|
|
|
Differential Revision: https://developer.blender.org/D13200
|
|
|
|
rBc473b2ce8bdbf8fa42 improved the situation somewhat, but
attribute search still crashes during animation playback, because
the UI search data references stale memory. The proper solution
is to allow the search to own data rather than just referencing it,
but I would prefer not to do that for 3.0. In the meantime, just
disable attribute search when animation is playing.
Differential Revision: https://developer.blender.org/D13179
|
|
|
|
Nishita sky is not available in Eevee, display a warning to make this clear inside the Sky texture node.
Differential Revision: https://developer.blender.org/D13161
|
|
Previously, to get the declaration of a socket, one had to go
through `node->declaration`. Now this indirection is not necessary
anymore. This makes it easier to add more per-socket information
into the declaration and accessing it in various places.
Currently, this system is used by socket descriptions and node warnings
for unsupported geometry component types.
|
|
This solves the issue in a more general that can also be used to solve
similar issues for other nodes in the future. Nodes can specify their
"main" socket in their declaration so that we don't have to rely on
heuristics.
Differential Revision: https://developer.blender.org/D13108
|
|
Size, position and scale of the "two-line" widget (the one to scale a
node horizontally) was not taking interface scale into account. In the
case of the report, it could happen it draws behind an output socket.
before (at 2.0 interface scale)
{F11698493}
after (at 2.0 interface scale)
{F11698501}
Maniphest Tasks: T92791
Differential Revision: https://developer.blender.org/D13088
|
|
Also fix several wrong usages of `IFACE_` (as a reminder, error/info
messages should use `TIP_`, not `IFACE_`).
|
|
Currently, colored links overlay only supports standard sockets defined
by Blender. Some add-ons like Animation Nodes defines custom sockets for
everything and hence doesn't get colored sockets.
This patch uses the draw color from the socket type info to draw links
in order to support custom sockets.
Differential Revision: https://developer.blender.org/D13044
Reviewed By: Hans Goudey
|
|
Unlike translating existing nodes [which disables cursor wrapping and
enables edge-panning instead since rBSa1cc7042a74], adding new nodes
would still show the old behavior of cursor wrapping.
This has been disabled for the case when the node whould be added
outside (due to menus overlapping other editors).
Now enable edge-panning for adding new nodes as well and make sure
this only starts once the mouse has returned into the inside rect once.
Maniphest Tasks: T92427
Differential Revision: https://developer.blender.org/D13005
|
|
Use `UI_GetThemeColorBlend4f` instead of manually setting alpha opaque.
|
|
Always draw header opaque, set transparency only once after getting
the color. Helps to unify the color and alpha values.
|
|
This patch changes how nodes look visually, in an attempt to fix a number of issues:
* The header background is currently drawn using a theme color fully opaque, this limits the colors we can use because the node name/label is drawn on top.
* Hard-coded transparency makes nodes hard to read. The node backdrop already has alpha so if the user wants it they can set it. This patch uses alpha from the theme.
* Better muted status indicator, instead of simply making everything transparent and the wires inside red, draw a red outline around the node, darken the header and backdrop.
* On muted nodes, display wires behind the backdrop to not interfere with text/widgets inside the node.
Nodes:
* Darken header to improve readability of node label.
* Draw a line under the header
* Thicker outline.
* Do not hard-code transparency on nodes, use the theme's node backdrop alpha component.
* Use angle icon instead of triangle (to be consistent with the [[ https://developer.blender.org/D12814 | changes ]] to panels)
Style adjustment to sockets drawing:
* Do not hard-code the socket outline color to black, use `TH_WIRE` instead
* Do not use `TH_TEXT_HI` for selected sockets, use `TH_ACTIVE` (active node outline)
* Do not draw sockets background transparent on muted nodes.
* Thicker outline to help contrast and readability
{F11496707, size=full}
Reviewed By: #user_interface, HooglyBoogly
Differential Revision: https://developer.blender.org/D12884
|
|
|
|
This patch upgrades node editor breadcrumbs to have slightly more
visual weight, to including the base path of object/modifier/world,
etc, have more visually pleasing spacing, and contain icons.
In the code, a generic "context path" is added to interface code.
The idea is that this could be used to draw other breadcrumbs in areas
like the property editor or the spreadsheet, and features could be added
to all of those areas at the same time.
Ideally we would be able to control the color of the breadcrumbs with a
specific theme color, but since they are drawn with the regular layout
system, that is not easily possible.
Thanks to @fabian_schempp for the original patch.
Differential Revision: https://developer.blender.org/D10413
|
|
This was missing from my refactor in rB5bfe09df2244cb9de0b6554a378eecef77b1e75d.
|
|
Node links that are connected to selected nodes are highlighted
using the Wire Select theme color. Now it is possible to change the
transparency of this color to allow the actual link color to be visible
through the highlight (or to turn of the highlight entirely).
Differential Revision: https://developer.blender.org/D12973
|
|
This changes socket inspection for fields according to T91881.
Differential Revision: https://developer.blender.org/D13006
|
|
Previously, the field on every socket was logged for later use. This had
two main negative consequences:
* Increased memory usage, because the fields may contain a lot of data
under some circumstances (e.g. a Ray Cast field contains the target geometry).
* Decreased performance, because anonymous attributes could not be
removed from geometry automatically, because there were still fields that
referenced them.
Now most fields are not logged anymore. Only those that are viewed by a
spreadsheet and constant fields. The required inputs of a field are still
logged in string form to keep socket inspection working.
|
|
The viewer node has been expanded to have a field input next to the
geometry input. When both are connected (by ctrl+shift clicking on a node)
the spreadsheet will show the evaluated field on the geometry.
The operator to link to the viewer has become a bit smarter. It automatically
detects if it should link to the geometry or field input. In the future some more
smartness could be added, such as automatically relinking the "right" geometry
when viewing a field.
Internally, there are two major changes:
* Refactor of what happens when ctrl+shift clicking on a node to link to
a viewer. The behavior of the geometry nodes viewer is a bit more complex
than that of the compositor viewers. The behavior in compositing nodes
should not have changed. Any change should be reported as a bug (and then
we can decide if it's worse than before or if it needs fixing).
* Evaluation, display and caching of fields in the spreadsheet editor.
Differential Revision: https://developer.blender.org/D12938
|
|
This patch makes the background grid of the node editor a grid of dots
instead of lines. This makes the background look a bit more subtle and
reduces visual complexity. The dots are meant to provide a reference
when panning and zooming. Based on the design of @pablovazquez, and
a patch originally authored by @fabian_schempp.
The "Grid Levels" controls how many levels of dots are drawn. As the
editor zooms in, the higher levels of dots fade in, making them closer
together visually. The zoom factor at which each grid starts and ends
fading in is controllable in the code, and could be tweaked further
in the future. The new default value is 7, out of a range from 0 to 9.
Differential Revision: https://developer.blender.org/D10345
|
|
This adds a new image texture node for geometry nodes. It does not
reuse the same node that is used in shading, because we want to be
able to expose the image and frame as sockets.
There is a known update issue when a movie or image sequence is
used. That will be fixed separately (also see D12957).
Currently, the image socket is just a pointer to an Image ID data block.
This can contain single images but also movies and image sequences.
In the future, the definition of an image socket can be expanded to
include images that are generated from scratch in the node tree.
For more details read the discussion in D12827.
Some of the code is a direct port from cycles and should be cleaned
up a bit in the future. For example `image_cubic_texture_lookup`.
For still images, the frame input is ignored. Otherwise, the frame
has to be in a valid range for the node to work. In the future we
may add e.g. automatic looping functionality.
Differential Revision: https://developer.blender.org/D12827
|
|
Caused by rBcf72b10075758be971f9806b97db01f98383aba2.
The fix is to only enable the flags when a new node editor is actually created.
|
|
This was missed in the initial commit adding the node editor overlays.
|
|
This is a simplified version of D12730 by @erik85.
I added attribute search only to one legacy node for testing purposes.
|
|
The type of sockets is `-1` in some cases, resulting in a crash
when accessing the `std_node_socket_colors` array.
|