Commit Graph

120055 Commits

Author SHA1 Message Date
Pratik Borhade
d943c9f128 Fix #128831: GPv3: Crash when adding action track
When grease pencil has no actions (ale->adt), id data block channel is
still added due to `ANIMFILTER_ANIMDATA`. This would lead to crash if
operator is accessing the AnimData (ale->adt). To fix this, make sure
adt exists before creating an animchannel.

Pull Request: https://projects.blender.org/blender/blender/pulls/128841
2024-11-04 17:59:26 +05:30
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
Falk David
df0c567380 Fix #129781: GPv3: Memory leak in the edit batch cache
Introduced by 5fff95f519.
The commit forgot to free the `cache->edit_points_vflag`.
The fix frees the buffer in `grease_pencil_batch_cache_clear`.

Pull Request: https://projects.blender.org/blender/blender/pulls/129786
2024-11-04 12:13:04 +01:00
Hans Goudey
a64a2fe3ff Merge branch 'blender-v4.3-release' 2024-11-04 11:49:56 +01:00
Hans Goudey
af58c223a4 Fix #129598: Resample curves node missing type alignment handling
The 4x4 matrix type has a larger alignment requirement of 16 bytes
than the default, but it was stored in a generic vector of bytes. There
are a few solutions that reduce the memory reuse in this code path--
the chosen solution uses a custom allocator which always allocates
with an alignment that should be large enough for anything.

Generally I think this resampling loop could be rewritten to be a bit
simpler, avoiding these problems in the first place. Some performance
testing would show whether this "fancy" memory use between types
and loop structure is actually worth it. For now though, just correcting
the existing logic seems like the best choice.

Pull Request: https://projects.blender.org/blender/blender/pulls/129628
2024-11-04 11:44:06 +01:00
Xavier Hallade
57a7a940e1 Merge branch 'blender-v4.3-release' 2024-11-04 11:34:05 +01:00
Damien Picard
edcc5e0e87 I18n: Translate and disambiguate a few messages
Translate
- Extract Grease Pencil modifier subpanel header messages.

Disambiguate
- Integer Math node operation (same as other existing math nodes).

Pull Request: https://projects.blender.org/blender/blender/pulls/128715
2024-11-04 11:15:48 +01:00
Marco Rotili
b6481372b9 Fix #129629: Crash when applying Geometry Nodes modifier on all keyframes on a Grease Pencil object
The input `md_eval` is invalidated when calling `BKE_scene_graph_update_for_newframe`.

The fix uses `BKE_modifier_get_original` to pass the original modifier
to `apply_grease_pencil_for_modifier_all_keyframes` then calls `BKE_modifier_get_evaluated`
after `BKE_scene_graph_update_for_newframe` to ensure the `md_eval` pointer is valid.

Pull Request: https://projects.blender.org/blender/blender/pulls/129732
2024-11-04 10:38:46 +01:00
Jesse Yurkovich
3ab01f02f3 Merge branch 'blender-v4.3-release' 2024-11-03 20:29:31 -08:00
Jesse Yurkovich
673f6dbb7f Fix #129725: Handle case of no animation keys during Collada export
Regression from 629b3ccd42

Guard against `BKE_key_from_object` returning null.

Pull Request: https://projects.blender.org/blender/blender/pulls/129760
2024-11-04 05:28:36 +01:00
Jesse Yurkovich
0d6dc4c594 Merge branch 'blender-v4.3-release' 2024-11-03 19:39:06 -08:00
Jesse Yurkovich
60d88f46ba Fix: STL import crash when unable to open or read file
Regression from d1455c4138

Ensure we return from `importer_main` if no mesh could be loaded with
`read_stl_file` (e.g. `bpy.ops.wm.stl_import(filepath="<nope>")`)

Pull Request: https://projects.blender.org/blender/blender/pulls/129759
2024-11-04 04:38:15 +01:00
Richard Antalik
4af90dcaff Merge branch 'blender-v4.3-release' 2024-11-04 03:17:14 +01:00
Richard Antalik
a7f1d76187 Fix #126007: Sequecer renders even if all videos are muted
Check muting in `RE_seq_render_active()`.

This is to allow sequencer timeline to contain reference strips, which
are muted.

Pull Request: https://projects.blender.org/blender/blender/pulls/129561
2024-11-04 03:16:20 +01:00
Richard Antalik
2a32b26415 Fix: VSE: Use after free in retiming
Caused by incorrectly initializing temporary range of `for` loop.

Pull Request: https://projects.blender.org/blender/blender/pulls/129659
2024-11-04 03:16:13 +01:00
Campbell Barton
02571da35f PyDoc: correct GPUIndexBuf doc-string & exception 2024-11-04 11:55:41 +11:00
Campbell Barton
3bab869c0d Fix BMeshElemSeq.sort(key=None) argument
Allow passing key=None to BMesh element sorting callback,
matching the doc-string & Python's list sort.
2024-11-04 11:55:37 +11:00
Sean Kim
2c5eabca73 Merge branch 'blender-v4.3-release' 2024-11-03 15:08:17 -08:00
Sean Kim
43bbd9fd2d Fix: Paint: Unified strength value should be off by default
Introduced in 1bc5c488d4

The value used in DNA_scene_defaults.h was out of sync with the actual
default startup value. In all currently supported and in development
versions (3.6 LTS, 4.2 LTS, 4.3, and 4.4), the `UNIFIED_PAINT_ALPHA`
bit value is set to false.

