Commit Graph

154255 Commits

Author SHA1 Message Date
Nika Kutsniashvili
1067112c11 UI: Theme: Remove "Active Spline" theme property
In 3D Viewport theme settings there is "Active Spline" property, which behaves weirdly.
Color of that property is multiplied to color of curve handles. Even though it says active,
it's multiplied in selected and unselected states, for all curves all the time.

That doesn't make much sense, has no real value, and ends up only causing confusion.
Having this property on anything but pure black means that whatever colors you choose
for curve handles in Preferences isn't actually what you're getting them. If color is set to
high-saturation color it completely washes away all colors and makes it difficult to differentiate
between handle types.

I think there is no reason for this property to exist, so this PR just removes that property.

Pull Request: https://projects.blender.org/blender/blender/pulls/145360
2025-09-29 12:27:16 +02:00
Casey Bianco-Davis
f8d2a3af38 Python: Rename bpy.types.GreasePencilv3 to bpy.types.GreasePencil
This renames python Grease Pencil type
from `bpy.types.GreasePencilv3` to `bpy.types.GreasePencil`.

Part of #125058.

Pull Request: https://projects.blender.org/blender/blender/pulls/146902
2025-09-29 12:25:23 +02:00
Bastien Montagne
80ccab6175 I18N: Updated UI translations from git/weblate repository (2e2448ef0145f1). 2025-09-29 12:10:39 +02:00
Pablo Vazquez
7089def6cb UI: Add icons to Compositor nodetree sub-type menu
* Use Scene data icon for Scene.
* Use Sequencer editor icon for Sequence.
* Update tooltips.
2025-09-29 11:18:22 +02:00
Damien Picard
950a2bb8a3 I18n: Use correct translation context for node socket in side bar
Node socket labels used their declared translation context in the
nodes themselves, but not in the editor side bar.

Pull Request: https://projects.blender.org/blender/blender/pulls/146731
2025-09-29 11:07:05 +02:00
Damien Picard
e4d5368908 I18n: Use translation context from declaration for menu socket items
Allow translating node menu socket items using the declared socket
translation context.

In order to do this, the context needs to be copied to the socket's
default_value property when the tree is evaluated. To do that, the
context is redefined inside the prop's itemf callback, getting it from
the socket declaration.

In addition, add contexts to two sockets related to color.
2025-09-29 11:07:03 +02:00
Damien Picard
d064e17d7c Refactor: Move node_socket_translation_context to bke 2025-09-29 11:07:03 +02:00
Damien Picard
9bd249746a I18n: Translate UI for "Curve Data" panel
This panel defines labels manually, through a helper function
`add_labeled_field`. This commit simply adds `IFACE_` translation
macros around the labels.
2025-09-29 11:07:03 +02:00
Damien Picard
417792f7fe I18n: Define NO_TRANSLATION ("Do not translate") context
This new translation context is for some special cases when
translation cannot be avoided, for example in an interface where some
props are built-in (translatable) and others are
user-defined (non-translatable), but we don't know which ones in
advance.

It allows specifying explicitly that translation should not occur
for user data when building the UI.

It is a followup to !145963, in which the context was introduced as a
string literal instead of a defined context.
2025-09-29 11:07:03 +02:00
Damien Picard
13d4829b7b I18n: Disambiguate "Meta" in the context of NLA's meta strips
Use the "Action" context for this, if in any language it's different
from a sequencer meta strip, which already uses "Sequence".

Reported by Ye Gui in #43295.
2025-09-29 11:07:03 +02:00
Damien Picard
4e034b5ecb I18n: Improve message extraction for node socket declaration
Node sockets could already be declared using:

```cpp
add_input<decl::<SOCKET TYPE>>("NAME")
```

They can now additionally be declared with:

```cpp
add_input(socket_type, "NAME")
```

This commit adds the later form to the message extraction regex. Since
they are mutually exclusive, they are now in a non-capturing group
with an | operator.

Reported by Ye Gui in #43295.
2025-09-29 11:07:03 +02:00
Damien Picard
fb2f5b3a64 I18n: Translate dynamic enum items from glTF exporter
These dynamic enum items cannot be extracted automatically, so mark
them manually.

