Commit Graph

154543 Commits

Author SHA1 Message Date
Casey Bianco-Davis
559f9b29cd UI: Theme: Update Curves Handle Type colors
This PR Updates the default colors of the Curve Handle types,
to increase readability and contrast.
Each color more different from each other to not be confusing.

Logic for the new colors:
* Purple/Dark blue is used for the `Vector` type to match the header
  and sockets of Vector nodes.
* Red is used for `Auto` to show that they're locked and can't be
  changed without converting the type.
* Pink/Salmon color is used for `Auto-Clamped`  to be similar to `Auto`
   while still being distinct.
* The remaining colors are chosen to be visually distinct from the
  other colors.

This also fixes a problem caused by 1067112c11 (#145360) where
Free handle were left fully black. These black handles are extremely
hard to use with Grease Pencil objects, because Grease Pencil strokes
often are black. Because the `Free` handle selected color is also black,
handles do not show if they are selected.

Co-authored-by: Nika Kutsniashvili <nickberckley@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/147335
2025-10-06 11:42:49 +02:00
Falk David
3e21341188 Cleanup: VSE: Refactor seq_render_scene_strip
* Removes the `goto` statements
* Pulls out the store/restore logic into a higher-level function

Pull Request: https://projects.blender.org/blender/blender/pulls/147279
2025-10-06 11:37:59 +02:00
Jeroen Bakker
662a49f5db Fix #145315, #147064: Vulkan: Various artifacts on Qualcomm devices
Qualcomm driver team found an issue how Blender uses dynamic rendering.
The issue is that between suspend/resume of rendering only a limited
commands are possible. However we add commands that shouldn't be added
there. It is a violation of the Vulkan spec
VUID-VkSubmitInfo-pCommandBuffers-06015

It went unnoticed as it is mere a single line in the 5000+pages spec
and wasn't covered by the validation layers. This has been reported
upstream.

To fix this issue we remove the usage of suspending/resuming render
passes and fix any issue that used this together with clearops. Most
likely the fix will require a second dynamic rendering pass when
clearops are used.

Pull Request: https://projects.blender.org/blender/blender/pulls/147425
2025-10-06 11:34:47 +02:00
Bastien Montagne
f91af6a1be I18N: Update UI translations from git/weblate repository (06ac55f940874). 2025-10-06 11:14:16 +02:00
Philipp Oeser
23fcfa3e4c Fix #147070: Proportional editing even when disabled in object mode
This happened if proportional editing was enabled in editmode, not
having an active object plus being in object mode.

The transform system `convert_type_get` assumes
`TransConvertType_Object` if we dont have an active view layer object.

Corresponding code for proportional editing detection [in
`initTransInfo` & `saveTransform`] wasnt though (it used `toolsettings`
`proportional_edit` -- not `proportional_objects` -- in that case).

This is now corrected.

Probably caused by e91d581167

Pull Request: https://projects.blender.org/blender/blender/pulls/147193
2025-10-06 10:57:49 +02:00
Jacques Lucke
ceca413bcb RNA: add callback to support dynamic property ui name
This adds a new `PropertyRNA::name_func` property which is similar to the many
existing functions like `editable`, `get_default`, etc. It allows dynamically
getting a UI name for the property.

This is especially useful for node sockets, because those all have the same
hardcoded name "Default Value" which is not helpful. Since we already have
custom tooltips for sockets, this is mostly not visible to the user anymore. The
exception being menu sockets which draw the property name as title. Instead of
"Default Value", this patch makes it show the correct title.

Pull Request: https://projects.blender.org/blender/blender/pulls/147137
2025-10-06 10:40:05 +02:00
Philipp Oeser
47a0d9b52f Fix #146529: Crash getting RNA path to scene rigid body pointcache
Spawning the tooltip or changing values would cause this.

Error in 28827b62f7

Above commit only considered PointCaches associated with **objects**,
not taking into account scene rigid body cache.
This is now added with this PR.
Previously it would cast into modifiers when we actually had a scene as
owner... resulting in a crash.

This was only exposed by 6bf8685628 (it crashes since, was just not
working properly before...). 6bf8685628 changed the data layout of
`struct Object` and only by pure luck the modifiers loop was skipped, now
with the new layout it is entered (but with garbage data resulting in the crash.

Pull Request: https://projects.blender.org/blender/blender/pulls/146577
2025-10-06 09:38:39 +02:00
Jesse Yurkovich
6ffd9be9a6 Fix: USD: Prevent unsupported point instancing setups from causing warns
If we detect an unsupported point instancing setup, do not attempt to
still export it out. Depending on the number of instances this can spew
10's of thousands of USD warning traces to the console.

Pull Request: https://projects.blender.org/blender/blender/pulls/147253
2025-10-06 04:42:39 +02:00
Nathan Vegdahl
af63d06739 Fix #147009: Anim: Normalize All fails when all groups are unlocked
When all vertex groups are *unlocked* and the Normalize All operator is
run with "Lock Active" disabled, the operator would fail with the
patently false error message "All groups are locked".

The cause was that:

1. When all vertex groups are unlocked, the lock flags array used
   internally would be left empty, with the idea that a non-existent
   flag indicates "unlocked".
2. The code that determined if all groups were locked was checking
   if any of those flags were "unlocked".
3. In an empty array, of course no items are "unlocked", and thus
   it would think all items are locked.

The fix in this PR is to also check if the flag array is empty when
determining if all groups are locked.

Pull Request: https://projects.blender.org/blender/blender/pulls/147272
2025-10-06 03:51:21 +02:00
Nathan Vegdahl
e6f1cd6a29 Anim: remove deprecated XYZ_TO_RGB flag on keyframe_insert()
The `INSERTKEY_XYZ_TO_RGB` flag on `datablock.keyframe_insert()` in
Blender's Python API was changed to do nothing in #115297 and #119625,
in favor of determining fcurve coloring exclusively from user preferences.

This PR removes that now-useless `INSERTKEY_XYZ_TO_RGB` flag entirely.

Pull Request: https://projects.blender.org/blender/blender/pulls/147262
2025-10-06 03:46:54 +02:00
Hans Goudey
21d2ce19f8 Fix #147260: Freestyle mark not saved in files in some cases
When there was no other data written in the CustomData for edges
or faces, the layers pointer would be null, and even though the layer
array we write isn't empty, the writing would be skipped. The fix
is just to make sure the layer pointer isn't null.

Pull Request: https://projects.blender.org/blender/blender/pulls/147411
2025-10-06 02:25:09 +02:00
Pablo Vazquez
65d5b94740 UI: Slightly widen some popovers
Increase width in some popovers where labels would get trimmed.

This was even worst for other languages, but at least now labels don't
get ellipsis by default (English at 1.0 UI scale).
2025-10-05 23:36:04 +02:00
Pablo Vazquez
a7923de9e3 UI: Add missing icons for Undo/Redo in Edit menu
These are pretty universal and could be used as icon-only buttons,
so it's good to use them to create a visual connection.
2025-10-05 23:06:33 +02:00
Campbell Barton
c5a317789d PyAPI: rename BMesh.select_flush_mode "down" argument to "flush_down"
Based on the Python API for UV selection (!138197),
some methods that set the selection need a flush down argument too,
name the argument more clearly so the same name can be used by
all selection functions.
2025-10-05 10:38:41 +11:00
tariqsulley
5282a2f033 Fix #146183: Assert in Mesh->Transform->Randomize
Enabling the normal parameter in the randomize operator triggered a
debug assert, since BKE_object_get_editmesh_eval_cage() was called on
the original object.

Resolved by retrieving the evaluated object from the depsgraph.

Ref !146608
2025-10-04 23:32:02 +00:00
Julien Duroure
ad131310e3 Fix - Restore deleting default shader nodes, after recent Blender changes 2025-10-04 23:38:10 +02:00
Nikita Sirgienko
49414a72f6 Cycles: oneAPI: Add new arch codes for upcoming Intel hardware
Pull Request: https://projects.blender.org/blender/blender/pulls/147221
2025-10-04 22:34:54 +02:00
Jacques Lucke
c8180af8de Fix #147363: crash when adding asset modifier
This was caused by a stack-use-after-free due to passing a lambda directly
into a `FunctionRef` that keeps a reference to it. This only happened for
me in an asan build, but not in a release/debug build.
2025-10-04 22:34:15 +02:00
Jacques Lucke
74b6be8131 Cleanup: newlines between include blocks 2025-10-04 21:25:03 +02:00
Jacques Lucke
a65464fc1b Fix #147334: group outputs are hidden if the linked node group is missing
Assume that no output is disabled when there is an error in the group node.
2025-10-04 15:26:07 +02:00
Jacques Lucke
2323bd2691 Refactor: Nodes: extract value inferencer construction
This extracts the construction of the `SocketValueInferencer` out of
`SocketUsageInferencer`. This leads to better separation of concerns and gives
the caller more flexibility. In the future, I especially want to get information
about which group input values were required to determine the usage of other
group inputs. This might help with caching the inferenced values.

Pull Request: https://projects.blender.org/blender/blender/pulls/147352
2025-10-04 15:18:24 +02:00
Campbell Barton
d990026fd6 PyAPI: add option for BMesh.select_flush_mode() to flush down
Support optionally flushing down:
- faces -> edges & verts.
- edges -> verts.

For C++ selection logic flushing down is avoided as it's an extra step
and instead, selection logic must take care to de-select edges/faces
before selection, so any shared vertices or edges are selected.

Flushing down means scripts can set the selection on faces or edges,
then flush this to all other elements without being concerned with
the order they have been set.

Ref !147351
2025-10-04 22:45:42 +10:00
Campbell Barton
fb5707ce41 Cleanup: use enum class for bmesh selection flush flags 2025-10-04 22:45:42 +10:00
Aras Pranckevicius
fe48db3b42 Fix #147269: No sound when pitch correction is used but Rubberband build is off
When Rubberband functionality is compiled out, do not attempt
to do pitch correction

Pull Request: https://projects.blender.org/blender/blender/pulls/147302
2025-10-04 14:44:42 +02:00
Jacques Lucke
80684a18bc Geometry Nodes: remove default item in Field to Grid node
This item is usually more annoying than useful. If one doesn't need it, one has
to go to the side bar to remove it or change its type. Creating the input is as
easy as just connecting a link or using link-drag-search.
2025-10-04 14:28:51 +02:00
Jacques Lucke
5cae5df96e Geometry Nodes: create vector socket when linking color to Grid to Field node
Color grids are not supported yet, but vector grids are. Previously, trying to
link a color socket to the Grid to Field node just didn't work because it
doesn't support color sockets. Now, it will create a vector socket instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/147343
2025-10-04 14:23:03 +02:00
Jacques Lucke
f105d0c83f Functions: avoid triggering multi-threading with too few tasks
I found this to cause small slow-downs.
2025-10-04 13:40:24 +02:00
quackarooni
8f420e13cc Nodes: Remove redudant "Object" label in Texture Coordinate node
The placeholder text of this property already says "Object", so the label saying
the same thing is quite redundant. It usually takes up extra space and cuts off
the names of selected objects, so having the label is arguably more inconvenient
than helpful.

This patch removes said label, giving more room for the object selector.

Pull Request: https://projects.blender.org/blender/blender/pulls/147338
2025-10-04 11:56:43 +02:00
quackarooni
268d8dd94b Nodes: Add icon and separate "New Group" operators
The current placement of the operators make it easy for them to blend in with
other group nodes in that menu.

This patch adds an icon to better indicate the nature of these operators, and
have separators between it and other entries of the menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/147330
2025-10-04 11:55:54 +02:00
Amogh Shivaram
2b8d005a13 Fix: UI: Node layouts drawn twice in properties panel
Without this check, the dropdowns in Glass BSDF and Metallic BSDF show up twice
because layouts added with `add_default_layout` are drawn once at the start of
`ui_node_draw_node` and a second time in the loop.

Pull Request: https://projects.blender.org/blender/blender/pulls/147329
2025-10-04 11:06:52 +02:00
Jacques Lucke
2d969e39be Geometry Nodes: support renaming items in Field to Grid node
This is consistent with other nodes like the Capture Attribute node
where items can also be renamed by ctrl+clicking on them.
2025-10-04 11:06:11 +02:00
Jacques Lucke
155b8b75d4 Geometry Nodes: optimize active gizmo detection
This reduces the constant overhead for the evaluation of the Geometry Nodes
modifier. Currently, it has to detect which gizmos are currently used, because
it has to potentially trigger additional evaluation to make the gizmos work.
Part of that is detecting which inputs are used, because gizmos for inputs that
are not used are hidden. Previously, it would compute whether each input is
used. This patch changes it so that only the inputs that have gizmos are
checked.

This reduces the evaluation time in my test from 2.2ms to 1.5ms.

Pull Request: https://projects.blender.org/blender/blender/pulls/147286
2025-10-04 10:36:42 +02:00
Falk David
bbfcffb54d Fix #147294: Crash when duplicating scene strip
Seems to have been introduced by 1104c69a0e.
In `BKE_paint_copy` the `src->runtime` can be `nullptr` in some cases.

This adds a check to make sure to only copy the settings
when `src->runtime` exists.

Pull Request: https://projects.blender.org/blender/blender/pulls/147304
2025-10-04 06:39:37 +02:00
quackarooni
f7c37b05e4 Fix: Node Wrangler: "Add Reroutes" operator creates new sockets for certain nodes
The "Add Reroutes" operator does not ignore virtual sockets when creating reroutes.

This has the unintended side effect of creating new sockets when attempting to link with said sockets.
This patch adds a check that explicitly skips over them.

Pull Request: https://projects.blender.org/blender/blender/pulls/147306
2025-10-03 20:30:29 +02:00
Brecht Van Lommel
f47a84e710 Nodes: Rename "Fac" sockets to "Factor"
This PR renames "Fac" sockets to "Factor" in the user interface across
shading and compositing nodes, while keeping the identifier unchanged
for scripting compatibility.

The only texture node affected by this renaming (Color Ramp) was not
updated, as it still uses the old style node declaration and this is
legacy anyway.

This also changes "Bright" to "Brightness" in both shading and
compositing.

Ref #96219

Pull Request: https://projects.blender.org/blender/blender/pulls/140498
2025-10-03 19:29:55 +02:00
Brecht Van Lommel
45c4a42ed4 Fix: MaterialX export uses socket names instead of identifiers
Which doesn't work well with upcoming Fac to Factor renaming.

Pull Request: https://projects.blender.org/blender/blender/pulls/140498
2025-10-03 19:29:48 +02:00
Brecht Van Lommel
68277b03af Fix #147217: Node assets appear multiple times in add menu
Update built-in menus to match changes in #146806, #147212 and #143750.

Pull Request: https://projects.blender.org/blender/blender/pulls/147305
2025-10-03 19:27:55 +02:00
Pablo Vazquez
5c8fb20f2d UI: Color Axes in 3D/2D Cursor
Since 2.80, the 3D Cursor is actually 3D, but it is still not clear
which way it points.

To improve this, the following style tweaks were done:

- Use theme axes colors for the 3D Cursor lines, a bit desaturated.
- Draw the negative axes a little darker, to tell at a glance its
  direction.
- Replace the red/white lines with black/white for improved contrast
  and to not conflict with X axis colors.
- Make it over all smaller in size, since it's already prominent by its
  colors.

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/146927
2025-10-03 19:11:39 +02:00
Richard Antalik
598aa5f4b7 Fix: BPY docs build error
"strip" and "strip_modifier" were missing in `context_type_map`.
2025-10-03 18:42:28 +02:00
Brecht Van Lommel
6e740f9a49 Color Management: Support build against OpenColorIO 2.5.0
But do not yet take advantage of any of its new features. For Linux
distributions that want to upgrade before we do.

Fix #147227

Pull Request: https://projects.blender.org/blender/blender/pulls/147232
2025-10-03 18:32:30 +02:00
Falk David
20921fef48 Cleanup: Copy toolsettings from source scene in scene_copy_data
This was copying the toolsettings from `scene_dst` which, confusingly,
will work because the ID got shallow copied before running
`scene_copy_data` so the pointer to `scene_dst->toolsettings` is the
same as `scene_src->toolsettings`.

This changes that line to copy from `scene_src->toolsettings` to
`scene_dst->toolsettings` to avoid any future confusion.
2025-10-03 17:54:16 +02:00
Nika Kutsniashvili
b4a8e8c5f8 Anim: Move "Copy Global Transform" extension to internal scripts
Move the Copy Global Transform core add-on into Blender's code.

- The entire extension was one Python file. This PR basically splits
  it into two, one for operators (in `bl_operators`) and the other for
  UI panels. Those panels are registered in the 3D viewport's sidebar,
  which were registered in `space_view3d`, but I made the decision
  here to create a new file `space_view3d_sidebar`, because the main
  file is getting too large and difficult to navigate. This PR puts
  the global transform panel in this file. After this is merged, I
  will do refactors to move the rest of the sidebar panels here as
  well.

- `AutoKeying` class was moved into `bpy_extras/anim_utils.py` so that
  it's reusable and also accessible from API, since it's generally
  very useful. There were discussions about putting this somewhere,
  but for now, I chose against it because creating a new file would
  also mean PR would have to affect documentation generation, and
  would complicate things. If we want to, we can probably create a new
  module in the future.

- Little tweaks to labels and descriptions. Now that they exist
  outside of the add-on context, and exist without the user explicitly
  enabling them, they need to be more descriptive and tell users what
  they actually do. They also need to conform to Blender's GUI
  guidelines. Also tried organizing files a little by grouping
  objects.

- Add-on properties (which included word `addon` in the name) have
  been registered in C++, on `scene.tool_settings` with `anim_`
  prefix.

Pull Request: https://projects.blender.org/blender/blender/pulls/145414
2025-10-03 17:42:04 +02:00
Richard Antalik
f385327442 VSE: Move Strip properties to Properties editor
Goal of this PR is mainly to improve flexibility and of VSE layout and
screen space efficiency.

Previously, strip properties were displayed in timeline sidebar. This
was limiting, because if you want to display as much properties as
possible, the timeline area had to be taller, but this was at the
expense of space available for preview. However there is plenty of
space in properties editor, which is mostly unused in VSE. Therefore
strip properties were moved to the properties editor.

ID pinning and path displayed in top section aren't drawn, since strip
is not an ID and can not be pinned. Since there is more space for
properties, various panels are changed to be open by default.
Mainly transform and time panels, since they are used often.

There is one minor change: The waveform display property
of sound strip was previously hidden, if timeline area had per strip
waveform display overlay set. This is no longer possible to do and the
property is always visible.

Pull Request: https://projects.blender.org/blender/blender/pulls/140395
2025-10-03 17:33:17 +02:00
Bastien Montagne
258f449783 Refactor: Library: Be explicit about runtime data copied with ID copying.
Note that this commit keeps the same behavior as before this commit,
except for the newly introduced vector of archived libraries, which is
reset to empty. This behavior may have to be further tweaked still.

Root of the issue was from original commit enabling Library ID copying
(87a4c0d3a8), but the later move to an allocated runtime pointer
using a copy constructor in 87a4c0d3a8 made this behavior even
more confusing/hidden.

In general, what is re-used/copied in runtime data should be explicit,
such that by default new data can be assumed reset to their default
value there in the copy ID.
2025-10-03 17:16:32 +02:00
Bastien Montagne
4372775a18 Fix missing libraries reported as older than 2.50 data, take II.
Fix wrong logic in own recent ee9d7fc9a3, sorry for the noise.
2025-10-03 17:16:32 +02:00
Clément Foucault
34ca3cb226 Fix: EEVEE: Irradiance validity loading
The loading step of the irradiance validity was
left unfinished for some reason. It was loading
the same validity for all 8 corners and copying
the same value for all 4 Z slices.

There is another bug, which is that the default
backface validity of surfels is wrong. This means
that the tests are passing because of this bug
as the validity is always 1 everywhere.

Pull Request: https://projects.blender.org/blender/blender/pulls/147200
2025-10-03 16:28:59 +02:00
Miguel Pozo
4b9ce68737 Fix: OpenGL: Avoid substring out of bounds assert
Check if line_start_get result is valid.
2025-10-03 15:51:39 +02:00
Sybren A. Stüvel
1395abc502 Python: remove legacy Action API
Remove the legacy (aka backward-compatible) API from `bpy.types.Action`:

- `action.fcurves`
- `action.groups`
- `action.id_root`

These have been deprecated since the introduction of Slotted Actions in
Blender 4.4. They operated on a subset of the Action's data, which was
not guaranteed to be the correct subset, given the Action's new
possibilities. This was to give add-on developers time to migrate to the
new API, and has always been intended to be removed in Blender 5.0.

See #146586 for more info.

Pull Request: https://projects.blender.org/blender/blender/pulls/146626
2025-10-03 15:25:27 +02:00
Hans Goudey
b36b7e2d70 Fix #147264: Crash in Geometry Nodes editor with no object or modifier
Caused by be61366801
2025-10-03 09:16:59 -04:00
Brady Johnston
83ea4788bd Geometry Nodes: Bring Volume nodes out of experimental
Discussed in the post-BCON Geometry Nodes workshop, this PR brings the
currently implemented Grid & Volume nodes out of experimental.

Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/146789
2025-10-03 15:04:55 +02:00