Commit Graph

150077 Commits

Author SHA1 Message Date
Jeroen Bakker
7596a08b2c Vulkan: Add back command reordering for buffer updates.
Related to #126974, which removed command reordering due to some
EEVEE/framebuffer requirements. However buffer can still be reordered
without any artifacts.

Update buffers are common operations and are often isolated; safe to
move them outside the rendering scope.

Pull Request: https://projects.blender.org/blender/blender/pulls/128538
2024-10-04 12:11:40 +02:00
Pratik Borhade
bd4f7acce5 GPv3: Display layers when properties tab is pinned
Layer panel (also mask/ transform etc.) and other operators are gone
when properties tab is pinned and gpv3 object is non-active.
To fix this, get grease pencil pointer from `button_context()`
(done in `grease_pencil_context()`).

Continuation of cd476226d8

Pull Request: https://projects.blender.org/blender/blender/pulls/128475
2024-10-04 11:58:12 +02:00
Falk David
9d9dc3fc8f GPv3: Apply modifier to all frames
This adds an option `all_keyframes` to the `object.modifier_apply` operator.
With the option enabled, the operator will iterate through all the keyframes,
then apply the modifier and merge the result back into the original
object. This is only done for Grease Pencil objects.

This is how the default `Apply` operation worked in GPv2. This adds the
functionality back but also keeps the current `Apply` behavior for consistency
with other object types.

The UI is also changed to show both options in the dropdown menu.
Again, this is only shown for Grease Pencil objects.

With Geometry Nodes it's possible to add new layers to the geometry.
When applying, this will create a single keyframe on the first frame of
evaluation.  Layers with duplicated names in evaluated geometry will
be deduplicated. It's also possible to have layers with empty names.
When applying these get renamed to `Layer` (and `Layer.001` etc.
when such a layer already exists in the original geometry).

Pull Request: https://projects.blender.org/blender/blender/pulls/128487
2024-10-04 11:51:30 +02:00
Lukas Tönne
6e9462e056 Fix #128533: GPv3: Crash on undo
The poll function of the Grease Pencil edit undo system was changed by accident to include other
object modes like sculpt mode as well. In the other modes, undo steps wouldn't be created correctly.
Instead, fix the poll function to only allow the Grease Pencil undo system to take over in edit mode.
In all other modes fall back to the global undo system.

Fixes #128566 as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/128573
2024-10-04 11:36:46 +02:00
Clément Foucault
0bfd5e3536 GPU: Add GLSL preprocessor
This splits the GLSL processing into its own file
as it will grow in complexity.

Removes the complexity from `datatoc` and chain them
during the build process.

Rel #128076

Pull Request: https://projects.blender.org/blender/blender/pulls/128261
2024-10-04 11:33:21 +02:00
Sergey Sharybin
af19a48e80 Merge branch 'blender-v4.3-release' 2024-10-04 11:16:37 +02:00
Sergey Sharybin
680a80d61c Build: Hide PugiXML symbols from MaterialX on Linux
This change uses a symbol map to hide PugiXML symbols from MaterialX libraries
when dependencies are built. This avoids conflict with symbols from pugixml.a
used by Blender for the Grease Pencil SVG exporter.

The root cause of the conflict has been addressed upstream:

  https://github.com/AcademySoftwareFoundation/MaterialX/pull/1944

However, the patch does not cleanly apply on 1.38, and it not cleat when the
next 1.39 is released. Additional complication is that reportedly USD does
not yet support MaterialX 1.39.

This fix is only for Linux. Similar thing can be applied on macOS, however so
far I could not reproduce the issue on macOS.

Ref #124173

Pull Request: https://projects.blender.org/blender/blender/pulls/126518
2024-10-04 11:16:05 +02:00
Sergey Sharybin
9a3c6ff420 Merge branch 'blender-v4.3-release' 2024-10-04 11:09:23 +02:00
Sergey Sharybin
63650461b7 Build: Update ROCm to version 6.1.3
This is what the Linux workers are using now.

