Commit Graph

120055 Commits

Author SHA1 Message Date
YimingWu
2ed21d7b90 Fix: Viewport: Assert when drawing fly navigation aim symbol.
The `immVertex2i` calls in `drawWalkPixel` will now cause an assert in
`immAttr2i` after 617858e453 because the component types are more
strictly enforced. Now switch to using floats to avoid asserts and
potentially drawing garbage in the viewport.

Pull Request: https://projects.blender.org/blender/blender/pulls/139429
2025-05-26 10:32:39 +02:00
Omar Emara
c9ed2c28f3 Compositor: Add Dimensions output to Image Info node
This patch adds a new Dimensions output to the Image Info node. Contrary
to the Resolution output, the Dimensions output takes transformations
into account. So an image of resolution 512x512 that is scaled up by 2
would have a Resolution of 512x512 but a Dimensions of 1024x1024.

Depends on #138935.

Pull Request: https://projects.blender.org/blender/blender/pulls/139211
2025-05-26 09:58:19 +02:00
Damien Picard
ba45498955 I18n: Use context for node panel translation in material properties
This is a follow-up to 9ce0a2d1d5 and uses the same logic. It allows
translation of node panel labels inside the material properties, using
their specified translation context. Not in use currently, but may be
needed in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/139367
2025-05-26 09:36:04 +02:00
Omar Emara
a4502f82c1 Compositor: Add Image Coordinates node
This patch adds a new Image Coordinates node for the compositor. The
Texture Coordinates and Pixel Coordinates outputs were removed from the
Image Info node and were added to the new node instead. Additionally, a
new Normalized Coordinates output was added.

The Pixel Coordinates output now no longer includes half pixel offsets.

Pull Request: https://projects.blender.org/blender/blender/pulls/138935
2025-05-26 08:25:06 +02:00
Habib Gahbiche
8485d8a33c Compositor: Rename default node tree to "Compositing Node Tree"
Currently only visible in the tree path, but will be more noticeable
when node trees are not embedded anymore (outline and node editor).

Pull Request: https://projects.blender.org/blender/blender/pulls/139358
2025-05-26 08:24:56 +02:00
Oscar Blumberg
aa413a05bf Fix: Vulkan: Threading issue when waiting for submission
Usage of conditional to fix threading and performance delays when
waiting for the submission fence to become valid. The previous
(faulty) implementation didn't work well on WoA devices.
2025-05-26 08:20:09 +02:00
Jacques Lucke
98b888c163 Cleanup: Geometry Nodes: simplify accessing socket usage 2025-05-26 08:04:54 +02:00
Jacques Lucke
024f8a9595 Fix #139388: Nodes: Frame node with text has wrong margins and line breaks
This was caused by an oversight in ae5b83e4ef.
It first removed the `aspect` and then brought it back later on, but forgot
to use it in all cases.
2025-05-26 06:01:53 +02:00
Jacques Lucke
f66aa6529a Geometry Nodes: support panels and attribute/layer search in node group operator
Previously, the node group operator only had fairly basic flat drawing for the
inputs. Due to previous refactors, it's now possible to reuse the drawing code
of the Geometry Nodes modifier. That way the redo panel now has all the features
that also exist in the modifier. Also, future improvements will benefit both
systems and potentially more in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/139389
2025-05-26 05:44:59 +02:00
John Kiril Swenson
6bd750bc01 Fix (unreported): VSE: Strips not deselected on press
With #128051, the default timeline tool changed to
a `sequencer.select` on press with no associated
properties (before, it had `deselect_all`).