Pull Request: https://projects.blender.org/blender/blender/pulls/129711
2024-11-04 00:07:29 +01:00
Bastien Montagne
397286e985 Cleanup: Silence unused var warning in NDBEUG builds. 2024-11-03 16:53:25 +01:00
Jacques Lucke
a17ac76d13 BLI: support accessing underlying memory buffer of Vector container
This extends the `Vector` API to support transfering ownership of a memory
buffer to and from a `Vector`. This reduces the need for unnecessary copies in
some cases which converting between data-structures. A new
`VectorSet::extract_vector` method is added that takes O(1) time. Previously,
this was only possible in O(n) time by copying the entire array.

The `Vector::release` method can be used to e.g. build a vector with the C++
container, but then extract it for use in DNA data.

Pull Request: https://projects.blender.org/blender/blender/pulls/129736
2024-11-03 12:09:05 +01:00
Campbell Barton
d40a0fc5c3 Merge branch 'blender-v4.3-release' 2024-11-03 22:04:51 +11:00
Campbell Barton
ba3c53f200 Merge branch 'blender-v4.3-release' 2024-11-03 22:04:48 +11:00
Campbell Barton
d920ef5425 Merge branch 'blender-v4.3-release' 2024-11-03 22:04:44 +11:00
Campbell Barton
470173bbc4 PyDoc: use keyword only specifier for bpy.props & bpy.ops 2024-11-03 21:50:33 +11:00
Campbell Barton
091ee2833b PyDoc: replace references to the deprecated "bgl" with "gpu"
Also correct bullet-points in gpu.state.blend_set.
2024-11-03 21:50:33 +11:00
Campbell Barton
b00550916c PyDoc: correct use of single back-ticks 2024-11-03 21:50:33 +11:00
Hans Goudey
aa62c1b5d1 Fix #129741: Two issues creating GPU shader from Python
1. Log printing casted a span of `StringRefNull` to a span of `char **`
2. Creating the shader tried to create `StringRefNull` from `nullptr`.
2024-11-03 10:49:16 +01:00
Campbell Barton
f17379a5d0 Merge branch 'blender-v4.3-release' 2024-11-03 16:07:40 +11:00
Campbell Barton
3bcfb151c1 PyDoc: use Python's type annotation syntax for doc-strings
Replace plain-text type information with the type syntax used
for Python's type annotations as it's more concise, especially for
callbacks which often didn't include useful type information.

Note that this change only applies to inline doc-strings,
generated doc-strings from RNA need to be updated separately.

Details:

- Many minor corrections were made when "list" was incorrectly used
  instead of "sequence".
- Some type information wasn't defined in the doc-strings and has been
  added.
- Verbose type info would benefit from support for type aliases.
2024-11-03 15:44:35 +11: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
a804320138 Cleanup: Remove unused grease pencil legacy handling in some operators
See #123468.
2024-11-02 23:14:41 +01:00
Hans Goudey
a1e63eeb8a Cleanup: Remove unused grease pencil legacy overlays
See #123468.
2024-11-02 23:07:16 +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
Clément Foucault
afaa315418 GPU: Printf: Print buffer content even in case of overflow
The start of the buffer is ensured to be correct. So there
is no downside in printing the content of the overflowed
buffer.

At least, we get a feedback at which command is flooding it.
2024-11-02 21:51:26 +01:00
Hans Goudey
d4011668dd Cleanup: Remove unused gpencil_geom_legacy.cc functions
See #123468.
2024-11-02 21:08:14 +01:00
Jesse Yurkovich
919aad31d6 Cleanup: Use fmtlib instead of iostream for import/export status print
Removes the last remaining, direct, usage of streams inside USD.

CLOG is not used here because there's no way to have a trace be "always
printed," even if using a log-level of -1 or similar.

Pull Request: https://projects.blender.org/blender/blender/pulls/129702
2024-11-02 21:01:45 +01:00
Hans Goudey
a222aa609c Cleanup: Remove outdated references to DLRB tree 2024-11-02 20:45:59 +01:00
Hans Goudey
405e2aeb71 Cleanup: Remove unused include from attribute header 2024-11-02 20:29:36 +01:00
Leon Schittek
0d3b7ec82b Merge branch 'blender-v4.3-release' 2024-11-02 17:04:58 +01:00
Leon Schittek
3347aa4017 Fix: Geometry Nodes: Matrix socket not connecting after link-drag search
Ensure the matrix socket is made available, when connecting to it via
the link-drag search.

Pull Request: https://projects.blender.org/blender/blender/pulls/129713
2024-11-02 17:03:42 +01:00
Hans Goudey
65da82f67c Fix #129715: Crash with GPU subdivision in wireframe mode
Mistake in 9b97ba1462.
2024-11-02 14:32:20 +01:00
Jacques Lucke
b239dead79 Merge branch 'blender-v4.3-release' 2024-11-02 12:18:19 +01:00
Jacques Lucke
0c2a70e970 Fix: crash using Edit Minimum Distance operator
This fixes two crashes related to freeing the operator data incorrectly and too early.
2024-11-02 12:17:41 +01:00
Campbell Barton
71a38df6fa Merge branch 'blender-v4.3-release' 2024-11-02 18:02:15 +11:00
Campbell Barton
a05345e139 PyDoc: various corrections to function doc-strings
Add missing arguments, corrections & remove unchecked type info.
2024-11-02 17:48:21 +11: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
Campbell Barton
b26be23fe8 Merge branch 'blender-v4.3-release' 2024-11-02 15:44:25 +11:00