Pull Request: https://projects.blender.org/blender/blender/pulls/128488
2024-10-04 11:08:51 +02:00
Falk David
47300de1eb Merge branch 'blender-v4.3-release' 2024-10-04 10:59:11 +02:00
Falk David
78e4dd14bc Fix: Make grease_pencil_selection_poll non-static 2024-10-04 10:58:04 +02:00
Jeroen Bakker
f5e9283667 Merge branch 'blender-v4.3-release' 2024-10-04 10:54:57 +02:00
Jeroen Bakker
55c180acc4 Fix #128561: EEVEE: Lightlinking crashes on NVIDIA
On NVIDIA drivers it is not allowed to pass buffers directly from the
interface to a function as the qualifiers do not match. This is commonly
fixed by first storing it in a local variable to remove the qualifiers
and then pass it to the function that need the object.

Pull Request: https://projects.blender.org/blender/blender/pulls/128571
2024-10-04 10:52:53 +02:00
Philipp Oeser
e9262f48aa Fix #121075: Outliner Ctrl-clicking to toggle selection has speed limit
There are a couple of keymap entries for `OUTLINER_OT_item_activate` in
our keymap. One of them has Ctrl+dblclick as a binding to trigger
recursion, but that one exits early when not dblclicking on the icon.
(introduced in 796577d76e)

It does not exit in a way that the non-dblclick variant can run, for
that we need to exit with OPERATOR_PASS_THROUGH, so that the "other"
operator can run as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/121130
2024-10-04 10:43:43 +02:00
Philipp Oeser
9664fb0e69 Fix #128482: Motion Tracking: Apply Scale misses update
Missing depsgraph tagging the clip.
(elsewhere this area of the code uses 0 as the flag, but I assume using
a proper flag is preferred? using `ID_RECALC_SYNC_TO_EVAL` in this
PR...)

Pull Request: https://projects.blender.org/blender/blender/pulls/128527
2024-10-04 10:42:46 +02:00
Falk David
62510c57ef Merge branch 'blender-v4.3-release' 2024-10-04 10:40:17 +02:00
Falk David
effa8fbb7a GPv3: Material Isolate Operator
This ports the `gpencil.material_isolate` operator to GPv3.

Pull Request: https://projects.blender.org/blender/blender/pulls/128549
2024-10-04 10:38:04 +02:00
Falk David
b353260b9a Fix: Missing declaration of grease_pencil_selection_poll 2024-10-04 10:31:55 +02:00
Sergey Sharybin
fef934c56e Merge branch 'blender-v4.3-release' 2024-10-04 09:58:06 +02:00
Sergey Sharybin
c5e2e8ebc6 Build: Copy tests manifests instead of install
This avoids having INSTALL files with an absolute path that is
different from the "main" install path. In practice this should
solve the problem of WIX failing to package Blender 4.3.

Pull Request: https://projects.blender.org/blender/blender/pulls/128556
2024-10-04 09:57:41 +02:00
Sergey Sharybin
6c3f3a7fb6 Fix: Proper forward declaration for friend class
Turns out it is possible to have code to pick up wrong class
when defining a friend:

```
intern\cycles\device/memory.h(255): warning C4099: 'GPUDevice': type name first seen using 'struct' now seen using 'class'
source\blender\gpu\GPU_platform.hh(69): note: see declaration of 'GPUDevice'
```

Now made it so the classes have forward declaration in the CCL
namespace, avoiding possible conflict with the classes with the
same name in the global namespace.

Pull Request: https://projects.blender.org/blender/blender/pulls/128485
2024-10-04 09:56:54 +02:00
Campbell Barton
7fcf043f60 Merge branch 'blender-v4.3-release' 2024-10-04 17:50:29 +10:00
Campbell Barton
4b6ebc9579 Fix error with select non-manifold when a mesh is in face-mode
In multi-edit mode, the select non-manifold function would exit with
an error if any mesh was in face mode.

