When trying to find and open an older file, it is annoying when it is not in the
recent files list anymore. This patch increases the length of the recent files
list, without making the menu huge by making better use of menu-search.
Specifically the following is changed: * Number of remembered recent files is
increased from 20 to 200 by default. * The recent files menu is limited to 20
entries. * When activating menu search (by pressing space when in the menu), all
available recent files can be searched. * There is a new "More..." menu entry at
the bottom, which also activates the menu search.
Pull Request: https://projects.blender.org/blender/blender/pulls/146884
Calling the swap operators can result in Blender crashing. From my
testing, the behavior is inconsistent, as sometimes a crash is triggered
and other times it isn't. Though notably, they seem involve nodes
already linked to other nodes, or zones.
The crashing stems from the operators trying to access deleted data.
There were two places where this happens that were identified, one
involving removed links and the other involving removed nodes.
Pull Request: https://projects.blender.org/blender/blender/pulls/146909
Previously, the input socket drawing code did not cover all cases with required
and optional labels for all socket types. E.g. menu sockets were never drawn
with label (unless there was some error) regardless of whether `optional_label`
was set or not.
This patch unifies the handling of this flag, i.e. all socket types support
drawing with and without label. This is also required before we can expose this
functionality to users.
Since all menu inputs had optional labels by default before, this patch makes
labels optional explicitly by changing the declaration of all the nodes. This
way, there is no expected user-visible change with this patch.
Pull Request: https://projects.blender.org/blender/blender/pulls/146935
Each socket is generally drawn into a separate row like in `draw_node_input`.
However, this row was not created when a socket had a custom drawing function.
This caused all properties of the Index Switch node to be grayed out in the
sidebar.
The new name better represents the actual meaning of the value.
"hide_value" was wrong because it didn't even hide the label in
many cases.
This property just indicates that the input is still understandable
even if the label is not drawn. It's up to the drawing code to make
the final decision whether the label should be drawn or not. This
option just gives it the opportunity to skip the label if that results
in a cleaner UI.
This removes the `SOCK_NO_INTERNAL_LINK`, `SOCK_COMPACT` and `SOCK_HIDE_LABEL`
flags from `eNodeSocketFlag`. Those are not necessary, because they just store
a copy of the data that is stored in the socket declaration and are thus
effectively runtime data.
None of these flags were exposed to Python, so there is no breakage expected.
Pull Request: https://projects.blender.org/blender/blender/pulls/146925
This was an oversight in the initial implementation. If there is no closure,
the node should behave like if it's muted, so it passes through inputs to
outputs when the names are equal. This is the same behavior as in
Geometry Nodes.
The issue was that the Separate XYZ node was linked to something
expecting a field and something expecting a single value. This
incorrectly resulted in the input getting a field data requirement,
instead of single-value.
There were two issues:
* Missing null checks when the compute context of a socket can't be detected
statically.
* Incorrect parent compute context detection for closures. The tricky aspect is
that closures can be evaluated in a different compute context from where they
are created.
Pull Request: https://projects.blender.org/blender/blender/pulls/146922
The Mix node has multiple subtypes for handling different data types. (Float, Color, Vector, etc.)
Since these are commonly used operations, the different subtypes are made easily accessible
under the names "Mix Color" & "Mix Vector". These are mostly present in the various node
editors. (Shader, Geometry, & Compositing)
Notably, for Shader Nodes, however, only the "Mix Color" entry is present in the Add Menu.
This patch adds the missing "Mix Vector" entry under the "Vector" category of the
Shader Editor Add Menu.
Pull Request: https://projects.blender.org/blender/blender/pulls/142886
This patch exposes the "Rotation" subtype of the Mix node in the Geometry Node Add Menu.
This is in a similar vein to "Mix Color" & "Mix Vector", as it makes this subtype more easily
accessible and searchable in the menu.
Pull Request: https://projects.blender.org/blender/blender/pulls/142887
#140856 added support for output visibility inferencing. Internally, it relied
on checking whether the output value of a group is a constant fallback value,
while on the user level this is mainly controlled with the new `Enable Output`
node. While it works, there are some unexpected behaviors when the user happens
to output the fallback value without expecting the socket to be hidden.
Additionally, this approach required the output value to be inferenced, which
may trigger more evaluation than we'd want.
This patch better aligns the internal behavior with the user-expected behavior.
This is achieved by not relying on any specific fallback values. Instead, for
each output socket it does an explicit check for whether it is connected to an
Enable Output node. Then the Enable input of that node is computed and the
output visibility is derived from that directly. This is still fully composable
with nested node groups etc. It also allows extending this check in the future
to e.g. automatically disable certain anonymous attribute outputs when the
corresponding output geometry is unused.
Note, since only changes in menu sockets are allowed to change visibility by
convention, this also applies here. Same as before.
The main design on the user-level with the Enable Output node is still exactly
the same as before.
Pull Request: https://projects.blender.org/blender/blender/pulls/146918
- Remove the `SI_` prefix from sticky UV selection options.
This was left in from when the option was part of "SpaceImage"
which is no longer the case.
- Use *_SELECT_SYNC, _SELECT_ISLAND (matching RNA identifiers).
- Use "VERT" abbreviation.
Similar to !145387, disable layout when rna property is non editable.
Let the widget code handle the theme of the label in
front of the non-editable property. Also do it separately inside
`v3d_object_dimension_buts` for transform properties of N-panel
Resolves#146290
Pull Request: https://projects.blender.org/blender/blender/pulls/146565
Operators that use BKE_unit_value_as_string results in numbers with a
changing fractional part which frequently jumps around.
The issue became more noticeable with centrally aligned status text,
see !139507.
Address this by disabling stripping of trailing zeros for:
- `translate_dist_to_str`
(used by object translation, extrude, rip region).
- Mesh bevel
- Inset faces
- Shrink/fatten
- Eyedropper depth sampling (e.g. in camera DOF)
Ref !140790
Previously, the tooltip of the output socket was shown when hovering
over the socket value in a node. This was misleading because the hovered
value is actually the input.
The output tooltip is still accessible by hoving the output socket shape.
The goal here is to simplify working with the common pattern where a Menu Switch
node is followed by an Index Switch node. This is achieved by detecting this
pattern and drawing the item names from the menu switch node in the index switch
node.
This slightly refactors the custom socket drawing callback to make it easier for
it indirectly call the default drawing function.
Pull Request: https://projects.blender.org/blender/blender/pulls/145710
The workaround of forcing BVH building into single thread
execution on the Blender side is not needed anymore,
because the problem was properly fixed in the upstream
since Embree upgrade in Blender 4.5
This reverts commit c0f0e2ca6f.
Pull Request: https://projects.blender.org/blender/blender/pulls/146859
This node outputs tangent values for face corners. There are two methods:
- **Exact** is the same MikkTSpace calculation used elsewhere in Blender.
- **Fast** (from #131308) is over 4x faster, and useful in many of
the same situations, though not necessarily tangential to the surface.
The reason to include both methods is that there are use cases where the
quality of the tangents don't matter (though the results are actually very
similar visually), we just need some continuous values across faces.
Pull Request: https://projects.blender.org/blender/blender/pulls/145813
This extends the ctrl+F search to also support searching for some socket values.
The original motivation for this came from the need to search for a Warning node
by its warning (instead of node name or label). However, I found this to be more
generally useful as it can also be used to search for places where e.g. certain
attribute names are used or where e.g. some object is referenced in an input
socket.
Pull Request: https://projects.blender.org/blender/blender/pulls/146882
This is a small usability feature to simplify adding additional inputs in the
Index Switch and Menu Switch nodes without having to go to the sidebar.
Technically, something similar can be done for other extend-sockets. However,
here it works best, because one does not have to choose the socket type. For
other inputs we could use a quick popup when pressing the button, but that seems
outside of the scope of this patch.
Later we might also want add the ability to remove existing inputs. But just
adding an icon for that doesn't work so well for socket types that have an input
property.
Co-authored-by: Brady Johnston <36021261+BradyAJohnston@users.noreply.github.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/145915
Currently, matrix attributes in the spreadsheet are difficult to inspect.
This PR improves the readability of matrix tooltip, formatting it into
a column-aligned grid. Display floats with 6 significant digits
(3 for abs(x)<1e-4).
Pull Request: https://projects.blender.org/blender/blender/pulls/146207
Previously, the closure and bundle nodes were a bit restrictive when it comes to
socket shapes. Especially the bundle nodes did not support customizing the
socket shape at all, so they always worked with dynamic values. This was
problematic, because it meant that e.g. the outputs of the Separate Bundle node
looked like they couldn't be used as single values, and other similar issues.
With this patch, the following is supported (a few aspects were supported before
but now it all fits better together): * Support manually selecting socket shapes
in Combine Bundle, Separate Bundle, Closure Input, Closure Output and Evaluate
Closure nodes. * Automatic inferencing of shapes in all these nodes, as long as
the socket shape is set to "auto". * A new "Define Signature" option can be
enabled in the nodes. If enabled, linked nodes will also sync the socket shapes
from that node. In the future, we also want to add support for naming the
signature.
Pull Request: https://projects.blender.org/blender/blender/pulls/145550
Currently cameras composition guide colors are defined in theme, and not even by an individual
property. They follow 3D Viewport -> View Overlay color, which also defines many other things,
such as world origin cursor. By default it's black and it's difficult to change, because then other
things stand out. But using default black for composition guides is impossible.
This PR, instead, adds new Composition Guide Color property on camera, and uses it in camera view.
This not only fixes the issue mentioned above, but also allows different cameras in one scene to
have different overlay colors. This is very handy when you have, for example, two cameras, one of
which looks at the black corner, and another at the lit-up white one. Using a single black or white color
in this case makes the other one more difficult to see. Now, each camera can have its own color.
This PR only changes color for Composition Guides, and NOT for Safe Areas and sensor. Reasons are:
- It's important to differentiate between different concepts, having everything one color is distracting
- Safe areas are per-scene and shared with Sequencer preview. The camera shouldn't dictate color there.
I have separate plans about handling safe areas in the future.
Images in the PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/143788
Currently, only the visibility of input sockets can be changed dynamically based
on other menu inputs. However, under some circumstances, it can also be useful
to hide certain outputs. For example, the built-in Curve Arc primitive node does
that.
This patch adds support for automatic detection of unused outputs. How to detect
unused outputs is less straight forward compared to inputs. This patch uses the
rule that an output is unused if it always outputs a "fallback value" (typically
0) irrespective of the currently used inputs. If the output is independent of
all inputs, it stays visible though.
There is a new small utility node called "Enable Output". It replaces a value
with it's fallback value unless it is disabled. This simplifies setting up
unused outputs. In theory, a normal switch node can also be used, but that is
less usable and the user will have to hardcode the fallback value for each type
which is not something that is explicitly exposed yet.
Supporting dynamic output visibility is also a prerequisite for exposing some
menu node options as sockets (e.g. in the Arc node).
Pull Request: https://projects.blender.org/blender/blender/pulls/140856
We did not sanitize the names used for UV maps or Color attributes when
exporting to Alembic. Names containing characters like ':' or '/' would
cause an unhandled exception from Alembic.
Pull Request: https://projects.blender.org/blender/blender/pulls/146867
New `--log-list-categories` command line argument to list all available
logging categories. This improves documentation of logging, allowing
users to understand what logging categories are available for use. It is
also useful for developers to understand what logging categories already
exist before making a change.
Implemented using static initializers to register all logrefs on startup.
Ref #141754
Pull Request: https://projects.blender.org/blender/blender/pulls/146456
In Render properties > Color Management > Display.
* Off: Directly output image as produced by OpenColorIO. This is not correct
in general, but may be used when the system configuration and actual display
device is known to match the chosen display.
* Automatic: Display images consistent with most other applications, to preview
images and video for export. A best effort is made to emulate the chosen
display on the actual display device.
The option is grayed out when the current OpenColorIO config and display/view
does not support emulation.
Ref #145022, #144911
Pull Request: https://projects.blender.org/blender/blender/pulls/146808
Updates the `CurveMapping` `CURVE_PRESET_SMOOTH` curve to more closely
approximate the smoothstep function (y = 3x^2 - 2x^3). This has the
implication of changing what happens when the curve is reset, but does
not change any existing curves already stored in blendfiles.
Notably, this change primarily affects three operators:
* brush.curve_preset (Mesh Sculpting)
* brush.sculpt_curves_falloff_preset (Curves Sculpting)
* render.shutter_curve_preset (Motion Blur)
Pull Request: https://projects.blender.org/blender/blender/pulls/146710