Commit Graph

25250 Commits

Author SHA1 Message Date
Falk David
447c324da2 Merge branch 'blender-v4.3-release' 2024-11-08 16:39:13 +01:00
Falk David
6b6bd3bd8f Fix: GPv3: Groups sometimes loose their color tag
The copy constructor of the layer groups class was missing
the `color_tag`. This fixes the issue.
2024-11-08 16:36:36 +01:00
Lukas Tönne
021e010a07 Merge branch 'blender-v4.3-release' 2024-11-08 10:22:58 +01:00
Lukas Tönne
449e7229f3 Fix #129749: Use consistent GPv3 color settings in different modes
Always use the Brush.color setting in the Draw mode side bar.
Technically the "Color" panel in the sidebar can draw in other modes,
but it's polling for explicit tools that limit it to the Draw mode
implicitly.

Use the appropriate brush or unified color in other GP modes based on
the unified paint settings flag.

Worth noting this was technically broken for a long time:
The default was that unified paint is disabled, so the GP panels would
use the brush color as expected. Enabling unified paint would then break
the colors, probably wasn't done very frequently since GP files
and e.g. mesh sculpting don't mix often. The default was changed in
#129127 to enable unified paint by default, which now breaks GP colors
by default.

Pull Request: https://projects.blender.org/blender/blender/pulls/129790
2024-11-08 10:21:24 +01:00
Bastien Montagne
b0842c24b6 Merge branch 'blender-v4.3-release' 2024-11-07 18:27:34 +01:00
Bastien Montagne
320c77b963 Fix #123769: Assert when saving a file with deleted workspaces.
Delete sceens when their workspace is deleted.

Also remove `IDTYPE_FLAGS_NEVER_UNUSED` tag from bScreen ID type, there
is no more point to keep these IDs around if they are not used, there
are supposed to be mere sub-data of the Workspaces.

Pull Request: https://projects.blender.org/blender/blender/pulls/129975
2024-11-07 18:22:21 +01:00
Hans Goudey
ba94dbc9c2 Cleanup: Remove unused grease pencil legacy "orig" pointers
Unused for annotations. See #123468.

Pull Request: https://projects.blender.org/blender/blender/pulls/129979
2024-11-07 17:54:15 +01:00
Julian Eisel
aa24f0ee36 Merge branch 'blender-v4.3-release' 2024-11-07 15:52:55 +01:00
Julian Eisel
d9748470fa Fix #125230: Issues when loading file with pinning gpencil brush material
Brushes and changes done to them are preserved now when loading
different files (until Blender closes). Unpin and clear the material
assigned to the brush when loading a different file, since this material
is local to the previous file.

Pull Request: https://projects.blender.org/blender/blender/pulls/128080
2024-11-07 15:52:16 +01:00
Julian Eisel
a482ffdf56 Merge branch 'blender-v4.3-release' 2024-11-07 15:50:10 +01:00
Bastien Montagne
0455dbcb4b Fix #129900: GPv3: Invalid handling of unused drawings removal.
Code detecting unused drawings and swapping them with a used one would
fail in a most basic case, leading to invalid state down the line:

```
[used_drawing, unused_drawing]
```

`unused_drawing` was not properly removed, as it is expected.

NOTE: Added an extra assert on (presumably) expected conditions of the
drawing indices and drawings array at the end of the process.

Co-authored-by: Lukas Tönne <lukas@blender.org>
2024-11-07 15:40:57 +01:00
Lukas Tönne
41b3f05a63 Merge branch 'blender-v4.3-release' 2024-11-07 13:33:33 +01:00
Lukas Tönne
dc04d9abc7 Fix (unreported): GPv3: Incorrect user count for drawing at index 0
The `GreasePencil::update_drawing_users_for_layer` function was using an
incorrect drawing index check, skipping over drawing 0 every time.
As a consequence the first drawing may have zero users despite at least
one frame referencing it.

Pull Request: https://projects.blender.org/blender/blender/pulls/129955
2024-11-07 13:31:34 +01:00
Hans Goudey
ba03407e33 Cleanup: Subdiv: Remove unnecessary C-API header
Use the topology refiner header directly.
Followup for 5e46e3d28a.

Pull Request: https://projects.blender.org/blender/blender/pulls/129941
2024-11-07 10:36:53 +01:00
Bastien Montagne
89d69ddaf3 Merge branch 'blender-v4.3-release' 2024-11-06 18:17:28 +01:00
Bastien Montagne
ca1353237f Fix #129797: bpy.data.libraries.write() is no longer saving the asset_data associated with the ID-block.
Do copy asset data when copying an ID into the PartialWriteContext.

Currently there does not seem to be any use-case where this would not be
the desired behavior. This can be made an optional behavior in the
future if needed.
2024-11-06 17:52:41 +01:00
Pratik Borhade
43c9b89c51 Fix: Resolve merge error from 2d37a3a1a7 2024-11-06 20:48:09 +05:30
Pratik Borhade
2d37a3a1a7 Merge branch 'blender-v4.3-release' 2024-11-06 20:28:26 +05:30
Pratik Borhade
496023691c Fix: Unused parameter warning
Caused by 40162873e0