While in practice the mode is synced between meshes, it's possible for
them to get out of sync with multiple scenes.

Editing in the middle of a loop on all edit-objects would change their
selection based on the internal order, leaving some unhandled,
returning canceled even though changes where made.

Resolve by checking the selection mode in the operators poll function,
then ensure all edit-meshes selection modes match the active object.
2024-10-04 17:42:45 +10:00
Campbell Barton
093a3abbd4 Cleanup: various minor changes to edit-mesh selection
- Track changed state, skip selection updates when unchanged.
- Skip hidden geometry early in iterators,
  using "continue" instead of a code-block since this is such a common
  check, avoid mixing this with other logic.
- Use full sentences in comments, minor corrections/improvements.
2024-10-04 16:49:28 +10:00
Campbell Barton
223ec5980c Cleanup: quiet unused variable warning
Unintentional/harmless change from !128493, keep the change
as named variables are clearer. Prefix to suppress warnings.
2024-10-04 15:52:09 +10:00
Jason C. Wenger
51eb5e2803 Edit Mesh: add an operator to select by pole count
Adds a new "Select by Trait" option to select all 3-poles, 5-poles, etc.
Given the impacts of 3 & 5-poles in topology, operator default is to
select all poles which do not have 4 edges to allow easy inspection.

Select connected vertices/edges/faces based on the mode.

Ref: !128493
2024-10-04 15:47:03 +10:00
secext2022
528bd239f0 Fix #114210: IME fails with WLROOTS based WAYLAND compositors
Wayland text input could not switch input method.

When using an input method editor (e.g. input Chinese),
switching the input method (e.g. input English -> input Chinese)
during input text was not supported.

Resolve the issue by calling `zwp_text_input_v3_disable` every time
after receiving a `leave` event, and call `zwp_text_input_v3_enable`
every time after receive `enter` event, when text input is enabled.

Ref: !127824
2024-10-04 14:53:30 +10:00
Campbell Barton
b83d4558bf Merge branch 'blender-v4.3-release' 2024-10-04 14:49:54 +10:00
Campbell Barton
e03214f424 Cleanup: use doxy code-command
Supports language & is ignored by spell checker.
2024-10-04 14:46:59 +10:00
Campbell Barton
30d81416c0 Merge branch 'blender-v4.3-release' 2024-10-04 12:07:28 +10:00
Campbell Barton
f9fb42f5f9 Merge branch 'blender-v4.3-release' 2024-10-04 12:07:26 +10:00
Campbell Barton
ea49df763a Merge branch 'blender-v4.3-release' 2024-10-04 12:07:23 +10:00
Campbell Barton
2b9d177eb3 Merge branch 'blender-v4.3-release' 2024-10-04 12:07:21 +10:00
Campbell Barton
3c8317e640 Merge branch 'blender-v4.3-release' 2024-10-04 12:07:18 +10:00
Campbell Barton
318125c82b Fix #127692: Artifact in axis aligned portions of mask feather
BLI_scanfill could remove edges later needed for feathering,
although this would only occur in specific cases.

Resolve by storing edges before triangle filling.
2024-10-04 11:46:38 +10:00
Campbell Barton
a2617b0029 Fix mask duplicate failing to set the active point
Duplicate was setting the last-duplicated spline as active,
leaving the active vertex set to the original (non-duplicated) spline.

This caused the active spline/point to get out of sync,
while not an error - it is confusing and should be avoided.

