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-03Cleanup: Use typed enum for node resize directionHans Goudey
2021-12-02Fix T92268: Group input and output nodes have inconsistent paddingNikhil Shringarpurey
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
2021-12-02UI: Add an option to display the node editor context pathHans Goudey
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
2021-11-29Fix T93438: Auto linking do not work for custom socketsOmar Emara
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
2021-11-24Geometry Nodes: add utility to show debug messages in node editorJacques Lucke
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
2021-11-23Cleanup: Else after return, other simplificationsHans Goudey
`std::stringstream` already returns a `std::string`, and there is no particular reason to use short here instead of int.
2021-11-23Geometry Nodes: Node execution time overlayErik
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
2021-11-23Geometry Nodes: reduce overhead when processing single valuesJacques Lucke
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
2021-11-19Cleanup: Use vector instead of linked listHans Goudey
2021-11-19Cleanup: Simplify node editor link dragging storageHans Goudey
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
2021-11-19Merge branch 'blender-v3.0-release'Jacques Lucke
2021-11-19Fix T87912: use session id instead of name to identify dropped objectJacques Lucke
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
2021-11-19Merge branch 'blender-v3.0-release'Omar Emara
2021-11-19Fix T93184: Link color not used for custom socketsOmar Emara
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
2021-11-18Node Editor: Change minimum zoomErik
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
2021-11-18Node Editor: Skip socket drawing on low zoomErik
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
2021-11-18Cleanup: Simplify declarations in C++ headerHans Goudey
Using `struct` everywhere is unnecessary in C++, and the typedefs are also unnecessary.
2021-11-18Cleanup: Use const argumentsHans Goudey
2021-11-18UI: Use full word "Start" instead of "Sta"Nikhil Shringarpurey
Differential Revision: https://developer.blender.org/D13098
2021-11-17Cleanup: use same function for updating internal links for all nodesJacques Lucke
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.
2021-11-17Cleanup: Use bool instead of intHans Goudey
2021-11-13BLF: Use Floats for Font Point SizesHarley Acheson
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
2021-11-13Cleanup: spelling in comments, comment block formattingCampbell Barton
2021-11-12Cleanup: Move remaning node editor files to C++Hans Goudey
Differential Revision: https://developer.blender.org/D13200
2021-11-11Merge branch 'blender-v3.0-release'Hans Goudey
2021-11-11Fix T89313: Attribute search crash with animation playbackHans Goudey
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
2021-11-09Merge branch 'blender-v3.0-release'Thomas Dinges
2021-11-09Node Editor: Display warning when using Nishita sky texture with EeveeThomas Dinges
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
2021-11-08Nodes: store socket declaration reference in socketJacques Lucke
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.
2021-11-04Fix T92814: improve automatic linking when inserting Float Curve nodeJacques Lucke
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
2021-11-04Fix T92791: collapsed nodes scaling widget wrong with interface scalePhilipp Oeser
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
2021-11-02Fix lots of missing messages i18n handling in `uiItemL` calls.Bastien Montagne
Also fix several wrong usages of `IFACE_` (as a reminder, error/info messages should use `TIP_`, not `IFACE_`).
2021-11-02UI: Use socket type info color to draw linksOmar Emara
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
2021-10-27Fix T92427: Adding new nodes does no edge-panningPhilipp Oeser
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
2021-10-27Nodes: Cleanup code for header underline alphaPablo Vazquez
Use `UI_GetThemeColorBlend4f` instead of manually setting alpha opaque.
2021-10-27Nodes: Cleanup setting node header alphaPablo Vazquez
Always draw header opaque, set transparency only once after getting the color. Helps to unify the color and alpha values.
2021-10-26Node Editor: Style update to nodesPablo Vazquez
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
2021-10-26Fix: Show node editor dot grid when there is no node treeHans Goudey
2021-10-26UI: Improve node editor breadcrumbs displayHans Goudey
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
2021-10-26Fix T92505: previewing specific node outputs did not work anymoreJacques Lucke
This was missing from my refactor in rB5bfe09df2244cb9de0b6554a378eecef77b1e75d.
2021-10-26Nodes: support transparency for link highlight colorDorian
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
2021-10-26Geometry Nodes: remove reference to anonymous attributes in tooltipsJacques Lucke
This changes socket inspection for fields according to T91881. Differential Revision: https://developer.blender.org/D13006
2021-10-26Geometry Nodes: don't log full fields when not necessaryJacques Lucke
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.
2021-10-26Geometry Nodes: support viewing field values in spreadsheetJacques Lucke
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
2021-10-26UI: Change node editor grid into a dot gridHans Goudey
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
2021-10-25Geometry Nodes: new Image Texture nodeJacques Lucke
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
2021-10-25Fix T92446: node editor overlays reset automaticallyJacques Lucke
Caused by rBcf72b10075758be971f9806b97db01f98383aba2. The fix is to only enable the flags when a new node editor is actually created.
2021-10-23UI: Turn on overlays by default in new node editorsHans Goudey
This was missed in the initial commit adding the node editor overlays.
2021-10-22Geometry Nodes: disable attribute search for non-attribute string socketsJacques Lucke
This is a simplified version of D12730 by @erik85. I added attribute search only to one legacy node for testing purposes.
2021-10-22Nodes: fix link drawing for some socket typesJacques Lucke
The type of sockets is `-1` in some cases, resulting in a crash when accessing the `std_node_socket_colors` array.