Age | Commit message (Collapse) | Author |
|
Use dashes to represent the function flow (while keeping continuous
lines for the data-flow).
It is important to tell both flows apart (the data and the function
flow). The sockets help with that, the noodles help this further.
The "data flow" is evaluated at every single node. A user can inspect
the output sockets of those nodes and have a glimpse at their values.
The "function flow" (nodes) however is only evaluated in the geometry
nodes. The noodles are not transporting data in the same sense of the
"data flow". All that can be inspected are the attributes the functions
depend on.
Having this clearly communicated should help users to inspect the
nodetrees, read and understand the different flows in the same tree.
---
Known limitations:
At the moment the dash lines are not equidistant:
* It would be nice to get the "uv.x" to be resampled for the bezier curve
so the dashes are equally distributed in the curve.
* Using distance between the P3 and P0 instead of the real bezier curve
length seems to be fine.
---
Full disclaimer:
Changes with that much of a visual impact tend to be controversial. So
far the main feedback is that dashed lines can be associated to broken
link, and that there are better ways to represent the flows (or
different information that should be visually represented).
I'm fully aware of that. However dashed lines are already used in the
viewport and outliner to indicate (hierarchical) relation. Besides,
other approaches (double-lines, having the data flow to be more
distinct, ...) didn't pan out in the end (or didn't look as good as
this).
---
Impact in other editors:
The compositor uses mostly a "data flow" nodetree, so no change is
expected there.
The shader nodetree is one that could but doesn't have to change its
visual language.
The shader nodetree uses mostly "function flow" with some "data flow" nodes.
One can argue that it should be adapted to follow the
same pattern as geometry nodes (with the new noodles and the diamond
sockets). Oh the other hand, a shader nodetree has a single context.
When a node depends on the "UV", there is only one UV at a time for the
entire nodetree. So it can also be treated as a psedo "data flow"
nodetree if we want to avoid too many changes in other parts of Blender.
Differential Revision: https://developer.blender.org/D12602
|
|
This makes it easier to spot which links contain fields and which
contain data. Actually, the patch makes all other links a bit thicker.
However, with soon-to-be-implemented theme changes, the
perceived thickness will be the same as before.
This is part of T91563.
Differential Revision: https://developer.blender.org/D12646
|
|
This adds initial limited support for socket tooltips. It's limited
in a couple of ways for now:
* Only works when hovering over the socket shape, not when hovering
over the value in the socket.
* Only works for built-in nodes that already use the new node
declaration system. This can later be extended to support pynodes.
Those limitations are well worth it for now, given that the
implementation is quite simple and the impact on usability is quite
large. More complex updates to the layout system, that would allow
showing socket tooltips in the nodes, can be done later. With the
current implementation we can at least start writing tooltips for
geometry nodes now.
This commit already adds tooltips for the Cylinder node as an example.
Differential Revision: https://developer.blender.org/D12607
|
|
This implements the update logic for the vizualization of which
sockets pass data or constants directly, and which pass functions.
The socket shapes may still have to be updated. That should be
done separately, because it might be a bit more involved, because
socket shapes are currently linked to keyframe shapes. Currently
the circle and diamond shapes are used with the following meanings:
- Input Sockets:
- Circle: Required to be a single value.
- Diamond: This input supports fields.
- Output Sockets:
- Circle: This output is a single value.
- Diamond: This output may be a field.
Connecting a field to a circle input socket is an error, since a
field cannot be converted to a single value. If the socket shape
is a diamond with a dot in the middle, it means it is currently
a single value, but could be a field.
In addition to socket shapes, the intention is to draw node links
differently based on the field status. However, the exact method for
conveying that isn't decided yet.
Differential Revision: https://developer.blender.org/D12584
|
|
No functional change.
The shader is complicated by itself, having hardcoded values makes it
even more cryptic.
I also renamed the shader because the shader is not for the keyfarme diamond only,
but for all the keyframe shapes.
Differential Revision: https://developer.blender.org/D12615
|
|
This commit adds warning messages to "legacy" nodes that will be
removed in the future. The warning is shown in the node header, but
it is not printed in the terminal or displayed in the modifier. It is
also not propogated to node groups, but that is a more general task.
If the modifier's node tree has executed a deprecated node, it will
display a warning and a "Search" button that will select the nodes and
pan to them in the node editor. This doesn't open child node trees and
select nodes in there, because I want to keep this operator simple and
avoid wasting a lot of time perfecting this behavior.
Differential Revision: https://developer.blender.org/D12454
|
|
It's equivalent to the OpenImageDenoise prefiltering option in Cycles.
See D12043.
Prefilter modes:
- None: No prefiltering, use when guiding passes are noise-free.
- Fast: Denoise image and guiding passes together. Improves quality when
guiding passes are noisy using least amount of extra processing time.
- Accurate: Prefilter noisy guiding passes before denoising image.
Improves quality when guiding passes are noisy using extra
processing time.
Reviewed By: #compositing, jbakker, sergey
Differential Revision: https://developer.blender.org/D12342
|
|
- Bend (Transform).
- Extrude to Cursor.
- Lasso Select (related operators such as node-cut links, mask.. etc).
- Rip Mesh / UV's.
- Vertex/Edge Slide.
|
|
Since fields were committed to master, socket inspection did
not work correctly for all socket types anymore. Now the same
functionality as before is back. Furthermore, fields that depend
on some input will now show the inputs in the socket inspection.
I added support for evaluating constant fields more immediately.
This has the benefit that the same constant field is not evaluated
more than once. It also helps with making the field independent
of the multi-functions that it uses. We might still want to change
the ownership handling for the multi-functions of nodes a bit,
but that can be done separately.
Differential Revision: https://developer.blender.org/D12444
|
|
Recently we have decided to avoid fancier versioning for nodes with
string inputs for attribute names when updating the attribute workflow
for 3.0. In that case we would just duplicate any node that will
have an updated version to work with fields.
We want to be able to use the "proper" ID names for the new versions
of the nodes though, so this patch adds "Legacy" to the IDs of all
nodes that will be replaced in 3.0. This commit also removes the nodes
from the add menu when the fields experimental preference is enabled,
in order to make it clear what has been updated and what hasn't.
Nodes in the "Maybe" categories in versioning_300.c can be renamed
later if necessary. For now it's probably better to be conservative,
and to keep the list complete.
Differential Revision: https://developer.blender.org/D12420
|
|
This patch fixes the issue described in T88411, that the text in frame nodes is only shown, when the node has a label. This has been caused by rB8f04ddbbc626, because `node_draw_frame_label` not only draws the label, but also all the other text. Therefore skipping it, when the label is empty, also skips drawing the other text.
This is fixed by moving the check for the empty label into `node_frame_draw_label`.
**Patch:** Frame nodes show text despite not having a label.
{F10286204, size = full}
**Same setup in master:**
{F10128099, size = full}
**Test file**
{F10128102}
Reviewed By: #user_interface, pablovazquez
Maniphest Tasks: T88411
Differential Revision: https://developer.blender.org/D11315
|
|
Image Editor
When changing to another texture paint slot, the texture displayed in
the viewport changes accordingly (as well as the image displayed
in the Image Editor).
When changing the active texture in the Node Editor though, only the
texture displayed in the viewport changes.
This was mentioned in T88788 and I am not 100% sure this is desired in
all scenarios (or at all), it should be seen in tandem of D11497. This
change makes it so that the Image Editor changes to the image we changed
to in the Node Editor (keeping them in sync).
If this is not desired in all cases, this could be made an option.
ref T88788
ref D11496
ref D11497
Maniphest Tasks: T88788
Differential Revision: https://developer.blender.org/D11498
|
|
active paint slot
When changing to another texture paint slot, the texture displayed in
the viewport changes accordingly (as well as the image displayed
in the Image Editor).
When changing the active texture in the Node Editor though, only the
texture displayed in the viewport changes.
This _can_ be confusing because you can end up painting on a texture
that you are not looking at in the viewport (so you dont have any
feedback whatsoever). Not 100% sure this is desired in all scenarios,
but this change makes it so that the active paint slot changes to the
one that uses the texture we chaged to in the Node Editor (keeping them
in sync).
If this is not desired in all cases, this could be made an option.
ref T88788
ref D11496
Maniphest Tasks: T88788
Differential Revision: https://developer.blender.org/D11497
|
|
This patch just clamps and rounds node contents and socket locations
so they don't appear to jiggle around when you move them. This issue
happens because node sizing and positioning are in floats while text
content must be pixel-aligned.
See D11684 for more details and comparisons.
Differential Revision: https://developer.blender.org/D11684
Reviewed by Julian Eisel
|
|
|
|
The code assumed that when a node group is is at the highest
level in the node editor, then it is embedded into another data
block and can't be referenced by other node groups. This is true
for shader and compositor nodes, but not for geometry nodes.
|
|
Having settings such as "extend" saved between executions causes
keymaps that don't include this setting to remember the value
between execution.
No longer store this setting for selection operations & remove
redundant values from the key-maps, see: T90275.
|
|
- New operator property to toggle edge panning in the keymap:
This is disabled by default to avoid edge-panning in cases where it
gets distracting, such as adding a new node. Only the explicit
translate operator(s) (GKEY or drag) have this enabled now.
- Restore the initial view rect on edge pan cancel:
The initial view rect is now stored in the edge pan operator data.
When an operator with edge panning is cancelled it can now call the
`UI_view2d_edge_pan_cancel` function to restore the original View2D
rect.
- Less delay in node editor scrolling:
Delay is useful when scrolling through long lists, such as in the
outliner, but makes node scrolling feel sluggish and unresponsive.
The lower scroll speed here makes a faster response the better option.
- Zoom influence feature:
Somewhat slower scrolling in UI-space when zoomed out. With the 0.5
zoom influence factor nodes behave as if zoom factor is halved,
otherwise it gets too fast when zoomed out. Previously scrolling would
always be constant-speed in UI space, now it's half-way between UI
space and node (view) space.
|
|
Differential Revision: https://developer.blender.org/D11198
|
|
|
|
This makes texture sockets have a label by default. This can be changed
by adding the SOCK_HIDE_LABEL flag to the socket. With this change the
switch node now shows the labels "True" and "False" like for the other
types of sockets.
|
|
While this was already the case for the most part
some selection operators stored common settings for reuse such as
"toggle", "extend" & "deselect".
Disabling storing these settings for later execution
as it means failure to set these options in the key-map re-uses
the value of the shortcut that was last called.
Skip saving these settings since this is a case where reusing them
isn't helpful.
Resolves T90275.
|
|
Originally the operator name was drawn next to the dragging content.
After that there was an option to add custom, static text with the
dragging content. This patch allows dynamic text to be drawn.
The custom text was implemented as out parameter of the poll function
what made the code unclear. This patch introduces a tooltip function
that separates tooltip generation from the poll function.
NOTE: the text should always be returned in its own memory block. This
block will be freed after it is copied in the drag struct.
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D12104
|
|
The viewer node in geometry node trees only supports geometry nodes.
This patch ensures that when ctrl shift clicking on a node, it will only
link to geometry sockets.
Differential Revision: https://developer.blender.org/D12055
|
|
|
|
|
|
Differential Revision: https://developer.blender.org/D12008
|
|
|
|
|
|
This is more of a first-pass refactor for the UI list template. More
improvements could be done, but that's better done separately. Main
purpose of this is to make the UI list code more manageable and ready
for the asset view template.
No functional changes for users.
* Split the huge template function into more manageable functions, with
clear names and a few structs with high coherency.
* Move runtime data management to the template code, with a free
callback called from BKE. This is UI data and should be managed at
that level.
* Replace boolean arguments with bit-flags (easily extendable and more
readable from the caller).
* Allow passing custom-data to the UI list for callbacks to access.
* Make list grip button for resizing optional.
* Put logic for generating the internal UI list identifier (stored in
.blends) into function. This is a quite important bit and a later
commit adds a related function. Good to have a clear API for this.
* Improve naming, comments, etc.
As part of further cleanups I'd like to move this to an own file.
|
|
This was a regression in rBc27ef1e9e8e663e02173e518c1e669e9845b3d1f.
|
|
This makes node trees with long links that cross other nodes easier to work with.
Dimmed links will be ignored by various modal operators like cut and reroute insertion.
Differential Revision: https://developer.blender.org/D11813
|
|
Socket inspection helps with debugging a geometry node group.
Now, when hovering over a socket, a tooltip will appear that provides
information about the data in the socket. Note, socket inspection only
works for sockets that have been computed already. Nodes that are not
connected to an output are not computed.
Future improvements can include ui changes to make the tooltip look
more like in the original design (T85251). Furthermore, additional
information could be shown if necessary.
Differential Revision: https://developer.blender.org/D11842
|
|
|
|
The node group interface panels were still implemented in C.
Now they ported over to python for easier maintenance.
Differential Revision: https://developer.blender.org/D11834
|
|
The backdrop image gizmo was not following the backdrop image, it
needs to be refreshed whenever the view changes. The region init
callback is executed whenever the region size changes, so that should be
a reliable place to do that.
Reported as part of T87591.
|
|
Many ui features for geometry nodes need access to information generated
during evaluation:
* Node warnings.
* Attribute search.
* Viewer node.
* Socket inspection (not in master yet).
The way we logged the required information before had some disadvantages:
* Viewer node used a completely separate system from node warnings and
attribute search.
* Most of the context of logged information is lost when e.g. the same node
group is used multiple times.
* A global lock was needed every time something is logged.
This new implementation solves these problems:
* All four mentioned ui features use the same underlying logging system.
* All context information for logged values is kept intact.
* Every thread has its own local logger. The logged informatiton is combined
in the end.
Differential Revision: https://developer.blender.org/D11785
|
|
|
|
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
|
|
This adds a viewer node similar to the one in the compositor.
The icon in the headers of nodes is removed because it served
the same purpose and is not necessary anymore.
Node outputs can be connected to the active viewer using
ctrl+shift+LMB, just like in the compositor. Right now this collides
with the shortcut used in the node wrangler addon, which will
be changed separately.
As of now, the viewed geometry is only visible in the spreadsheet.
Viewport visualization will be added separately.
There are a couple of benefits of using a viewer node compared
to the old approach with the icon in the node header:
* Better support for nodes that have more than one geometry output.
* It's more consistent with the compositor.
* If attributes become decoupled from geometry in the future,
the viewer can have a separate input for the attribute to visualize.
* The viewer node could potentially have visualization settings.
* Allows to keep "visualization points" around by having multiple
viewer nodes.
* Less visual clutter in node headers.
Differential Revision: https://developer.blender.org/D11470
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
This changes `UI_but_func_tooltip_set` so that it allows passing a custom free function, which has two benefits:
* The caller can pass `null` to indicate that the value should not be freed.
* Arbitrary c++ data can be passed to the callback (before the struct had to be trivially destructible).
I added `uiFreeArgFunc` and used it in other places where appropriate.
Differential Revision: https://developer.blender.org/D11738
|
|
|
|
Fixing small typo of word "multi" in function identifier by renaming
"count_mutli_input_socket_links" to "count_multi_input_socket_links"
Differential Revision: https://developer.blender.org/D11732
Reviewed by Hans Goudey
|
|
|
|
|
|
This patch fixes many minor spelling mistakes, all in comments or
console output. Mostly contractions like can't, won't, don't, its/it's,
etc.
Differential Revision: https://developer.blender.org/D11663
Reviewed by Harley Acheson
|
|
Starts scrolling when dragging a node or node link and going outside the current window.
Largely copied from the VIEW2D_OT_edge_pan operator.
Edge panning operator customdata and supporting functions now in
UI_view2d.h, so they could be used by operators in other editor
libraries. The VIEW2D_OT_edge_pan operator also uses this customdata and
shared functions now. Operators properties can be used to configure
edge panning margins and speed for each use case, rather than using
hardcoded values.
The speed function for edge panning has been tweaked somewhat:
* "Speed per pixel" has been replaced with a "speed ramp" distance.
This is more intuitive and also creates an upper bound for the speed,
which can otherwise become extreme with large cursor distance.
* "Max speed" is reached at the end of the speed ramp.
* Padding the region inside and outside is applied as before, but both
values are operator properties now.
Node transform operator also supports edge panning. This requires
an offset for changes in the view2d rect, otherwise nodes are "stuck"
to the original view.
Transform operator had cursor wrapping categorically enabled, but this
gets quite confusing with the edge scrolling mechanism. A new TransInfo
option T_NO_CURSOR_WRAP has been introduced to disable this behavior.
The double negative is a bit annoying, but want to avoid affecting the
existing transform modes, so by default it should still set the
OP_IS_MODAL_GRAB_CURSOR flag (which then sets the WM_CURSOR_WRAP_XY
flag during modal execution).
Reviewed By: HooglyBoogly, JacquesLucke
Differential Revision: https://developer.blender.org/D11073
|
|
Adding e.g. a Collection Info node creates a new depsgraph relation.
Therefore the relations should be updated.
|
|
This commit does two things:
* Disallows creating more than one link from one socket to a multi socket input.
* Properly count links if there happen to be more than one link between the same sockets.
The new link counting should also be more efficient asymptotically.
Differential Revision: https://developer.blender.org/D11570
|