Now the active spline & point are duplicated,
matching active behavior elsewhere (objects for e.g.).
2024-10-04 11:46:36 +10:00
Campbell Barton
18da036ecc Fix crash deleting mask vertices
The active vertex was only cleared when it was part of the active-spline
(which isn't guaranteed).

Duplicating & deleting left the active vertex pointing to freed memory.
2024-10-04 11:46:34 +10:00
Campbell Barton
44bb032590 Fix ARRAY_HAS_ITEM macro on 64bit systems
An unsigned int was used for pointer offset calculation which could wrap
around, for large values or when pointer being checked is from a
different allocation.
2024-10-04 11:46:33 +10:00
Campbell Barton
0b8ce96bc1 Cleanup: quiet warnings, spelling 2024-10-04 11:45:26 +10:00
Jesse Yurkovich
1e577c3e52 USD: invoke the ComplianceChecker on all exported test files
Instead of running the ComplianceChecker during just one test, run it
for every export test. A common `export_and_validate` local function is
used in all relevant locations now.

Pull Request: https://projects.blender.org/blender/blender/pulls/128513
2024-10-04 02:50:16 +02:00
Jacques Lucke
3f8f5fd998 Cleanup: sort NOD_static_types.hh entries 2024-10-03 23:45:56 +02:00
Jacques Lucke
b0c4054b9c Cleanup: add missing newlines 2024-10-03 23:41:51 +02:00
Jacques Lucke
f18b37f811 Cleanup: Geometry Nodes: reduce boilerplate for blend read/write for socket items 2024-10-03 23:39:00 +02:00
Jacques Lucke
bfc1fb8f83 Cleanup: Geometry Nodes: reduce boilerplate for ui-lists for socket items 2024-10-03 22:53:09 +02:00
Jesse Yurkovich
26c25305f5 Merge branch 'blender-v4.3-release' 2024-10-03 13:10:11 -07:00
Jesse Yurkovich
cd74a279cc Cleanup: make format 2024-10-03 22:09:02 +02:00
Jacques Lucke
e847a7d090 Cleanup: Geometry Nodes: reduce boilerplate of defining socket item operators 2024-10-03 21:59:36 +02:00
Jesse Yurkovich
33d8a6407b Merge branch 'blender-v4.3-release' 2024-10-03 11:17:59 -07:00
Jesse Yurkovich
80cf6b99c3 USD: Provide Import option for Material Purpose
USD has the concept of material "purposes" which allows different
materials to be associated for a prim and gives special meaning to them.
These are somewhat similar to display purposes, which we already allow
to be chosen, but are distinct concepts. This PR adds an option for
Import allowing the user to chose which material purpose to load.

Blender currently attempts to load purposes automatically. It starts
with "allPurpose" and then moves to "preview" and "full" in that order.
This behavior is now changed and the automated search is removed to
instead give the user control which purpose to load. Additionally, USD
already has its own fallback behavior during material resolution[1]:
- When given "full" it will first check "full" and fallback to
  "allPurpose" if not found. An additional, Blender-specific fallback
  to "preview" is also implemented here upon request.
- When given "preview" it will first check "preview" and fallback to
  "allPurpose" if not found
- When given "allPurpose", it will only check "allPurpose"

I have opt'd to keep this behavior directly as-is to not introduce
differences that may surprise those already familiar with USD elsewhere.

Additionally, I've set Blender's default import purpose to "full" to
ensure we're loading in the highest quality assets first. Though this
has the obvious risk that "full" assets tend to be quite heavy. We can
change to "preview" if this proves too problematic later.

This does not change how Blender exports materials. Blender always uses
the "allPurpose" binding when writing its USD files.

--------
[1] USD docs:
https://openusd.org/release/api/class_usd_shade_material_binding_a_p_i.html#details
https://openusd.org/release/api/class_usd_shade_material_binding_a_p_i.html#UsdShadeMaterialBindingAPI_MaterialResolution

Pull Request: https://projects.blender.org/blender/blender/pulls/128206
2024-10-03 20:16:27 +02:00
Julian Eisel
2a31b3ea59 Merge branch 'blender-v4.3-release' 2024-10-03 19:54:14 +02:00