Commit Graph

115325 Commits

Author SHA1 Message Date
Clément Foucault
ebcc3dbc41 Fix: UI: Broken Geometry node socket display on macOS
Fix various warnings (that were errors) referring to
variables used inside their own initialization.
2024-11-26 21:32:27 +01:00
Clément Foucault
76a19fd3c5 Cleanup: Overlay: Remove OB_GPENCIL_LEGACY support 2024-11-26 21:32:27 +01:00
Sean Kim
14ca9998eb Cleanup: Use SI_MODE_PAINT instead of string comparison
Pull Request: https://projects.blender.org/blender/blender/pulls/130947
2024-11-26 19:57:47 +01:00
Sean Kim
893e9b5f49 Cleanup: Add example mapping pairs for bToolRef#mode
Pull Request: https://projects.blender.org/blender/blender/pulls/130949
2024-11-26 19:57:06 +01:00
Hans Goudey
569869b422 Cleanup: Remove unused attribute access definition 2024-11-26 13:03:20 -05:00
Hans Goudey
2dd124b391 Fix #130979: Curve object edit mode crash with evaluated mesh
Currently the text measure stats overlay is written to assume there
is an original edit mesh. It has to be disabled when that isn't the case.
2024-11-26 12:11:19 -05:00
Iliya Katueshenock
7126134309 Fix #130967: hidden sockets are made visible when dragging nodes
Never unhide a sockets as side effect. This was introduced as feature to automate
something in 3dead22c73.

Today this is just a source of confusion and annoying.

Pull Request: https://projects.blender.org/blender/blender/pulls/130984
2024-11-26 17:27:13 +01:00
Clément Foucault
f071385315 Cleanup: Overlay-Next: Split flat object sync to its own function
This allow to use the `Overlay` base class as intended.
2024-11-26 17:11:18 +01:00
Clément Foucault
1da9919841 Cleanup: Overlay-Next: Move Resource acquisition and release to class method 2024-11-26 17:11:18 +01:00
Falk David
ed1c262bb3 Cleanup: Remove unused Grease Pencil shader file
This file was completely unused and caused confusion.

Pull Request: https://projects.blender.org/blender/blender/pulls/130982
2024-11-26 17:09:42 +01:00
Jacques Lucke
7dc630069b Nodes: support subpanels in node group interface
Previously, only one level of panels was supported. Now, they can be nested arbitrarily.
Panels still have to come at the bottom though.

The panel color used to be just the node color darkened a bit. Now it uses the
`TH_PANEL_SUB_BACK` theme setting which is also used by panels in other places
in Blender. However, the contrast of that is a bit weaker than what we had in nodes before.
Therefore I increased the contrast a bit.

Pull Request: https://projects.blender.org/blender/blender/pulls/128886
2024-11-26 17:01:14 +01:00
Jacques Lucke
29bfd8ddcc Core: move FileData to C++
This is a simple cleanup as many similar ones before. The goal is to support
having C++ containers in `FileData`.

Pull Request: https://projects.blender.org/blender/blender/pulls/130980
2024-11-26 16:44:12 +01:00
Jacques Lucke
1d39bb4c80 Core: remove leftover IDOverrideLibrary
This is a leftover from an earlier version of overrides, but is effectively dead
code currently. It was used when there were proportional diffing capabilities.
However, Bastien mentioned that this would be implemented differently nowadays
anyway if it becomes necessary again.

This simplifies the write ID loop quite significantly.

Pull Request: https://projects.blender.org/blender/blender/pulls/130928
2024-11-26 16:09:59 +01:00
Nathan Vegdahl
409697a962 Anim: rename action_slot_name to last_slot_identifier
`AnimData`, NLA strips, and action constraints all have an `action_slot_name`
field in RNA. The purpose of this field is to store the identifier of the most
recently assigned slot, so that it can be used for auto-assignment when later
assigning different actions.

However, this field name is misleading in two ways:

1. In accordance with #130740, it's actually the slot *identifier*, not name.
2. It could be mistaken as a way to rename the currently assigned slot, which it
   is not.

To resolve both of those issues, we're renaming the field to
`last_slot_identifier`, which better communicates its actual nature.

As a bonus, this also ends up decluttering Python autocomplete when looking
for things related to action_slot.

Ref: #130892
Pull Request: https://projects.blender.org/blender/blender/pulls/130911
2024-11-26 16:05:40 +01:00
Clément Foucault
cbc185dbbd Cleanup: Overlay-Next: Move ShapeCache access to Resources 2024-11-26 15:43:01 +01:00
Jeroen Bakker
492830e9ac Fix #130832: Vulkan: Texture painting
When using texture painting Blender could freeze, crash or not showing
any results depending on the platform being used.

There were several issues:
- texture painting could send a layer offset of -1, which would select
  an incorrect layer
- source data wasn't copied correctly in the staging buffer as it
  ignored `texture_unpack_row_length`

