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-09-28Geometry Nodes: Dashed lines for function flowDalai Felinto
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
2021-09-27Geometry Nodes: make field links thinner than other linksJacques Lucke
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
2021-09-24Nodes: initial support for socket tooltipsJohnny Matthews
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
2021-09-23Geometry Nodes: Initial socket visualization for fields.Jacques Lucke
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
2021-09-23Cleanup: Remove hardcoded values and rename keyframe shape shadersDalai Felinto
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
2021-09-22Geometry Nodes: Add legacy warning and "View Legacy" operatorHans Goudey
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
2021-09-19Compositor: Add OIDN prefiltering option to Denoise nodeManuel Castilla
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
2021-09-17UI: enable the depend-on-cursor flag for some operatorsCampbell Barton
- Bend (Transform). - Extrude to Cursor. - Lasso Select (related operators such as node-cut links, mask.. etc). - Rip Mesh / UV's. - Vertex/Edge Slide.
2021-09-11Geometry Nodes: add field support for socket inspectionJacques Lucke
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
2021-09-10Geometry Nodes: Add versioning to change legacy node ID namesHans Goudey
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
2021-09-03Fix T88411: Draw frame node text when label is emptyLeon Leno
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
2021-08-31Texture Paint: sync changing active texture in the Node Editor to thePhilipp Oeser
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
2021-08-31Texture Paint: sync changing active texture in the node editor to thePhilipp Oeser
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
2021-08-27UI: Reduce Node Contents Jiggling When MovedHarley Acheson
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
2021-08-26Fix T90959: crash when hovering over empty data block socketJacques Lucke
2021-08-25Fix T90248: missing depsgraph update tag for node groupJacques Lucke
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.
2021-08-25Cleanup: skip saving selection properties set in the keymapCampbell Barton
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.
2021-08-24Nodes: Improvements to edge panning in the node editor.Lukas Tönne
- 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.
2021-08-23Fix T88107: rename Convertor to Converter nodes to correct spellingJames Partsafas
Differential Revision: https://developer.blender.org/D11198
2021-08-10Fix invalid string comparison in cd692c6954629e977250ec7c12509ffd3f9Campbell Barton
2021-08-10Geometry Nodes: Add labels for switch node texture socketsWannes Malfait
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.
2021-08-03WM: don't store selection properties typically set in the key-mapCampbell Barton
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.
2021-08-02WindowManager: Support Dynamic tooltips when dragging.Jeroen Bakker
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
2021-07-28Fix T90221: geometry viewer node links to other socket typesWannes Malfait
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
2021-07-27Cleanup: comment spelling & punctuationYimingWu
2021-07-26Cleanup: spelling in commentsCampbell Barton
2021-07-23Fix T90065: disable attribute search in places where there is too little contextJacques Lucke
Differential Revision: https://developer.blender.org/D12008
2021-07-23Cleanup: code comments punctuation / spacingCampbell Barton
2021-07-21Cleanup: replace NB with NOTE in commentsCampbell Barton
2021-07-15UI: UI list refactor & preparations for asset view templateJulian Eisel
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.
2021-07-15Fix: crash when creating new node linksJacques Lucke
This was a regression in rBc27ef1e9e8e663e02173e518c1e669e9845b3d1f.
2021-07-15Geometry Nodes: dim links whose start and end sockets are not visibleJacques Lucke
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
2021-07-14Geometry Nodes: initial socket inspectionJacques Lucke
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
2021-07-09Fix: crash when using empty attribute searchJacques Lucke
2021-07-09Nodes: Moved group interface panel code to python.Lukas Tönne
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
2021-07-08Fix compositor backdrop gizmo refresh problem when toggling sidebarJulian Eisel
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.
2021-07-07Geometry Nodes: refactor logging during geometry nodes evaluationJacques Lucke
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
2021-07-07Cleanup: clang-tidy, unused functionCampbell Barton
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-07-05Geometry Nodes: new Viewer nodeJacques Lucke
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
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-30UI: custom free function improvementsJacques Lucke
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
2021-06-30Cleanup: use const arguments for accessor functionsCampbell Barton
2021-06-29Typo in function identifier: mutli -> multiHarley Acheson
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
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-22Cleanup: Spelling MistakesLeon Zandman
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
2021-06-16Edge-scrolling for node editorLukas Tönne
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
2021-06-14Fix T88494: add missing depsgraph relation update tagsJacques Lucke
Adding e.g. a Collection Info node creates a new depsgraph relation. Therefore the relations should be updated.
2021-06-14Fix T88807: crash when there are multiple links between the same socketsJacques Lucke
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