Commit Graph

113067 Commits

Author SHA1 Message Date
Campbell Barton
bf7c52cfd5 Fix error in stereo3d side-by-side display
Regression in [0] for side-by-side & top-bottom display.

[0]: e01cadd657
2024-09-16 11:38:56 +10:00
Sean Kim
5c38eb0d81 Refactor: Sculpt: Add face set offset parameter for BMesh functions
Part of #118145.

Even though BMesh face set functionality does not currently work, there
are some reasonable assumptions we can make about the needed parameters
for some APIs.

This commit changes the signature for relevant unique face set functions
so that future changes are easier when / if face sets are fully
supported within BMesh.

Pull Request: https://projects.blender.org/blender/blender/pulls/127640
2024-09-15 23:24:13 +02:00
Harley Acheson
2278f8eb1b UI: Small Corrections to Text Caret Placement
This PR has very slight corrections to text cursor placement in input
widgets. The most important is a check for the situation where the
right edge of the current character can be greater than the left edge
of the next character. This can happen for some thin characters before
a space. Otherwise the code assumes RTL direction and gives an
incorrect placement. This also slightly tightens the position when at
the start of string, just after a space, or at end of the string.

Pull Request: https://projects.blender.org/blender/blender/pulls/127662
2024-09-15 21:43:49 +02:00
Jacques Lucke
13d30e22a1 Fix: modifier execution time not set for grease pencil modifiers 2024-09-15 18:02:51 +02:00
Jacques Lucke
f2e557725d Fix: Geometry Nodes: crash when using gizmo after changing area type 2024-09-15 17:46:32 +02:00
Campbell Barton
10e8f2f889 Cleanup: various non-functional changes 2024-09-15 23:22:22 +10:00
Campbell Barton
8b2ab34ec6 Cleanup: avoid redundant copy to access the filename 2024-09-15 23:14:13 +10:00
Campbell Barton
a42611be92 Cleanup: remove redundant checks 2024-09-15 23:14:11 +10:00
Campbell Barton
17f809718a Cleanup: avoid shadowing variables 2024-09-15 23:14:10 +10:00
Campbell Barton
9b39b4c91c Cleanup: use const pointers/references 2024-09-15 23:14:09 +10:00
Campbell Barton
1104e4233d Cleanup: pass string by const reference 2024-09-15 23:14:08 +10:00
Campbell Barton
9be29e1bbc Cleanup: match function & declaration names 2024-09-15 23:14:07 +10:00
Campbell Barton
1d21c98fc8 Cleanup: quiet dangling-reference GCC warning 2024-09-15 23:14:05 +10:00
Campbell Barton
0d9c4bc5b3 BKE_lib: avoid potential read uninitialized memory in BKE_id_copy_*
BKE_id_copy_in_lib took an argument `r_newid` which was was to
initialize `new_id` in the functions body.

While this may not have caused any user visible bugs, it's error prone,
one caller even passed in an uninitialized pointer.

- Rename `r_newid` to `new_id_p` since it's not a return argument.
- Initialize the value from all callers.
2024-09-15 23:07:17 +10:00
Campbell Barton
085da6a08a Fix error in font scale rounding for the animation player 2024-09-15 23:07:16 +10:00
Campbell Barton
630eff9b5e Fix fake_retiming_key_init returning uninitialized stack memory
The SeqRetimingKey returned from fake_retiming_key_init left
original_strip_frame_index & retiming_factor uninitialized.
2024-09-15 23:07:15 +10:00
Jacques Lucke
35bb4f4711 Geometry Nodes: support accessing repeat zone lazy-function graph from Python
The tricky thing here is that this graph is only generated while geometry nodes
is evaluated and is generally only stored temporarily. To make it accessible via
Python, the accessor method will cause a reevaluation specifically to log the
generated graph.
2024-09-15 00:56:53 +02:00
Sean Kim
c8ff7f41a1 Fix: Invalid default value for vert_face_set_get with empty Span
The default value is expected to be 0, not INT_MIN

Pull Request: https://projects.blender.org/blender/blender/pulls/127628
2024-09-14 21:16:07 +02:00
Hans Goudey
c6ce6dbe01 BLI: Add IndexMask set_bits function
This is like "to_bits" but doesn't clear the bit span first.