Pull Request: https://projects.blender.org/blender/blender/pulls/130973
2024-11-26 15:15:25 +01:00
Omar Emara
f9420bd58a Compositor: Implement vector Blur for new CPU compositor
Reference #125968.
2024-11-26 16:10:56 +02:00
Omar Emara
43d2538087 Compositor: Implement Inpaint node for new CPU compositor
Reference #125968.
2024-11-26 16:10:56 +02:00
Omar Emara
be19daaa06 Compositor: Implement Directional Blur for new CPU compositor
Reference #125968.
2024-11-26 16:10:56 +02:00
Omar Emara
a9f8eca927 Compositor: Implement Symmetric Separable Variable Size Blur for CPU
Reference #125968.
2024-11-26 16:10:56 +02:00
Clément Foucault
c793c1ad38 Fix #130960: Overlay-Next: Curve control points are missing
It was caused by missing UBO.
2024-11-26 15:09:41 +01:00
Clément Foucault
d7d0b72be5 Fix: Overlay-Next: Null batch dereference 2024-11-26 14:51:39 +01:00
Clément Foucault
889ca87048 Fix: Overlay-Next: Null batch dereference 2024-11-26 14:45:15 +01:00
Clément Foucault
0ebfbaa463 Cleanup: Overlay-Next: Remove active_base 2024-11-26 14:36:20 +01:00
YimingWu
fc2f815b66 Fix #130513: Grease Pencil: material/vertex color pinning logic fix
When in grease pencil drawing mode, user could pin material or vertex
color to a specific brush or fill tool, but when switching tools, the
display and the logic of how those pinned material/vertex color are used
is inconsistent, leading to confusion.

The main cause of such problem is that the new GPv3 brush/fill tool is
not respecting pinning status, on top of that, user interface display
logic is also wrong. This PR makes sure that:

- Brush/fill tools respect pinning status.
- Buttons on the tool bar always display correct pinning status.
- Brush cursor will use correct color based on pinning status.

Pull Request: https://projects.blender.org/blender/blender/pulls/130968
2024-11-26 14:26:40 +01:00
Clément Foucault
986e495060 Fix: Overlay-Next: Crash when using volume wireframe
In some cases the volume wireframe batch can be null.
2024-11-26 14:23:08 +01:00
Clément Foucault
2901c4bb19 DRW: Assert non-null batch inside drawcall functions 2024-11-26 14:20:11 +01:00
Clément Foucault
41a54198bb GPU: Assert non-null batch inside drawing functions 2024-11-26 14:19:50 +01:00
Clément Foucault
7b75d06154 Fix: Overlay-Next: Broken build 2024-11-26 14:19:16 +01:00
Miguel Pozo
be6f68916a Fix #130906: Overlay: Crash
Use state.object_active directly, since state.active_base can be null.

Pull Request: https://projects.blender.org/blender/blender/pulls/130931
2024-11-26 14:09:54 +01:00
Bastien Montagne
8d0a5bf0fc Cleanup: Add some documentation comments to some Main properties. 2024-11-26 13:13:46 +01:00
Pratik Borhade
73cfa9f065 Fix #130785: Grease Pencil: Selection mask ignored in vertex paint
When point/stroke/segment selection is enabled and few elements are
selected, perform operation on them instead of entire range of editable
points. For that, pass a `is_selection_mask` boolean to
`apply_color_operation_for_mode` then get indexmask of selected points if
boolean is true.

Pull Request: https://projects.blender.org/blender/blender/pulls/130789
2024-11-26 12:21:50 +01:00
Sebastian Parborg
ee2b543da1 Fix #129921: Graph editor lacked any "frame changed" tagging
There is a different operator in the graph editor for jumping between
frames. This operator lacked the correct update tags and functions that
is in screen_ops for the other timeline editors.

Pull Request: https://projects.blender.org/blender/blender/pulls/130924
2024-11-26 12:18:10 +01:00
Sebastian Parborg
43560ad9f7 Refactor: Make areas_do_frame_follow to be easier to parse
Also make it callable outside of screen_ops.cc.
2024-11-26 12:18:06 +01:00
Jeroen Bakker
fc5e38c9b6 Vulkan: Allow suspending/resuming of layer tracking
Layer tracking allows modifying specific layers of a bound texture to a
different layout. This was only supported when suspending/resuming was
not needed. However when using complex scenes EEVEE can trigger suspend/
resume rendering scopes. This resulted into several validation warnings
as images where in the incorrect state.

Fixes validation warnings:
- rain_restaurant.blend
- classroom.blend

Pull Request: https://projects.blender.org/blender/blender/pulls/130957
2024-11-26 12:13:52 +01:00
YimingWu
f6dec941b7 Fix #130840: Grease Pencil: Use vgroup count to guard invalid defnr
Inside legacy GP -> GPv3 conversion, legacy vertex group `def_nr` was
incorrectly guarded by the group count of each vertex, which can lead to
missing groups since not all vertices will have weights in all groups.
This fix use the total vertex group count to guard invalid `def_nr`
values.

Pull Request: https://projects.blender.org/blender/blender/pulls/130886
2024-11-26 12:11:27 +01:00
Nathan Vegdahl
c0fd193abf Anim: rename slot name to slot identifier
This PR renames `ActionSlot::name` to `ActionSlot::identifier` for both DNA and
RNA, and also renames related methods, functions, constants, and comments.

