Commit Graph

100558 Commits

Author SHA1 Message Date
Campbell Barton
2100ebca7a Cleanup: use the term "value" for RNA get/set functions
This is already used in most functions.
2023-06-20 13:23:30 +10:00
Hans Goudey
b0caddc32b Merge branch 'blender-v3.6-release' 2023-06-19 22:29:18 -04:00
Hans Goudey
e516f25e8f Fix #109060: Crash with mask modifier smooth option
A mistake similar to the one fixed in 17aaff69c6.
Also remove the DNA deprecated define added in the last fix.
2023-06-19 22:27:47 -04:00
Hans Goudey
4bd0676cf1 Merge branch 'blender-v3.6-release' 2023-06-19 21:45:36 -04:00
Jason Fielder
53cb09357e Fix #108792: Ensure Metal buffers correctly freed on exit
Replaces vector of allocations with dynamic linked list.
Bug caused by previously freed buffers still having been in the
list. Linked list enables fast removal of already-released buffers.

Also ensured that the memory manager classes are included in
memory tracking.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/108940
2023-06-19 20:28:51 +02:00
Germano Cavalcante
cedec09d05 Fix #109130: Crash with Snap Project Individual
Caused by 3df2110abd

`dist_px` can be `nullptr`.
2023-06-19 14:26:58 -03:00
Germano Cavalcante
7764c87528 Cleanup: Transform Snap Object Code
Transform: remove unused members from 'SnapObjectHitDepth'

Also move the `short face_nearest_steps` member before the bit field.

And move 'void SnapData_EditMesh::clear()' definition to the source.

Pull Request: https://projects.blender.org/blender/blender/pulls/109132
2023-06-19 19:03:08 +02:00
Almaz Shinbay
93e2e749da Outliner: Port armature elements to new tree-element code design
No user visible changes expected.

Part of #96713, continuation of work started in 249e4df110 and 2e221de4ce.
Refer to these for a motivation and design overview.

Adds a new tree-element class for armature IDs.

Pull Request: https://projects.blender.org/blender/blender/pulls/108964
2023-06-19 19:01:21 +02:00
Julian Eisel
378843c69c Cleanup: Comments & naming to File Browser file-listing logic more clear
Always found this function a bit hard to follow, hopefully these small
tweaks improve that slightly.
2023-06-19 18:22:35 +02:00
Julian Eisel
6fd1f565d2 Cleanup: Replace unnecessary function in file indexer with lambda
The function was named like a public API call but wasn't one. Rather
than renaming, replace it with a lambda that keeps the callback and
void-pointer casting local to the function it is necessary for. This
also avoids obfuscating code with function calls for trivial logic.
2023-06-19 18:22:34 +02:00
Falk David
8c0b81da5b Cleanup: Separate GP operators and functions
Moved selection operators and related functions to their own file
`grease_pencil_select.cc`.
Moved editing related functions to `grease_pencil_edit.cc`.
Added a `ED_operatortypes_grease_pencil` function that calls all the
`ED_operatortypes_grease_pencil_*` functions.
2023-06-19 17:45:21 +02:00
Falk David
171de8b5a7 Cleanup: Remove ED_grease_pencil_draw.h
This is no longer needed. The function can be moved to
`ED_grease_pencil.h`
2023-06-19 17:38:58 +02:00
Julian Eisel
9b246fc438 Merge branch 'blender-v3.6-release' 2023-06-19 16:40:10 +02:00
Julian Eisel
232e065a17 Fix #109053: File Append with recursions leads to crash
In this specific code path (recursive reading inside .blend files
containing assets), reading datablocks marked as asset would move
ownership over the asset metadata without indicating that in the source
that owned it previously. This would cause a double free attempt.
2023-06-19 16:39:37 +02:00
Brecht Van Lommel
4b4c95c402 Fix compositor node previews flickering when dragging sliders
Compositing jobs would get cancelled as you drag number sliders, and
would write back empty previews. Only sync previews for completed jobs.
2023-06-19 16:27:08 +02:00
Falk David
a6503f1dc9 Cleanup: Moving selection domain getter for GP
It was a bit odd having `ED_view3d_grease_pencil_selection_domain_get`
in the `ED_view3d.h` header.
Moving it to `ED_grease_pencil.h` makes more sense.
2023-06-19 16:22:48 +02:00
Sietse Brouwer
3432fc0b87 GPv3: Domain support for selection operators
This patch adds support for two of the three selection domains in the Edit Mode tool settings: point and stroke.