Pull Request: https://projects.blender.org/blender/blender/pulls/127625
2024-09-14 21:09:41 +02:00
Kevin C. Burke
5475040906 Fix: Spelling mistake in Grease Pencil API docs
Fix: Spelling mistake in Grease Pencil API docs

https://projects.blender.org/blender/blender-manual/issues/104920

Pull Request: https://projects.blender.org/blender/blender/pulls/127597
2024-09-14 20:18:30 +02:00
Hans Goudey
c5ccc8ceea Fix #127602: Sculpt multires drawing crash with material index attribute
The evaluated mesh is empty since its data is replaced with the SubdivCCG.
2024-09-14 13:23:38 -04:00
Hans Goudey
2946a840ad Fix: Sculpt: Avoid nested threading in undo node push
This can run into problems with missing task isolation
when thread local variables are used in iteration over nodes.
It's likely to just add overhead anyway; there should be enough
parallelism coming from the number of nodes anyway.
2024-09-14 13:01:42 -04:00
Hans Goudey
7283cbef65 Cleanup: Sculpt: Add todo comments for PBVH data to remove 2024-09-14 13:01:42 -04:00
Hans Goudey
a021dd36ef Cleanup: Sculpt: Remove unnecessary PBVH node flags
These have been made redundant by previous commits.
Part of #118145.
2024-09-14 13:01:42 -04:00
Hans Goudey
0499e061d0 Cleanup: Sculpt: Remove drawing update tests
Updating attributes is now done specifically for each attribute,
and topology and visibility updates tag the draw cache data
explicitly too. That makes checking for updates with these
tags unnecessary.
2024-09-14 13:01:42 -04:00
Hans Goudey
0b4820b563 Cleanup: Sculpt: Deduplicate node visibility update on build 2024-09-14 13:01:42 -04:00
Hans Goudey
b77ff173b0 Refactor: Sculpt: Use bit vector for visibility update tags
Also refactor topology update tags, which are used quite similarly
(they mean the same for the drawing code, except for BMesh).

Part of #118145.
2024-09-14 13:01:42 -04:00
Hans Goudey
65c2e5abde Cleanup: Sculpt: Remove unused PBVH redraw tag function 2024-09-14 13:01:42 -04:00
Hans Goudey
76c322047e Sculpt: Only re-upload mask attribute data
Similar to the previous commits, previously all GPU buffers
were recreated when only masks changed. Now only
that masks are re-uploaded, using the same mechanism.

Part of #118145.
2024-09-14 13:01:42 -04:00
Hans Goudey
30c1475dfd Sculpt: Update node mask status eagerly
Similar to 7b69c82494.
We didn't make any good use of the time in between changing
mask values and recalculating whether nodes were fully masked
or not masked at all. There was no point in the lazy calculation.
Eager calculation should be faster too, for the same reason as
the above commit.

Part of #118145.
2024-09-14 13:01:42 -04:00
Hans Goudey
d24e8029d2 Sculpt: Only re-upload face color attribute data
Similar to the previous commit, previously all GPU buffers
were recreated when only a color attribute changed. Now only
that attribute is re-uploaded, using the same mechanism.

Part of #118145.
2024-09-14 13:01:42 -04:00
Hans Goudey
60ab232afb Sculpt: Only re-upload face set data when changed
Similar to the previous commit, previously all GPU buffers
were recreated when only face sets changed. Now only face
sets are re-uploaded, using the same mechanism.

Part of #118145.
2024-09-14 13:01:42 -04:00
Hans Goudey
0c677e9494 Sculpt: Only change position draw buffers on PBVH deformation
Previously tagging node positions dirty set the `PBVH_UpdateDrawBuffers`
flag which was then used by `node_draw_update_mask` and
`tag_all_attributes_dirty`, which, as hinted by the name, causes a refresh
of all the PBVH GPU vertex buffers, not just positions and normals.

Instead of using that flag, add a function to the draw cache to tag only
position-related data dirty. This should give a performance improvement
when there are also face sets, masks, and/or generic attributes being
extracted for drawing.