The purpose of this rename is to help make it clear that this is not a "name"
in the traditional sense, but rather is a composite of the slot name + id type
for lookup purposes.

Ref: #130892
Pull Request: https://projects.blender.org/blender/blender/pulls/130740
2024-11-26 12:11:06 +01:00
YimingWu
8121d47960 Fix #130771: Grease Pencil: Copy vertex group names when interpolating
Grease Pencil `interpolate_between_curves` call will correctly sample
and interpolate curves, but it doesn't add any vertex group names in the
resulting curves, some other systems that rely on `defgrop` will not
work correctly even when those vertex group attributes are in place.
Copying vertex group names to result curves solves this problem.

Pull Request: https://projects.blender.org/blender/blender/pulls/130954
2024-11-26 12:10:04 +01:00
Nathan Vegdahl
370a11342c Anim: rename .action_slots to .action_suitable_slots
`AnimData`, NLA strips, and action constraints all have an
`action_slots` field in RNA. The purpose of this field is to list
the slots of the currently assigned action (if any) that are suitable
for the relevant ID.

However, this is not clear from the naming. In particular, given that
there is another field `action_slot` that represents the currently
assigned slot, the name `action_slots` could be easily misinterpreted
as a way to assign multiple slots at once, which is not possible.

To help clarify its actual purpose and meaning, this PR renames the
field to `action_suitable_slots`.

As a bonus, this also ends up decluttering the Python autocomplete when
looking for things related to `action_slot`.

Ref: #130892
Pull Request: https://projects.blender.org/blender/blender/pulls/130754
2024-11-26 11:40:05 +01:00
Falk David
e692c916f8 Cleanup: Grease Pencil: Draw operations
- `EraseOperation` reorder public and private sections.
 - Use default value of `false` for the `temp_eraser`.
 - `PaintOperation` constructor
2024-11-26 11:05:14 +01:00
YimingWu
00f61f0913 Fix #130904: Grease Pencil: Build modifier additive mode issues
Grease pencil build modifier additive mode has two problems that is
causing crashes and wrong build result when drawing in additive mode:

- Not assigning `dst_to_src_curve` for previously built curves.
- The way `previous_drawing` was acquired was wrong, this gives a zero
  stroke count for additive build mode, which prevented the crash while
  not in drawing mode (not on key frame), but is in fact incorrect for
  the algorithm.

This PR handles these problems and additive mode now works correctly
and without crashes while drawing new frames.

Pull Request: https://projects.blender.org/blender/blender/pulls/130952
2024-11-26 11:00:48 +01:00
Guillermo Venegas
2760def19a Fix: Vulkan: Free command pool buffers
Currently `VkCommandBuffer` are allocated with `vkAllocateCommandBuffers`,
however when the commands are submitted pointer are just reset, these leaks
are visible with just play back animations.

This frees commands buffers resolving the leaks.

Ref: #127225 Although related we should check the result as there could be more causes.
Pull Request: https://projects.blender.org/blender/blender/pulls/130203
2024-11-26 08:31:25 +01:00
Campbell Barton
9e9598877e Cleanup: balance braces in pre-processor checks
While it's correct, unbalanced braces confuses some editing operations.
2024-11-26 12:41:29 +11:00
Campbell Barton
5ef9b93d2a Cleanup: avoid variable shadowing 2024-11-26 12:41:29 +11:00
Campbell Barton
600f803922 Cleanup: pass string as a const reference 2024-11-26 12:41:29 +11:00
Clément Foucault
328a6aa506 Fix #130687: Grease Pencil: Rendering order broken
`gpModelMatrix` needed to be set by reference.
Reference needed to be float4x4.
float4x4 cannot be inside C allocated struct (alignment).
Move the `object_bound_mat` to the instance struct
to workaround this issue.
2024-11-25 23:30:00 +01:00
Harley Acheson
4ff47d85e0 UI: Improved Calculation of Width of Collapsed Node Title
Improve the positioning of node titles, when collapsed, so that they
don't overflow the gripper icon on the right and truncate incorrectly.

Pull Request: https://projects.blender.org/blender/blender/pulls/130936
2024-11-25 23:29:42 +01:00
Bartosz Kosiorek
5edc68c442 Fix #130244: Improved Calculation of Node Name Width
Improve the positioning of node titles so that they don't overflow
icons on the right and truncate incorrectly.

Pull Request: https://projects.blender.org/blender/blender/pulls/130409
2024-11-25 22:34:21 +01:00
Hans Goudey
de3a3b0d1c Cleanup: Remove unused code after recent subdiv refactor
b04ef9827a
2024-11-25 15:36:51 -05:00
Harley Acheson
1235a914cd Fix #130732: Join/Dock Tag Redraw on Secondary Participants
Joining and Docking tag the source and target areas for redrawing. But
there are times when areas are split and recombined as part of the
processes. In some cases areas that are not either source or target
must also be tagged for redraw. Especially for Outliner and 3DView as
they try to avoid full redraws with RGN_DRAW_NO_REBUILD, but needed
here.

Pull Request: https://projects.blender.org/blender/blender/pulls/130801
2024-11-25 20:14:18 +01:00