This meant that retiming key selection broke (as
reported in #129892) and strips would only deselect
on release if clicking into empty space (due to a separate
keymap item in the global sequencer keymap).

This patch reverts 97e44901b4 while keeping its fix,
in favor of a more robust solution (just add `deselect_all`
to the keymap item properties in the box select tool).
2025-05-25 16:22:16 -05:00
Jacques Lucke
64a13f4be2 Refactor: BLI: simplify extending get_default_hash function
This simplifies extending `blender::get_default_hash` to more than 4 parameters
by just adding extra factors to the list. The behavior should be the same as
before.

Pull Request: https://projects.blender.org/blender/blender/pulls/139392
2025-05-24 21:01:05 +02:00
Bastien Montagne
4baf428e5b Fix (unreported) BLO: Missing some blendfile version info in some Library Mains.
Readfile code would not always properly set the main file version number
in 'split' Mains created for a library, and would also not detect
'future versions' blendfiles.

This info is currently not used by linking code, so this should be a
no-op change in current main.
2025-05-24 20:55:42 +02:00
Jacques Lucke
a6486d11c2 Cleanup: add missing include 2025-05-24 18:55:53 +02:00
Jacques Lucke
d35351fdc8 Fix #139364: FileHandler example for shader editor does not work 2025-05-24 18:46:42 +02:00
Jacques Lucke
8ea045d299 Refactor: Geometry Nodes: extract modifier dependency from UI code
The goal is to simplify reusing the same code to draw the inputs of the node
tool operator.

This patch simply extracted all the modifier-specific code into callbacks which
are passed in from a higher level. The operator drawing code would basically
just need to provide different callback functions. Although some more additional
cleanups may become necessary to make that fully work.

Pull Request: https://projects.blender.org/blender/blender/pulls/139384
2025-05-24 17:11:25 +02:00
Guillermo Venegas
eed8e10b91 Refactor: UI: Remove uiItemIntO API
This function has not python equivalent, using the
returned pointer to write properties seems enough
as equivalent as how is done in python.

Also, this removes the unused `uiItemFloatO` API.

Pull Request: https://projects.blender.org/blender/blender/pulls/139355
2025-05-24 16:15:51 +02:00
Aras Pranckevicius
4e7acc4be8 Fix #138834: FBX import improved pivot handling
This does not fully fix the issue (pivots are still not handled
correctly when an object contains negative scale -- filed upstream
ufbx issue https://github.com/ufbx/ufbx/issues/218), but for regular
cases the pivots are in much better places now.

Pull Request: https://projects.blender.org/blender/blender/pulls/139381
2025-05-24 15:22:19 +02:00
Hans Goudey
9ffb474e07 Fix #139330: Incorrect offset grouping nodes inside frame
Similar to c52da69dfb
2025-05-24 09:17:39 -04:00
Jacques Lucke
26ce934148 Refactor: Geometry Nodes: extract modifier UI code to separate file
The goal is to be able to reuse parts of this code in all the places that call
Geometry Nodes. Currently, that's only a modifier and an operator. More places
may follow in the future though.

This patch does not implement any of the code-reuse yet, it just extracts the
code into a separate file. Follow-up patches will work towards better
code-reuse.

Note, this extracts the entire modifier drawing, including error messages,
baking etc. I found this to be easier, because they still often share a common
core (like getting the logged data).

Pull Request: https://projects.blender.org/blender/blender/pulls/139379
2025-05-24 12:50:02 +02:00
Jacques Lucke
656eaeb0c4 Fix: missing include 2025-05-24 11:45:06 +02:00
Jacques Lucke
680e53fcee Cleanup: Geometry Nodes: rename GeoModifierLog to GeoNodesLog
Nowadays, Geometry Nodes is not only evaluated by a modifier, but also by an
operator and in the future potentially by brushes. Therefore, the old name was
misleading because it sounded like it was specific to the modifier.

Pull Request: https://projects.blender.org/blender/blender/pulls/139378
2025-05-24 10:39:36 +02:00
Jacques Lucke
70ce733b8c Refactor: Nodes: add general NodeComputeContext
This is used as base class for the compute contexts for group and evaluate
closure nodes. Furthermore, in the future this can be used for the compute
context that is passed into field evaluation.

Pull Request: https://projects.blender.org/blender/blender/pulls/139377
2025-05-24 10:39:24 +02:00
Clément Foucault
8257fcb62f Fix #139354: Metal: AgX turns rendered image into black white
Caused by the initializer list syntax. Using the constructor
explicitly fixes the issue.
2025-05-23 18:28:05 +02:00
Omar Emara
ffbcb23db9 Cleanup: Missing include 2025-05-23 18:01:52 +03:00
Jeroen Bakker
bd139fef14 Fix: Vulkan: Validation error on devices without external memory
Qualcomm devices don't support external memory, but there an external
memory pool was still being constructed. This PR skips the creation and
asserts when using external memory on those devices.

Pull Request: https://projects.blender.org/blender/blender/pulls/139326
2025-05-23 15:59:29 +02:00
Bastien Montagne
ebefbcaeb0 Cleanup: Fix incorrect comment about name size of BLODataBlockInfo. 2025-05-23 15:55:39 +02:00
Campbell Barton
8ab1a2bd13 Fix array size for NodeImageMultiFileSocket::layer
Regression from [0] this was meant to be `EXR_TOT_MAXNAME - 2`,
but wasn't updated when `EXR_TOT_MAXNAME` changed.

Also use UTF8 string copying since it's expected to be UTF8.

[0]: 2c8db87897
2025-05-23 13:49:40 +00:00
Omar Emara
6c62fb5ff6 Compositor: Turn Color Balance options to inputs
This patch turns the options of the Color Balance node into inputs.

In the process, each of the wheels were split into two inputs, a base
float and a color. For instance, Gain is controlled using both a Base
Gain and Color Gain, the former controls the gain for all channels while
the latter controls it per channel.

Reference #137223.

Pull Request: https://projects.blender.org/blender/blender/pulls/138610
2025-05-23 15:42:54 +02:00
Miguel Pozo
4f00a470cd Core: VectorList improvements
- Add a custom Iterator, so it can be iterated as a 1D list.
- Add missing functions like `first`, `is_empty`, `clear`, and
  subscript operator.
- Add a `size_` member variable for faster `size` calls.
- Add compile-time asserts to ensure the Capacity sizes are valid.
- Add unit tests.

See #138947 for the motivation behind this.

Pull Request: https://projects.blender.org/blender/blender/pulls/139102
2025-05-23 15:34:26 +02:00
Jeroen Bakker
a44c515844 Cleanup: Vulkan: Use blender::Mutex
Only the queue mutex owned by ghost is still a std::mutex.

Pull Request: https://projects.blender.org/blender/blender/pulls/139344
2025-05-23 14:40:28 +02:00
Jeroen Bakker
9a6ae548a1 Cleanup: Vulkan: Remove unused getters. 2025-05-23 14:19:46 +02:00
Hans Goudey
8fdf37cd50 Fix #139114: Node insert auto offset broken with frames
Caused by 4bf34d9591.

Quite a bit of complexity used to avoid moving both nodes and their
frame parents is redundant now, since all connected nodes should
be moved and moving frames doesn't also affect the nodes inside
anymore.

Pull Request: https://projects.blender.org/blender/blender/pulls/139306
2025-05-23 14:18:09 +02:00
Falk David
4901f38400 Fix: GPU: Crash in pygpu_batch_draw
Introduced by `3d8854b021195fdb253c85133b1db350d3d4c753`.
`py_shader` could still be `nullptr` and needs to be checked.
2025-05-23 12:31:08 +02:00
Pratik Borhade
0ad79ca541 Fix #139170: Regression: The Linked Node Group Socket Name is Editable
This probably have occured after migration from UIList. When nodetree ID
is linked form another file, disable the layout for individual rows and
the add/remove operator. Also tweak `supports_renaming()` function so that
individual tree element cannot be renamed when linked.

Pull Request: https://projects.blender.org/blender/blender/pulls/139269
2025-05-23 12:19:41 +02:00
Pratik Borhade
23bddef11a Fix #139179: Shader node panels are not translated in the material properties
Missed in 613bb9771b. To fix translation of panel header, use `IFACE_` macro).

Pull Request: https://projects.blender.org/blender/blender/pulls/139262
2025-05-23 12:18:17 +02:00
Aras Pranckevicius
a4b76dbb09 IO: more strongly indicate that Collada is deprecated
- Add "(Deprecated)" to Collada I/O tooltips
- Move the import/export menu items to be the last ones from the
  built-in items

Pull Request: https://projects.blender.org/blender/blender/pulls/139303
2025-05-23 12:02:38 +02:00
Jacques Lucke
363eff4f59 Fix: Nodes: missing null check
This caused a crash when creating a group from a node which has
a virtual input socket (e.g. Menu Switch).
2025-05-23 09:21:18 +02:00
Jeroen Bakker
f75e4f4dea Cleanup: Vulkan: Move comment 2025-05-23 08:27:27 +02:00
quackarooni
ad90cceb1e Geometry Nodes: Add "Set Grease Pencil Softness" node
How solid/faded the edges of a Grease Pencil stroke is
controlled by the `softness` attribute. This change adds a
node that exposes that attribute, allowing the user to
control it via Geometry Nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/138939
2025-05-23 07:30:23 +02:00
Richard Antalik
c4eab49b9c Fix #135930: Strip can be added to locked or muted channel
When strip is added, operator first finds "best" channel to place a
strip in, then adds new strip to that channel and finally does check if
the strip is overlapping other strips. If it does, it handles the
overlap.

To prevent adding strip to locked or muted channel, fix has to be done
at 2 places:
 - `sequencer_generic_invoke_xy_guess_channel` which finds the "best"
channel
 - `transform_seqbase_shuffle_ex` which handles overlap.

Further check for free channels was added to all strip add operators.
If there is no space above channel, that user selected, error is
displayed and operator is cancelled.

Note, that `transform_seqbase_shuffle_ex` is used only for resolving
overlaps where strip position in time must stay constant, so it moves
the strips in Y axis. This PR does not affect user selectable
`overlap_mode`.

Pull Request: https://projects.blender.org/blender/blender/pulls/136016
2025-05-23 06:51:36 +02:00
Jacques Lucke
1307137f27 Nodes: clarify socket visibility methods
Node sockets have many different aspects that affect their visibility and
whether they are grayed out. This patch cleans up the methods used to check if
sockets are visible and adds descriptions that should make it more obvious which
ones should be used.

This also fixes a few places where the wrong method was used which is more
obvious now.

Pull Request: https://projects.blender.org/blender/blender/pulls/139251
2025-05-23 06:10:03 +02:00
Jacques Lucke
0b24f15939 Spreadsheet: persistent table layouts
The main goal of this patch is that the column widths and ordering is not reset
every time one switches between different contexts.

It does that by keeping track of multiple `SpreadsheetTable`. There is one for
each table that is viewed (so e.g. the point and edge domain of the same mesh
are two different tables). Each table has an identifier and an array of columns.

There is some garbage collection in place so that the number of stored tables
does not increase unbounded.

This also comes with an updated Python API:
```python
import bpy
spreadsheet = bpy.context.screen.areas[...].spaces.active
active_table = spreadsheet.tables.active
print(active_table.id.type)
print(active_table.id.attribute_domain)
print(active_table.columns[0].id.name)
```

In the future, we might add some smarter logic to keep tables with different
identifiers more in sync. We don't have a great heuristic for that yet.

Pull Request: https://projects.blender.org/blender/blender/pulls/139205
2025-05-23 06:07:04 +02:00
Campbell Barton
84694bf635 Cleanup: add inline array size comments and minor corrections 2025-05-23 14:03:20 +10:00
YimingWu
845cec84bf Fix #139199: Grease Pencil: Update compositor node when pass is toggled
Compositor node sockets should be updated when toggling grease pencil
pass in the pass list. It was missing a `rna_ViewLayer_pass_update`, now
it will work as expected.

Pull Request: https://projects.blender.org/blender/blender/pulls/139215
2025-05-23 04:26:52 +02:00
Campbell Barton
98c0a6c8fe Cleanup: resolve unused variable warning in release builds 2025-05-23 09:20:11 +10:00
Guillermo Venegas
99e9b2522b Refactor: UI: Remove uiItemBooleanO API
This function has not python equivalent, using the
returned pointer to write properties seems enough,
equivalent to how it is done in Python.

Pull Request: https://projects.blender.org/blender/blender/pulls/139295
2025-05-23 01:07:12 +02:00
Hans Goudey
cb77f6fd14 Cleanup: UI: Remove unused arguments for operator buttons 2025-05-22 16:26:46 -04:00
Sean Kim
93f743ec46 Cleanup: Avoid passing both SculptSession and Object
Reduces the number of parameters passed in `sculpt_undo.cc`,
additionally the `const` specifier is misleading here, as the
`SculptSession` is modified via the `Object` reference.

Pull Request: https://projects.blender.org/blender/blender/pulls/139252
2025-05-22 21:10:23 +02:00
Nicola
f1ab22465f Fix: Line stroke method is drawn incorrectly
Mistake in 7d97ba4c5f

Pull Request: https://projects.blender.org/blender/blender/pulls/139286
2025-05-22 21:04:35 +02:00
Sean Kim
e77d82401b Fix #139223: Topology automasking crash when precomputed
The topology automask setting uses the active vertex when precomputing
the cache at the beginning of a stroke. This value can be invalid when
the brush stroke doesn't start on the mesh.

For example, this can happen with brush strokes that use a projected
instead of spherical falloff due to more BVH nodes being included in the
initial coarse check.

To fix this, simply check for the existence of the active vertex and
early exit if it is not valid.

Pull Request: https://projects.blender.org/blender/blender/pulls/139234
2025-05-22 20:32:23 +02:00