Reported by Ye Gui in #43295.
2025-09-29 11:07:03 +02:00
Damien Picard
13135a6bfa I18n: Translate the name of newly-created collections 2025-09-29 11:07:03 +02:00
Damien Picard
c6f3936c0a I18n: Translate "Name" placeholder text in shader Attribute node
Reported by Ye Gui in #43295.
2025-09-29 11:07:03 +02:00
Damien Picard
263bc0d5cd I18n: Translate Node Wrangler shortcut list in add-on preferences
Reported by Ye Gui in #43295.
2025-09-29 11:07:03 +02:00
Damien Picard
4910b2d0a2 I18n: Translate "Shape" label in node editor's group socket settings
Reported by Ye Gui in #43295.
2025-09-29 11:07:03 +02:00
Damien Picard
0ef4320362 I18n: Translate "Subprocesses" label in System preferences
Reported by Ye Gui in #43295.
2025-09-29 11:07:03 +02:00
Damien Picard
6983b97640 I18n: Translate newly-created node group names
Reported by Ye Gui in #43295.
2025-09-29 11:07:03 +02:00
Damien Picard
8abd92caf0 I18n: Translate file working colorspace operator menu in properties
The items in this operator menu are extracted using the default
translation context, so this commit changes the UI to use the same
context.
2025-09-29 11:07:03 +02:00
Damien Picard
285c1ee8bb I18n: Get displays, views, looks, colorspaces info from OCIO config
This extracts the names and descriptions for displays, views, and
colorspaces. They are all used in the different parts of the UI.
The views' descriptions are used for the displays'.

The extraction uses the built-in PyOpenColorIO module. This ensures
only data that is actually used is extracted (not ignored in the
config).
2025-09-29 11:07:03 +02:00
Damien Picard
51cdcc3186 I18n: Translate asset origin tooltips in asset browser 2025-09-29 11:07:03 +02:00
Julien Duroure
7e0566b26e glTF: deprecation of use_nodes
use_nodes is now deprecated in Blender 5.0

- Remove check checks
- Remove all nodes before creating the node tree is no more needed : these nodes are no more created at material creation
2025-09-29 10:49:59 +02:00
Pablo Vazquez
65999a1b03 Template: Minimum updates to VFX template
Implements #146360

Update VFX template with minimum changes:
- Replace Timeline with DopeSheet footer.
- Save (with compression). 525kb → 92kb

All changes were done on a release build at 1920x1080, without a
preferences folder.

See PR for details and screenshtos.

Pull Request: https://projects.blender.org/blender/blender/pulls/146851
2025-09-29 10:45:44 +02:00
Julien Duroure
a673c627e5 Fix #142767 - glTF exporter: Fix crash with shader node group traversal
Make sure to pass group_path by value in recursive function
2025-09-29 10:43:38 +02:00
Lukas Stockner
fc5c6ab374 Fix #146223: Cycles: Wrong output with multi-device OSL rendering
We used to set shader->osl_surface_ref during shader compilation and then
pushed it into the shared vectors.

This worked as long as everything was serial - but after the multithreading
change, we a) compile everything and then b) build the shared vectors since
just pushing into them from multiple threads would not work.

However, if there are multiple devices, then each shader will be compiled
multiple times - so in the end, shader->osl_surface_ref etc. will be set
to the last device's value. Then, we end up pushing that value into every
device's vectors, which breaks for the earler devices.

The fix is simple - just preallocate the vectors and pass the correct index
into the compilation function. This way, each thread can safely store its
result and we can get rid of shader->osl_surface_ref entirely.

Note that while multiple shaders are compiled in parallel, the loop over
devices for a given shader is serial, so there's no concern of conflicts
over other shader internals.

Pull Request: https://projects.blender.org/blender/blender/pulls/146617
2025-09-29 03:12:18 +02:00
Amogh Shivaram
2bd06093c7 Cycles: Thin film iridescence for metals
Applies thin film iridescence to metals in Metallic BSDF and Principled BSDF.

To get the complex IOR values for each spectral band from F82 Tint colors,
the code uses the parametrization from "Artist Friendly Metallic Fresnel",
where the g parameter is set to F82. This IOR is used to find the phase shift,
but reflectance is still calculated with the F82 Tint formula after adjusting
F0 for the film's IOR.

Co-authored-by: Lukas Stockner <lukas@lukasstockner.de>
Co-authored-by: Weizhen Huang <weizhen@blender.org>
Co-authored-by: RobertMoerland <rmoerlandrj@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/141131
2025-09-29 02:58:20 +02:00
Damien Picard
6c6d1a9b63 Cycles: OSL Camera: Improve Property UI
This expands Cycles' support for handling OSL property metadata for
Custom camera parameters and translating it to Blender's UI.

Specifically, it adds support for:
- Translation inputs (`string vecsemantics = "POINT"`)
- Normal inputs (`string vecsemantics = "NORMAL"`)
- File inputs (`string widget = "filename"`)
- Angle inputs (`string unit = "radians"`)
- Distance inputs (`string unit = "m"`)
- Time inputs (`string unit = "s"` or `string unit = "sec"`)
- Enum inputs (`string widget = "mapper", string options = "left:0|right:1"`)

