Commit Graph

150077 Commits

Author SHA1 Message Date
Campbell Barton
6c82c039db Fix missing error check for fork() failing 2024-08-22 17:08:20 +10:00
Alaska
7c3dcb114f Issue template: Use bug label for Python API reports
Use the `Type/Bug` label by default for Python API docs since
the `Type/Report` label has been archieved.

Pull Request: https://projects.blender.org/blender/blender/pulls/126620
2024-08-22 04:28:52 +02:00
Harley Acheson
ae3bf84f35 UI: Docking Interactive Resizing
This is a change to the docking process so that the target area SIZE
can be specified at the same time as selecting the location. This also
changes to a drag-and-drop style of mouse pointer indication.

Pull Request: https://projects.blender.org/blender/blender/pulls/126447
2024-08-22 02:38:46 +02:00
Hans Goudey
df0564f3b8 Refactor: Sculpt: Remove dynamic topology edge length from BVH tree
Part of #118145.
The maximum and minumum edge length were stored in the BVH tree.
That's unnecessary since the source of truth is elsewhere and the values
are only used during remeshing operations.

Pull Request: https://projects.blender.org/blender/blender/pulls/126571
2024-08-21 23:52:23 +02:00
Harley Acheson
9bbe669cad Fix #126612: Area Join Exec Tag Source for Redraw
Non-interactive join - area_join_exec - needs to tag the source area
for redraw. Otherwise Outliner can attempt a partial redraw when a full
is needed, triggering an assert.

Pull Request: https://projects.blender.org/blender/blender/pulls/126615
2024-08-21 23:39:11 +02:00
Iliya Katueshenock
93546768ba Fix #126595: Group ID in Fill Curve Evaluate inconsistantly
Fix typo from 90de0368cd.
The wrong field-specifier of the socket was used.

Pull Request: https://projects.blender.org/blender/blender/pulls/126611
2024-08-21 23:31:24 +02:00
Ray Molenkamp
4f084d180b windows_x64: rebuild ffmpeg with sse flags
See PR #126396 for details.
2024-08-21 14:19:20 -06:00
Jesse Yurkovich
ce82d4434f Fix #126324: Fallback to linear POLY curves for invalid Alembic data
Provide an appropriate fallback during Import of some incorrect Alembic
curve data and write out valid data during our Export as well.

The buggy file in question has 2 problems:
- The curve data is marked as being `kVariableOrder` but provides no
  actual `order` data. This is invalid according to Alembic code [1]
- The curve data is also marked as being `kBezierBasis` but the actual
  values are most likely not bezier judging from how many elements are
  in each curve array

This PR focuses on the first problem and allows the file to load
"correctly" - or at least as correctly as it did prior to Blender 4.2.
If we encounter such a file, we will fallback to interpreting the data
as linear POLY curves. It also ensures that we only use `kVariableOrder`
when needed during Export.

[1] 23f1c76d7c/lib/Alembic/AbcGeom/ICurves.h (L91)

