Commit Graph

117289 Commits

Author SHA1 Message Date
Aras Pranckevicius
611940805e Fix #107493, #98480: video rotation metadata is not read
Videos files recorded on most phones were coming in sideways; files
recorded on some laptop cameras were coming in upside down. In both
cases the display_matrix metadata of the video stream was not applied.

This required changing internal container format of movie proxies to
be MP4 instead of AVI, since AVI does not support rotation metadata.
File extension kept at ".avi" to not disturb existing expectations.

It might be better to "bake" rotation into proxies while building them,
but right now we do not have a trivial way of doing that.

Note that this is a potential behavior change; if someone
already had manually rotated video strips, they would have
to undo that rotation now.

Pull Request: https://projects.blender.org/blender/blender/pulls/130455
2024-11-27 17:08:37 +01:00
Philipp Oeser
5aa95941d1 Fix #130998: Crash changing Color Palette in Object/Edit/Pose modes
Caused by 7b0ea0f1b4

By default, Color Palettes are only drawn in the UI in the context of
**painting**. UI button code then tries to update an appropriate brush
from edits to the palette.

In the report though, a palette was created and displayed via python,
making changes in Object/Edit/Pose would then crash.

So a valid `Paint` and `Brush` were assumed. `Paint` was already checked
for in a324a19f1b, but since 7b0ea0f1b4, `Paint`(if we actually have
it, e.g.from `ImagePaintSettings` [see a324a19f1b]) only has its
`brush` set once we enter texturepaint once.

Solved by checking we have a valid Brush in corresponding UI code to
begin with.

Pull Request: https://projects.blender.org/blender/blender/pulls/131031
2024-11-27 15:41:26 +01:00
Hans Goudey
953c4f1599 Cleanup: Remove references to legacy Grease Pencil object
These are converted on startup to the new type. There are still
some references left, mostly where it looked like there still needs
to be changes to properly deal with the new object type.
2024-11-27 09:17:16 -05:00
Philipp Oeser
1448967287 Fix #130748: selection of bones in grease pencil weightpaint mode fails
Two places that were not ready for GPv3:
- armatures were not set to posemode when entering weightpaint
- armatures were not in the object list when OpenGL selecting (thus
their bones were missing)

Both of them because existing code only respected
`eModifierType_Armature` (and not `eModifierType_GreasePencilArmature`
as well).

This is now corrected.

Similar to bdfb3ea6e7

Pull Request: https://projects.blender.org/blender/blender/pulls/130908
2024-11-27 14:44:26 +01:00
Habib Gahbiche
4de34c8205 UI: Implement snapping for node resizing
When snap is active, resizing nodes now snaps the edge of the node to
grid. Holding `CTRL` inverts snapping.

Part of https://projects.blender.org/blender/blender/issues/128612

Pull Request: https://projects.blender.org/blender/blender/pulls/130379
2024-11-27 11:09:48 +01:00
Campbell Barton
8fba37cea7 Fix #129657: Broken pipe from a Python script closes Blender
Since [0] PyConfig_InitIsolatedConfig was used which disables
Python's signal handlers, re-enable them as they're needed for
Python's own error handling to work properly.

[0]: cd5dd6e454
2024-11-27 20:32:50 +11:00
YimingWu
ca78cae828 Fix #130992: Grease Pencil: Edit wire/vertex color usage fix
In legacy overlay the wire/vertex color used to draw grease pencil was
wrong, this means users can't effectively adjust grease pencil specific
wire colors. Currently this shader is used for both legacy and overlay
next, so this fix would be also beneficial down the line.

Pull Request: https://projects.blender.org/blender/blender/pulls/131023
2024-11-27 10:13:20 +01:00
Campbell Barton
f088bb1bc8 Cleanup: spelling in comments 2024-11-27 19:01:02 +11:00
Campbell Barton
b9f055459a Cleanup: ensure trailing space around comment blocks 2024-11-27 19:01:00 +11:00
seanterelle
6e9d988018 Geometry Nodes: Add dynamic label to warning node
Implementation of auto-label for the warning node based on the type
(similar to the Math node).

Pull Request: https://projects.blender.org/blender/blender/pulls/131000
2024-11-27 01:41:49 +01:00
Marco Rotili
e6d941cdf4 Fix #129178: Opening the context menu on a numeric input shows the wrong cursor
Use non-modal setting of mouse cursor type so that the correct one is
shown for the numerical input context menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/129455
2024-11-27 00:58:38 +01:00
Clément Foucault
112b3bae84 Fix: GPU: Asserts when building WITH_GPU_DRAW_TESTS but without WITH_GTEST 2024-11-26 22:39:13 +01:00
Clément Foucault
7faec42236 Fix #130867: Overlay-Next: Crash on startup on intel macs
Loading the matrix first to local variable fixes the
internal compiler error.
2024-11-26 22:21:40 +01:00
Clément Foucault
badedb204a Overlay-Next: Move wireframe depth buffer copy before rendering
This avoid renderpass splitting and make overlay follow
the overlay interface.

Also fix the infront wireframe not copying the correct depth
buffer.
2024-11-26 21:32:27 +01:00
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