Commit Graph

154551 Commits

Author SHA1 Message Date
Nika Kutsniashvili
ca7af76bc9 UI: Cosmetic changes to "Global Transform" sidebar panel
Cosmetic changes to "Global Transform" panel in 3D Viewport sidebar, to make it
more aligned with rest of the Blender UI.

Note that this isn't a comprehensive update, there are still many things to change
according to our discussions in #137280. This PR only includes small,
non-controversial changes so that we can land improvements in 5.0.
Bigger changes will follow in the next version(s).

List of changes:
- Close all subpanels by default.
- Move "Fix to Camera" subpanel to the bottom, so that it's not between related
"Mirror" and "Relative" subpanels.
- Follow Blender's GUI guidelines:
	- Use `property_split`.
	- Align related properties.
- Remove redundant label from "Relative" subpanel. The title of the subpanel
already communicates the purpose.
- Rename "Mirror Options" subpanel title to just "Mirror". It's obvious that the
panel will contain options.

Pull Request: https://projects.blender.org/blender/blender/pulls/147436
2025-10-06 14:46:29 +02:00
Falk David
53fdb46498 Fix: Compile error after merge
Introduced by f694ef839d
because it forgot to merge 6b75fe7658.
`seq::for_each_callback` was renamed to `seq::foreach_strip`.
2025-10-06 14:36:25 +02:00
Jeroen Bakker
f2c04f08c4 Cleanup: Fix compilation warnings 2025-10-06 14:31:42 +02:00
Jacques Lucke
522a2a28f7 Fix: Geometry Nodes: confusing tooltip on unlinked grid input sockets 2025-10-06 14:31:11 +02:00
Falk David
f694ef839d Cleanup: VSE: Rename for_each_callback to foreach_strip
The function name `for_each_callback` is ambigous (what are we iterating?)
and also doesn't align with the naming of other "for each" functions in Blender
which usually are named `foreach_<thing>` like `IndexMask::foreach_index`
or `animrig::foreach_fcurve_in_action` etc.

Pull Request: https://projects.blender.org/blender/blender/pulls/147440
2025-10-06 14:02:32 +02:00
Aras Pranckevicius
4e00b37348 Tests: add more VSE render tests
- Compositor modifier
- Modifier that uses Mask ID on a rotated strip

Pull Request: https://projects.blender.org/blender/blender/pulls/147441
2025-10-06 13:44:13 +02:00
Falk David
6b75fe7658 Fix #147106: VSE: Show keyframes of compositor node trees in dopesheet
Any keyframes for properties inside the compositor node
trees that were used by strips did not show up in the dopesheet.
This was because the compositor tree is its own ID and needs to
be manually added by the dopesheet code.

This fix adds the node trees to the filtering code in
`animdata_filter_dopesheet_scene`.

Note that the dopesheet still uses the active scene as its context.
So this means that if the sequencer scene differes from the active
scene, the animation data from the sequencer scene will not
be shown. This is currently expected behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/147301
2025-10-06 12:17:17 +02:00
Pratik Borhade
a7cca80c36 Fix #147412: Opening "Randomize Color" sub-panel makes "Modes" disappear
Mistake in 56d52a7070 (wrong parameter name).

Pull Request: https://projects.blender.org/blender/blender/pulls/147423
2025-10-06 11:53:57 +02:00
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