Part of $118145.
2024-09-14 13:01:42 -04:00
Hans Goudey
900184ac4b Sculpt: Use separate bit vector for BVH node normals dirty tags
Similar to 7b69c82494.
Part of #118145.
2024-09-14 13:01:42 -04:00
Hans Goudey
afa1a6bebf Fix: Data race writing to bitmap in PBVH draw
Mistake in d601bf7e3d.
A bit vector can't be written to in parallel.
2024-09-14 13:01:42 -04:00
Hans Goudey
5b03fee0d2 Sculpt: Use bit vector for bounds dirty tags
Reduce the amount of memory used for the tags by 8x
and improve the performance of changed nodes IndexMask
creation.

Part of #118145.
2024-09-14 13:01:41 -04:00
Laurynas Duburas
34f9b7e36c Overlay-Next: grid added to ShapeCache
Substitute for `DRW_cache_grid_get()` added to `overlay::ShapeCache`.

Pull Request: https://projects.blender.org/blender/blender/pulls/127594
2024-09-14 18:22:17 +02:00
Jacques Lucke
2274d6a4b1 Fix: subversion bump because updated Python API in previous commit
This changed the API: 54a13d462f
2024-09-14 17:28:36 +02:00
Jacques Lucke
54a13d462f Debug: support getting dot graphs from Python
This allows building tools that simplify Blender core development.

The depsgraph already exposed the dot graph using the `debug_relations_graphviz`
method. This has been extended to return the data as a string. The filepath is
optional now.

Similar functions have been added for node trees. Note that these should be used
on evaluated node trees.
2024-09-14 17:10:33 +02:00
Clément FOUCAULT
fc5d3fb998 Overlay-Next: Use unique handle per object
Add a new function to the draw manager to only
issue a unique resource ID per `ObjectRef`.
This avoids the memory overhead of duplicating
the handle for each overlay.

The handle is stored inside the `ObjectRef` on
first query.

Rel #102179
2024-09-14 12:43:39 +02:00
Laurynas Duburas
713ca95121 Fix: Overlay-Next: Grid2D tiles background and boundaries
Fixes Grid2D tiles background and boundaries drawing.

To reproduce  switch to mesh edit mode and in UV editing view overlay
options set `Tiles X` or `Y` to more than 1.

Pull Request: https://projects.blender.org/blender/blender/pulls/127516
2024-09-14 11:14:03 +02:00
Campbell Barton
8a29277ca8 Logging: replace print with logging if an animation fails to load
Also remove noisy print when a thumbnail can't be generated from an
animation. Similar prints have been commented and mainly seem useful
for debugging.
2024-09-14 15:26:12 +10:00
Campbell Barton
7e2785927c PlayAnim: don't set the title to the filename on WIN32
On MS-Windows the current frames file set the window title.

Remove this because it's strange to have the title flickering over
each name and the animation player already supports showing the filename
inside the window.
2024-09-14 15:26:11 +10:00
Campbell Barton
a8458534e8 Cleanup: use references in wm_playanim, int2 for window/image sizes 2024-09-14 15:06:10 +10:00
Campbell Barton
9d47d5f8a3 Fix crash scrubbing in the animation player with 1 frame loaded
Regression in caused an integer division by zero.

[0]: e6933e526c
2024-09-14 12:36:14 +10:00
Campbell Barton
95d29c9464 Cleanup: remove redundant null check & unused variable 2024-09-14 12:36:12 +10:00
Campbell Barton
30bbd1583f Cleanup: replace the term "folder" with "directory" for CMake files
This was already more common an in keeping with cmake's own naming.
2024-09-14 12:35:02 +10:00
Campbell Barton
6a1bd2ff40 Cleanup: use C++ comments for disabled code 2024-09-14 12:35:00 +10:00
Harley Acheson
019d987072 UI: Increase Width of ID Search Lists
As discussed in our UI Module meeting, this PR increases the width of
ID Search lists by 40%.

Pull Request: https://projects.blender.org/blender/blender/pulls/127599
2024-09-14 03:20:09 +02:00
Harley Acheson
a5779347b6 Fix #127438: Block Drag Cursor Issues
Avoid setting default cursor while number dragging. But always reset
cursor in title area if even there is a button in that space. Decrease
the title height slightly to work with title-less popups.

Pull Request: https://projects.blender.org/blender/blender/pulls/127598
2024-09-14 00:07:42 +02:00