Affected selection operators: select all, lasso select, select pick, box select.

Pull Request: https://projects.blender.org/blender/blender/pulls/108970
2023-06-19 16:12:11 +02:00
Hans Goudey
c2db655d5e Merge branch 'blender-v3.6-release' 2023-06-19 09:55:12 -04:00
Sietse Brouwer
f758c4a6b1 Fix #108935: Auto-Normalize glitches in GPencil weight painting
There where glitches while weight painting in Grease Pencil with
auto-normalize enabled. This resulted in incorrect weights on vertices.
And sometimes a vertex group not deformed by bones was also affected
by auto-normalize (which should never happen).

This was due to:
- An erroneous line in the auto-normalize function which led to an
index out of bounds (and screwing up the vertex weights).
- An edge case where the active vertex group was de facto the only
group to be normalized.

Also in this patch:
- Removal of unreachable code
- Better names for the auto-normalize functions

Pull Request: https://projects.blender.org/blender/blender/pulls/109036
2023-06-19 15:49:57 +02:00
Jeroen Bakker
966afa70c7 Cleanup make format 2023-06-19 15:47:18 +02:00
Hans Goudey
30bf4c0945 Fix: Creating sharp_face attribute skipped with smooth set
There is an optimization to avoid creating the attribute if we only
set faces smooth. But since "use_smooth" and "sharp_face" are
inverted, the check for that case needs to be invertex compared
to other similar attribute setters.
2023-06-19 09:46:07 -04:00
Sybren A. Stüvel
8179a0da84 Animation: make FOREACH_PCHAN_SELECTED_IN_OBJECT_BEGIN C++ compatible
Add an explicit cast from `void *` to `bPoseChannel *` so that the macro
can be used in C++ code as well.
2023-06-19 15:21:40 +02:00
Lukas Tönne
550c61d34f Fix: Added missing header include for STRNCPY.
Test compile broken by 8bcad285de
2023-06-19 14:25:26 +02:00
Campbell Barton
8bcad285de Cleanup: remove strcpy usage 2023-06-19 20:40:49 +10:00
Harley Acheson
4a3b6bfeac UI: Show wait icon for file/asset browser previews while loading
Show File & Asset Browser items that are in progress with a "waiting"
icon. Reduces flickering and improves feedback for failed thumbnails.

Pull Request: https://projects.blender.org/blender/blender/pulls/108486
2023-06-19 12:24:44 +02:00
lolloz98
fb81740adc GPv3: Select random operator
Adds a "Select random" operator for the new Grease Pencil data type.

Resolves: #108933

Pull Request: https://projects.blender.org/blender/blender/pulls/109009
2023-06-19 12:14:52 +02:00
Sergey Sharybin
5881f6cc2a Fix compilation error with MSVC
Pull Request: https://projects.blender.org/blender/blender/pulls/109118
2023-06-19 10:32:26 +02:00
Campbell Barton
aef8381bf5 Merge branch 'blender-v3.6-release' 2023-06-19 12:40:37 +10:00
Campbell Barton
a6a32a8279 Quiet compiler warning from b68b66d29e 2023-06-19 12:36:18 +10:00
Campbell Barton
b68b66d29e Fix buffer overflow in AVI file writing
`strcpy` could overflow the destination buffer by 768 bytes,
use FILE_MAX for the filepath buffer size.

Also include the size in the functions signature to avoid similar
errors in the future.
2023-06-19 12:32:25 +10:00
Campbell Barton
cf29e011be Cleanup: remove all strcpy calls in source/blender/editors/
Replace with STRNCPY or BLI_strncpy, while many cases were safe,
translated source strings could cause buffer overflows, see: #108917.
2023-06-19 11:58:33 +10:00
Campbell Barton
fde76c8b4d Cleanup: prefer the term 'len' over 'size' for storing string lengths
The Python API uses the term size for string lengths for
PyUnicode_AsUTF8AndSize and related API's, causing Blender's return
arguments to use the term `size` too in some cases.