It also sets the default value correctly, and corrects a warning string to
also mention cameras in addition to nodes as possible users of OSL shaders.

Co-authored-by: Lukas Stockner <lukas@lukasstockner.de>
Pull Request: https://projects.blender.org/blender/blender/pulls/146736
2025-09-29 02:20:23 +02:00
Hans Goudey
b5863c401e Fix: Geometry Nodes: Function nodes crash for unsupported grid types
The multi-function node evaluation code correctly didn't create a grid
with an unsupported type, but then the code crashed in the logging
code when setting default for the outputs. Instead just use a common
utility for that goal. And also add support for executing a function node
if only outputs with supported types are required (for example when
creating a grid for the "Fac" output of the noise node, but not the
color output).

Pull Request: https://projects.blender.org/blender/blender/pulls/146937
2025-09-29 01:49:01 +02:00
Colin Basnett
a0a43c0805 Fix: Remove animatable flag from execution_time property
This property is not user editable and is calculated internally. When presented as a property in the UI, it shows the animatable button which is useless. This just removes the flag.

Pull Request: https://projects.blender.org/blender/blender/pulls/146907
2025-09-28 23:02:58 +02:00
Jacques Lucke
96ce5ee0c0 Cleanup: use utility method to get node group input usage
This also results in a small speedup because of the early exit
in is_group_input_used.
2025-09-28 21:19:19 +02:00
Jacques Lucke
fa03d2558c UI: support searching for more recent files
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
2025-09-28 20:22:02 +02:00
Jacques Lucke
2b6da476f2 Cleanup: Nodes: remove dead code 2025-09-28 20:11:15 +02:00
quackarooni
e7cae0b220 Fix: Nodes: Occasional crashing when using swap operators
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
2025-09-28 19:40:55 +02:00
Jacques Lucke
f79896f5b9 Refactor: Nodes: unify optional-label handling for sockets
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
2025-09-28 19:38:14 +02:00
Jacques Lucke
305304e16c Fix: Nodes: socket active status affects other sockets
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.
2025-09-28 17:46:23 +02:00
Jacques Lucke
469a70dba9 Cleanup: Nodes: rename hide_label to optional_label internally
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.
2025-09-28 17:30:21 +02:00
Jacques Lucke
1f489ea31a Cleanup: Nodes: remove some runtime socket flags
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
2025-09-28 17:18:49 +02:00
Jacques Lucke
6ad9bf8af8 Fix #146521: Evaluate Closure node without closure behaves incorrectly
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.
2025-09-28 16:24:48 +02:00
Jacques Lucke
2d206f2927 Fix #146459: wrong warning that input does not support fields
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.
2025-09-28 16:14:29 +02:00
Jacques Lucke
99f84a8987 Fix #146345: assert when tracing closure value through nested zones
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
2025-09-28 15:39:17 +02:00
quackarooni
7e25ed26f0 Nodes: add "Mix Vector" to Shader Editor Add menu
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
2025-09-28 14:21:44 +02:00
quackarooni
4498cb7baa Geometry Nodes: add "Mix Rotation" to Add menu
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
2025-09-28 14:20:14 +02:00
Jacques Lucke
e3e7bd670a Nodes: simplify rule for output visibility inferencing
#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
2025-09-28 13:52:52 +02:00
Jesse Yurkovich
48b2f472f3 Fix #146910: Update path for Smooth by Angle asset
Pull Request: https://projects.blender.org/blender/blender/pulls/146911
2025-09-28 13:19:52 +02:00
Campbell Barton
182d8ef142 Docs: add doc-strings for UV sticky selection 2025-09-28 16:03:29 +10:00
Campbell Barton
1453871dea Cleanup: rename UV selection options
- 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.
2025-09-28 15:15:19 +10:00
Pratik Borhade
8de2e6f9fb UI: Gray out labels for non-editable linked items
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
2025-09-28 07:06:21 +02:00
John Kiril Swenson
8e934e7af0 UI: Reduce text jumping for dynamic length values
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
2025-09-28 12:36:01 +10:00
Jacques Lucke
8b05fb62f0 Fix: Nodes: prioritize tooltip for input socket for inlined sockets
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.
2025-09-27 23:12:32 +02:00
Jacques Lucke
3338e7d70e Fix: Nodes: reroute nodes should always use circle shape
This was accidentally changed before when the new socket shape
inferencing was introduced.
2025-09-27 23:02:13 +02:00