Pull Request: https://projects.blender.org/blender/blender/pulls/129910
2024-11-06 15:54:42 +01:00
Campbell Barton
273bccb108 Cleanup: remove unused arguments, quiet unused assignment warning 2024-11-06 21:37:06 +11:00
Richard Antalik
f27220f6b6 Merge branch 'blender-v4.3-release' 2024-11-06 05:44:11 +01:00
Pratik Borhade
40162873e0 Fix #129632: GPv3: Vgroup operation edits drawings from all keyframes
Verge groups operations such as assign/remove/select/deselect from data
properties tab edits all drawings instead of visible drawings at current
frame. Now fixed with `retrieve_editable_drawings`.
For remove/remove_from operator, separate PR is created: !129890

Pull Request: https://projects.blender.org/blender/blender/pulls/129789
2024-11-06 04:16:48 +01:00
Aras Pranckevicius
0598db079d Cleanup: Remove lite build warning 2024-11-05 21:02:53 +02:00
Bastien Montagne
eb244c9460 Merge branch 'blender-v4.3-release' 2024-11-05 19:36:22 +01:00
Bastien Montagne
6fb6cd64b1 Fix 'missing files' operator not reporting which ID is using the missing filepath.
No idea why this was not reported before... Kind of critical info here.

Committed directly to 4.2 as:
* This is trivial change with extremely small risk of causing issues.
* Gold team at the studio needs it to better cleanup the production
  files for publication.
2024-11-05 19:32:05 +01:00
Clément Foucault
8c0bd61342 Merge branch 'blender-v4.3-release' 2024-11-05 17:40:49 +01:00
Julian Eisel
fd2d2f225f Fix #128744: Reverting single essentials brush reverts all
Code used library reloading which would reload all data-blocks from a
data-block library. Since the essentials brushes are stored in a single
.blend file (one per mode), they would all be reset. In general this
violates the design where multiple brushes in a single .blend file
should be usable just fine. (A single file per brush is only necessary
to allow saving edits to that file without opening it.)

Instead of library reloading, delete the brush from the current file and
re-link it.

The link/append API should probably get support for reloading a single
data-block (and optionally its dependencies) but for now this is not
supported yet.