This is error prone since Blender includes space from the the null byte
when the term size is used (by convention).
2023-06-19 10:21:59 +10:00
Campbell Barton
0bcc52cf6c Cleanup: clarify variable naming for an_stringdec 2023-06-19 09:54:09 +10:00
Campbell Barton
137c656309 Merge branch 'blender-v3.6-release' 2023-06-19 09:48:15 +10:00
Campbell Barton
e1f7757a39 Merge branch 'blender-v3.6-release' 2023-06-19 09:43:12 +10:00
Campbell Barton
78f5d9d599 Fix buffer overflow in an_stringdec (ANIM_SEQUENCE type loading)
`strcpy` could overflow the destination buffer by 768 bytes.
Match the source/destination buffer sizes & use BLI_strncpy.
2023-06-19 09:41:11 +10:00
Campbell Barton
25aa510adb Fix potential buffer overflow in BLI_path_sequence_decode
Clamp the by the buffer destination size.
2023-06-19 09:39:27 +10:00
Philipp Oeser
cc5f666672 Merge branch 'blender-v3.6-release' 2023-06-18 12:23:56 +02:00
Philipp Oeser
9bba52debd Fix #108049: Nodes pasting can leave multiple active nodes
Clear active flag on pasted nodes (this is in line with how objects are
pasted).

Pull Request: https://projects.blender.org/blender/blender/pulls/108535
2023-06-18 12:22:15 +02:00
Hans Goudey
0b71a1f054 Cleanup: Move UI RNA files to C++
See #103343

Pull Request: https://projects.blender.org/blender/blender/pulls/109090
2023-06-18 01:39:21 +02:00
Iliya Katueshenock
4e7ee5d9ac Fix #108141: Group Insert operator creates invalid links
Just avoid creating links to outside the group. The original
version worked a little more accurately. But still she was just
making up links (because the inline version of the graph wasn't the same anyway).
For now, this is just a workaround to work around the
problem in the new behavior caused by fa3ca9afdb .

Pull Request: https://projects.blender.org/blender/blender/pulls/108332
2023-06-16 20:24:31 +02:00
Hans Goudey
a53eb4a560 Merge branch 'blender-v3.6-release' 2023-06-16 14:00:24 -04:00
Hans Goudey
a6931db38b Fix: Build error without OpenEXR
See d5781c2a61
2023-06-16 13:59:35 -04:00
Hans Goudey
3550eb3d46 Merge branch 'blender-v3.6-release' 2023-06-16 13:39:00 -04:00
Hans Goudey
17aaff69c6 Fix #109043: Mask modifier smooth option broken
Caused by two mistakes in 16fbadde36.
Fix the naming too, which was confusing and
non-standard before.
2023-06-16 13:38:00 -04:00
Brecht Van Lommel
7fe735ac99 Merge branch 'blender-v3.6-release' into main 2023-06-16 18:57:26 +02:00
Brecht Van Lommel
d5781c2a61 Fix #109048: RenderLayer.load_from_file does not support multilayer EXR
This was never implemented, only for the entire RenderResult.
2023-06-16 18:53:08 +02:00
Brecht Van Lommel
770616446b Fix #108966: multires UDIM bake progress bar exceeds 100% 2023-06-16 18:42:48 +02:00
Jacques Lucke
b3641dae16 Cleanup: deduplicate remap node pairing function
It's a bit unfortunate that the `node_map` in both cases has different
constness, so a conversion or `reinterpret_cast` is necessary. For now
a new temporary map is created as this is less error prone. That's not
ideal but better than the duplication from before.
2023-06-16 17:03:55 +02:00
Jeroen Bakker
579a9d2e1f Cleanup: Rename RNA Userdef DPI Update function
Function is also used to force a redraw for options that don't change the
dpi. Has been renamed to `rna_userdef_gpu_update`.

Pull Request: https://projects.blender.org/blender/blender/pulls/108881
2023-06-16 15:23:49 +02:00