Pull Request: https://projects.blender.org/blender/blender/pulls/126378
2024-08-21 18:57:09 +02:00
Bastien Montagne
de47fee2e1 Fix #126156: Do not allow to assign embedded IDs to IDProperties.
This is just not supported, and typically not doable from Blender UI
(since embedded IDs won't be listed in ID template list).

Add asserts to IDProp code itself, and checks & error reports in
relevant BPY and RNA setters.
2024-08-21 18:19:06 +02:00
Campbell Barton
08d5eb8f9c Cleanup: cmake formatting 2024-08-21 23:20:34 +10:00
Campbell Barton
83fe5712ab Fix #126525: Gizmo flickering when a Blender window is resized 2024-08-21 23:03:31 +10:00
Anthony Roberts
b4c9986447 Windows: Enable external manifest by default on ARM64
This also fixes tests not having external manifests when the option is enabled, and properly detects clang-cl in the libdir setup.

Pull Request: https://projects.blender.org/blender/blender/pulls/126563
2024-08-21 15:01:04 +02:00
Jeroen Bakker
d7a6ab6f04 Fix #124364: BPY improve description template_list.list_id
Add some hints when the property is needed.
Use similar text as `template_asset_view` widget.

Pull Request: https://projects.blender.org/blender/blender/pulls/126569
2024-08-21 14:33:12 +02:00
Hans Goudey
11524775c7 Cleanup: Pass BVH nodes by reference 2024-08-21 08:10:56 -04:00
Lukas Tönne
2e9fc8ef2d GPv3: Segment selection support
Support segment mode in Grease Pencil v3 selection operators.
This is a continuation of #109221.

Segment selection works in multiple stages:
1. When enabled, the 2D evaluated lines for all visible curves are
entered into a BVH tree. This tree is used to find intersections later
on. All the visible drawings are in the tree, an `OffsetIndices` array
is used to record ranges of BVH elements for each drawing.
2. Primary selection functions get alternative versions that produce an
`IndexMask` instead of writing directly to selection attributes. This
makes it possible to detect select actions on points that are already
selected. Using a delta of selection attributes for this is not enough
to detect such user actions (and inefficient).
3. In segment mode the `IndexMask` is extended to fully cover segment
points (or exclude them when deselecting respectively). This first
performs and intersection test using the BVH tree, then finds all point
range with selected elements.
4. Finally the extended index mask is applied to selection attributes as
usual.

Pull Request: https://projects.blender.org/blender/blender/pulls/126027
2024-08-21 13:35:26 +02:00
Jonas Holzman
9b1d653554 Fix #126246: Missing Outliner redraw notifier when making datablock single user
Without a proper redraw, the outliner (in `Blender File` mode) would
only *partially* update on mouse hover, refreshing the user-count of
the old datablock without listing the newly added datablock.

Pull Request: https://projects.blender.org/blender/blender/pulls/126386
2024-08-21 13:10:35 +02:00
Julian Eisel
36c5606fc3 Fix #124622: Crash/assert on "Render Active Object"
The preview rendering would fall back to the shader preview rendering
pipeline, which is not suitable for objects. Instead, don't render any
preview (use an empty preview) for such object types. This case could be
handled a bit nicer by the code triggering the preview rendering (e.g.
the "Render Active Object" operator poll could return false), but
keeping that separate from fixing the lower level logic to ensure crash
free behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/126235
2024-08-21 11:54:50 +02:00
Bastien Montagne
6e143cbf75 Fix #126549: Forbid unlinking Scene main collection.
Looks like this use to 'work' because lower-level code would refuse to
delete an embedded scene collection, but the operator should not have
been active at all in the first place.

Fixed by adding a proper `poll` callback to the `collection unlink`
operator.
2024-08-21 11:48:03 +02:00
Campbell Barton
5a0e8317f4 Cleanup: use const vars/args 2024-08-21 19:19:38 +10:00
Omar Emara
844d6d2df0 Fix #126552: Crash on Render Layers node with no scene
Blender crashes when a Render Layers node is used with no scene in the
GPU compositor. This is fixed by a simple nullptr check.
2024-08-21 10:54:00 +03:00
Campbell Barton
bf529e248a Fix #124693: Wrong cursor after saving with multiple windows on Wayland
The last set cursor of any window was being used under Wayland.
Support for per-window cursor shapes to resolve the problem.
2024-08-21 17:29:55 +10:00
Jesse Yurkovich
d6ea01bd38 Fix #126551: Write Hex values using 2 digits in the color tooltips
We need to use 2 hex digits to ensure that the value displayed in the
tooltips is correct.

Pull Request: https://projects.blender.org/blender/blender/pulls/126580
2024-08-21 04:55:55 +02:00
Campbell Barton
ddcf5bac44 Revert "Fix image sequence detection to account for the number of digits"
This reverts commit 5c2d412a29.
because it caused a regression.

Resolve #124832.
2024-08-21 12:40:14 +10:00
Harley Acheson
6be90285bc Fix #126512: Icon Positioning When Icon Height Varies
Remove the subpixel positioning of icons. I just can't get this work
well in enough circumstances to make it worth the hassle it causes.

Pull Request: https://projects.blender.org/blender/blender/pulls/126579
2024-08-21 04:04:19 +02:00
Hans Goudey
ef0b163b49 Sculpt: Make BMesh BVH tree build similar to mesh/grids
Changes similar to f9c6fe30db.
- Calculate node bounds after building the tree.
- Calculate node visibility after building the tree.
- Avoid redundant normals recalculation. They are already calculated
  when first building the dynamic topology BMesh.
- Avoid clearing the default node flags.
2024-08-20 17:47:43 -04:00
Hans Goudey
65efd7f033 Fix: Dynamic topology mesh invisible after recent commit
Mistake in 7e0029fb65.
I assumed the BMesh and Mesh PBVH building process was
more similar than they really are.
2024-08-20 16:08:57 -04:00
Hans Goudey
7e0029fb65 Sculpt: Simplify BVH node flag initialization, avoid normals update
Use the default constructor of `Node` to set the default new flag value.
Remove the normals update flag which was added in f9c6fe30db.
This should avoid recalculating all the normals after just building the
BVH tree.
2024-08-20 15:41:56 -04:00
Hans Goudey
a2d8eec834 Cleanup: Reduce indentation in PBVH construction 2024-08-20 15:41:56 -04:00
Hans Goudey
726315deba Cleanup: Sculpt: Pass BVH building data as arguments
Rather than retrieving the data from the BVH. This opens up the
possibility that the BVH building produces a slightly different
data structure that's then converted to the final format in a
separate pass.
2024-08-20 15:41:56 -04:00
Sean Kim
4870ba5906 Cleanup: Isolate dyntopo detail size call
Setting the detail size is unnecessary when not using dyntopo sculpting.

Pull Request: https://projects.blender.org/blender/blender/pulls/126533
2024-08-20 21:29:18 +02:00
Sean Kim
858f91b2aa Cleanup: Use enum class and constexpr in sculpt_automask.cc
Pull Request: https://projects.blender.org/blender/blender/pulls/126111
2024-08-20 20:53:55 +02:00
Jeroen Bakker
1ba82ed139 Cleanup: Spelling 2024-08-20 20:32:48 +02:00
Hans Goudey
0277ad127a Cleanup: Reduce indentation in mesh separate operator 2024-08-20 13:41:57 -04:00
Hans Goudey
fa9aa5eab3 Cleanup: Remove unused variable 2024-08-20 13:39:27 -04:00
Hans Goudey
18a7aff3e2 Refactor: Sculpt: Simplify access to BVH nodes in undo code
Use the same method for retrieving "all nodes" that we do elsewhere.
Even though this requires a temporary vector, it makes it an easier
target for optimization later and makes the sculpt BVH iteration
easier to refactor in the meantime.
2024-08-20 13:34:06 -04:00
Hans Goudey
98308757cd Cleanup: Use C++ Stack for PBVH iteration 2024-08-20 13:34:06 -04:00
Hans Goudey
05bd28d123 Cleanup: Move PBVH iteration struct closer to use 2024-08-20 13:34:06 -04:00
Bastien Montagne
dcadb3301e 'Fix' crash in append code in invalid data cases (linked data using local data).
Issue found here at the studio in some production files using dirty
hacks. Ideally we could fully forbid such assignement in BPY/RNA API
too, but there is no 'proper' way to achieve this without this dirty
hack currenlty.

So instead, check for this case and print a nice error about it for now.
2024-08-20 18:22:30 +02:00
Jacques Lucke
41acd803e4 Fix: ConcurrentMap requires the value to be copy-constructible
It's not entirely clear why TBB requires this. I couldn't find this restriction
in their documentation yet. It is mentioned in a code comment in
`allocate_node_default_construct` in `tbb/concurrent_hash_map.h` though.
2024-08-20 17:47:27 +02:00
Amelie Fondevilla
625ef79f57 GPv3: Soft mode for the Eraser tool
Implementation of the soft mode of the eraser tool for GPv3.
In this mode, the eraser decreases the opacity of the points it hits.
If the opacity of a point falls below a threshold, then the point
is removed from the curves.

Pull Request: https://projects.blender.org/blender/blender/pulls/110310
2024-08-20 17:24:03 +02:00
Lukas Tönne
df028d588f Fix: Build error when pugixml and haru libraries are disabled
These libraries are used for grease pencil import/export. If both of
them are disabled the SVG import operator is still built but needs a
function that was hidden.

Pull Request: https://projects.blender.org/blender/blender/pulls/126555
2024-08-20 17:14:10 +02:00
Casey Bianco-Davis
92155db27a GPv3: Canvas overlay
This implements the "Canvas" overlay for GPv3.

Some things of note:
- The color and subdivision are hard coded for now
- The scale and offset have been removed for now

Pull Request: https://projects.blender.org/blender/blender/pulls/126248
2024-08-20 17:05:34 +02:00
Christoph Lendenfeld
db6113048d Fix #126129: Bake Action not working
With layered actions, the bake action wasn't working.
More specifically it failed to create a slot on the action
and link that slot on the animation data.

The fix is to create the slot.

Pull Request: https://projects.blender.org/blender/blender/pulls/126546
2024-08-20 16:45:34 +02:00
Jacques Lucke
24f7b7a8fb Cleanup: Nodes: reduce coupling between socket shape and field state
Previously, the inferencing result was only stored in the socket shape.
However, that was conflicting with experiments where the socket shape and
the field state was not related.
2024-08-20 16:15:59 +02:00
Jeroen Bakker
7f1812e335 Vulkan: Fix multi view layer selection
When using multi view only the first layer could be selected as the
rendering info only had a single layer in its main struct.
- Add failsafe for unsupported platforms
2024-08-20 16:02:32 +02:00
Jeroen Bakker
8acb2f363e Cleanup: Remove solved comment 2024-08-20 15:31:54 +02:00
Jeroen Bakker
2c6b1eb2e5 GPU: Fix static shader tests for NVIDIA
Skipping tests when workarounds are enabled due to GLSL restrictions in
the NVIDIA driver.
2024-08-20 14:52:35 +02:00
Jeroen Bakker
242271237a Vulkan: Ensure rendering ends when deleting attached framebuffer
When a frame buffer that is attached is being deleted the rendering end
event will never happen which leads to inconsistent render graphs.
2024-08-20 14:50:18 +02:00
Jeroen Bakker
df910f2417 GPU: Fix draw test on NVIDIA/OpenGL
Some workarounds cannot work on NVIDIA but are tested leading to
segfaults. Fixed by skipping in these cases.
2024-08-20 13:37:00 +02:00
Bastien Montagne
d6fa48c022 Fix #126507: GP conversion code was not updating link/append data.
Code executed in `BLO_read_do_version_after_setup` would not update in
any ways the info in link/append context data.

NOTE: this could potentially be extended to other code in this 'complex
do version' area. However, other versionning did not cause issues
apparently so far, so would rather until such changes are proven needed.
2024-08-20 12:51:47 +02:00