Pull Request: https://projects.blender.org/blender/blender/pulls/129866
2024-11-05 17:05:15 +01:00
Aras Pranckevicius
39c4c7cf3f ffmpeg: 10 and 12 bit video support
Part of overall #118493 task: video input/output support at 10 and 12
bit/component formats. (note: this is still LDR videos just at higher
precision; there's no HDR handling (yet)).

Movie reading/playback: when movie file pixel format has >8 bit
components, decode those into a floating point ImBuf result. Previously
all movies were decoded into 8 bit/channel ImBufs, so 10- and 12-bit
movie pixel colors were getting quantized.

Movie output: when ffmpeg video with suitable codec is selected,
there's a color depth setting under Encoding block. Currently that is:
- 10 bit option for H.264, H.265, AV1 (VP9 could do 10 bit in theory too,
  but ffmpeg that is built in Blender does not have that compiled in)
- 12 bit option for H.265, AV1

When "lossless" is picked, then similar to how for regular 8-bit video
it switches from YUV 4:2:0 to 4:4:4, this also switches to 4:4:4
10- or 12-bit variant.

Pull Request: https://projects.blender.org/blender/blender/pulls/129298
2024-11-05 16:44:16 +01:00
Pratik Borhade
6cdac7bab8 Fix #129297: Gizmo missing for unlocked layer when autolock inactive is on
`set_active_node` call from `grease_pencil_copy_data` resets inactive
layer again as locked before executing the drawing code. Since property
is only operated on layers, it is possible to remove the code from
`set_active_node()` and only have it in `set_active_layer()`.

Pull Request: https://projects.blender.org/blender/blender/pulls/129465
2024-11-05 12:29:51 +01:00
Julian Eisel
d8680e9476 Merge branch 'blender-v4.3-release' 2024-11-05 12:06:47 +01:00
Iliya Katueshenock
74f98b1e92 Fix: Geometry Nodes: crash when converting layers to instances
The crash/assert happened because the case when there are instances already was not handled.

Pull Request: https://projects.blender.org/blender/blender/pulls/127299
2024-11-05 11:05:28 +01:00
Sean Kim
9ceb33fedb Merge branch 'blender-v4.3-release' 2024-11-04 10:52:19 -08:00
Sean Kim
426ed8c61e Fix #129425: Using Voxel Remesh in sculpt mode can crash
When using the Voxel Remesh operator, there are two possible sources of
crashes currently:
* TBB task stealing in nested parallel loops with thread local data
* Null dereference of PBVH data when pushing sculpt undo steps

To fix the former issue, this commit guards the
`threading::parallel_for` internal function with
`threading::isolate_task` to prevent possible task stealing and
corruption of the thread local data.

Additionally, it has the effect of fixing debug asserts inside
`array_utils::gather` due to the this task stealing.

To fix the latter issue, this commit adds a call to
`BKE_sculpt_update_object_for_edit` to ensure that this data is
populated.

Pull Request: https://projects.blender.org/blender/blender/pulls/129704
2024-11-04 19:50:34 +01:00
Falk David
a4e0b799c8 Merge branch 'blender-v4.3-release' 2024-11-04 17:04:09 +01:00
Philipp Oeser
bdfb3ea6e7 Fix #129727: GPv3: renaming bones does not rename vertex groups
First issue is that `BKE_modifiers_uses_armature` wasnt working for GP
objects and the second one is that vgroup names are stored in
CurvesGeometry for GP (so that needs special handling, now done, same as
in `BKE_object_defgroup_set_name`).

Pull Request: https://projects.blender.org/blender/blender/pulls/129794
2024-11-04 17:00:51 +01:00
Omar Emara
dc4155e133 Merge branch 'blender-v4.3-release' 2024-11-04 17:12:39 +02:00
Omar Emara
a1b489ec71 Fix #129670: Curves not drawn outside of clip range
Curve maps in nodes like RGB Curves are not drawn nor evaluated outside
of clipping range. This is a regression in 8812be59a4, where the range
of the curve didn't account for points that lie outside of the clipping
range. That's because the table_range variable was initialized before
the loop that updates the minimum and maximum points of the table.

To fix this, we move the table_range initialization after the loop that
updates the minimum and maximum points of the table.

Pull Request: https://projects.blender.org/blender/blender/pulls/129777
2024-11-04 16:11:43 +01:00
Hans Goudey
888ae45dfa Cleanup: Remove unused grease pencil legacy draw cache
See #123468.

Pull Request: https://projects.blender.org/blender/blender/pulls/129787
2024-11-04 12:17:48 +01:00
Hans Goudey
9a30cb0c1e Cleanup: Remove unused grease pencil legacy kernel functions
Also remove the bounds from DNA since it was just runtime data
and was no longer referenced.

See #123468.
2024-11-02 23:16:04 +01:00
Hans Goudey
a8f41a618c Cleanup: Remove unused GP V2 transform, curve edit code
See #123468.

Pull Request: https://projects.blender.org/blender/blender/pulls/129731
2024-11-02 22:24:59 +01:00
Hans Goudey
5ed65e6608 Cleanup: Remove unused grease pencil V2 update cache, DLRB tree
See #123468.

Pull Request: https://projects.blender.org/blender/blender/pulls/129729
2024-11-02 22:18:10 +01:00
Hans Goudey
d4011668dd Cleanup: Remove unused gpencil_geom_legacy.cc functions
See #123468.
2024-11-02 21:08:14 +01:00
Campbell Barton
15c207a294 Merge branch 'blender-v4.3-release' 2024-11-02 17:34:00 +11:00
Campbell Barton
4df285ccd5 Cleanup: move function comments into headers or implementation notes
For C/C++ doc-strings should be located in headers,
move function comments into the headers, in some cases merging
with existing doc-strings, in other cases, moving implementation
notes into the function body.
2024-11-02 17:27:09 +11:00
Hans Goudey
4a08d48906 Refactor: Sculpt: Store active vert as int for multires
The impetus is removing the `BKE_subdiv_ccg.hh` include from
`BKE_paint.hh`, but I also think this is a bit of a simplification in
general. There's often no need for a special type to reference a
`SubdivCCG` vertex, which is a lot like `Mesh` but with a different
topology format.

Pull Request: https://projects.blender.org/blender/blender/pulls/129687
2024-11-01 20:01:44 +01:00
Sean Kim
c542241e1c Refactor: Remove PBVHFrustumPlanes
The PBVHFrustumPlanes `struct` is a thin wrapper around a collection of
`float4`s, each representing a plane. This commit removes this concept
in favor of static sized `std::array<float4, 6>` to avoid errors when
indexing into the collection and uses `Span`s when performing tests
against AABBs

Pull Request: https://projects.blender.org/blender/blender/pulls/129609
2024-11-01 19:41:00 +01:00
Hans Goudey
3d6e1c7bac Fix: Mistake in previous paint BVH cleanup commit
55cf0925ec
2024-11-01 17:36:57 +01:00
Hans Goudey
0be2535369 Cleanup: Remame PBVH headers to "paint BVH"
The PBVH struct is now called `bke::pbvh::Tree`. Expanding the acronym
in the file name just a little should help developers find things and make
the connection to the "paint" concept that loosely ties sculpt mode and
other painting modes together a little stronger.

This rename also lets us replace the weird `_api.hh` historical part of
the file name without reusing the old `BKE_pbvh.hh` file name, which
would have probably made understanding the git history a bit harder.

Pull Request: https://projects.blender.org/blender/blender/pulls/129684
2024-11-01 17:27:07 +01:00
Hans Goudey
9a17a6a154 Fix: Deduplicate/correct curves point selection calculation
The grease pencil version of the code had a race condition, appending
to a vector from multiple threads.
2024-11-01 16:59:52 +01:00
Julian Eisel
68a74c4095 Merge branch 'blender-v4.3-release' 2024-11-01 15:34:39 +01:00