Commit Graph

117289 Commits

Author SHA1 Message Date
Sean Kim
e4b56c3765 Fix #125785: Mesh Filter sharpen mode has no effect
`add_v3_v3v3(disp, disp_avg, disp_sharpen);` was accidentially changed
to `disp = disp_avg * disp_sharpen;`

Pull Request: https://projects.blender.org/blender/blender/pulls/125794
2024-08-02 01:38:40 +02:00
Harley Acheson
97fc0d2716 Refactor: Change Name of ed_workspace_status_mouse_item
Rename ed_workspace_status_mouse_item to ed_workspace_status_icon_item
as this is not specific to mouse icons. Just a brain-fart because this
function has specific handling of mouse icons because of spacing
issues.

Pull Request: https://projects.blender.org/blender/blender/pulls/125790
2024-08-01 22:42:25 +02:00
Harley Acheson
48d55fb420 UI: Always Show Version Patch Level
PR #125332 made changes to the format of the version string displayed
on the title bar and in status bar. These changes included not showing
the patch level if zero.  Unfortunately this also changes the version
as displayed on the command-line with "--version".  This particular
change was approved quite hastily so this PR just reverses that, always
shows zero patch level and therefore shows the command-line version as
before.  If we want to hide patch zero we can debate this specifically
later.

Pull Request: https://projects.blender.org/blender/blender/pulls/125788
2024-08-01 21:57:31 +02:00
Harley Acheson
885824540a UI: Increase Size of Curve Control Points
Curve control points are shown quite small regardless of UI scale and
local zooming. This PR increases the minimum, regular, and maximum
sizes so that they are easier to see in all circumstances.

Pull Request: https://projects.blender.org/blender/blender/pulls/125786
2024-08-01 20:51:42 +02:00
Hans Goudey
d282b1735e Sculpt: Remove color buffer from sculpt BVH tree
Part of #118145.
Instead of storing a separately allocated array for each BVH node
for the temporary "color buffer" colors meant for mixing during a
stroke, just store an array the size of the whole mesh. Though this
is wasteful in terms of memory usage, plenty of other brushes store
mesh-sized arrays already, and it should make more sense as BVH
nodes get smaller too. After this commit, the BVH tree has no
specific code for color attributes anymore.
2024-08-01 13:58:50 -04:00
Harley Acheson
90e7331d10 Fix #125558: Show UI_BTYPE_CURVE Control Points
The curve control points are almost invisible because it is missing a
call to GPU_program_point_size, which allows the setting of dot size
in the shader.

Pull Request: https://projects.blender.org/blender/blender/pulls/125744
2024-08-01 19:56:32 +02:00
Hans Goudey
a0a70bf46d Refactor: Sculpt: Simplify cloth brush persistent base retrieval
Pass a single span for both cloth brush init positions and the persistent
base array instead of switching between the two every time. Also only
retrieve the persistent base for base mesh sculpting since AFAIK that's
the only situation where it works properly anyway.
2024-08-01 13:09:12 -04:00
Hans Goudey
606e880d29 Refactor: Sculpt: Specialize cloth constraints creation per PBVH type
Use the same method for sharing code as elsewhere in the cloth brush:
translate the SubdivCCG and BMesh data structures to the equivalent
vertex indices used by meshes. This commit has to add some more code
for that because we only want to process visible vertices and there are
no factors being used for the typical filtering method used by brushes.
2024-08-01 13:09:12 -04:00
Hans Goudey
0fdd251826 Cleanup: Sculpt: Remove unused fields from cloth sim struct 2024-08-01 13:09:11 -04:00
Hans Goudey
b62fe77604 Cleanup: Sculpt: Reorder cloth constraints function 2024-08-01 13:09:11 -04:00
Miguel Pozo
644e7bf309 Fix #125185: Weight Paint Overlay doesn't work with EEVEE-Next
Use less or equal depth comparison for EEVEE and Overlay, since their
depths no longer match.
The main disadvantage of this approach is that material masked
transparency won't work anymore with overlays, so there's still another
(arguably not as bad) regression.

Pull Request: https://projects.blender.org/blender/blender/pulls/125722
2024-08-01 17:40:53 +02:00
Hans Goudey
387cc06c12 Sculpt: Use new API for weight/vertex paint factors
Part of #118145.
For computation of factors, use the new API functions that handle
more than one vertex at a time.
2024-08-01 10:53:35 -04:00
Hans Goudey
eb132fe792 Sculpt: Data oriented refactor for cloth filter force calculation
Part of #118145.
2024-08-01 10:53:35 -04:00
Bastien Montagne
a6a0eae3e2 Cleanup: Remove unused & deprecated BKE_copybuffer_copy_ and BKE_blendfile_write_partial_ APIs.
These have now been fully replaced by the `PartialWriteContext` API.
2024-08-01 16:17:59 +02:00
Bastien Montagne
10627e24b9 Refactor: make Outliner copy operator use the new PartialWriteContext API.
Removes the last usage of deprecated `BKE_blendfile_write_partial_` and its
`BKE_copybuffer_copy_` wrapper APIs.
2024-08-01 15:59:35 +02:00
Bastien Montagne
bc654d9dc5 Refactor: make View3D copy operator use the new PartialWriteContext API.
Removes one more usage of deprecated `BKE_blendfile_write_partial_` and its
`BKE_copybuffer_copy_` wrapper APIs.
2024-08-01 15:43:33 +02:00
Christoph Lendenfeld
06fab9f8f1 Fix #125542: Bone Stick selection color is not drawn
Caused by blender/blender@ef8f14f3d6

That commit removed too much code.  We still need the condition
for editbones and their selected tips.
The fix is to bring back that check and set the tail color accordingly.

Pull Request: https://projects.blender.org/blender/blender/pulls/125764
2024-08-01 14:42:11 +02:00
Christoph Lendenfeld
13ceb73941 Fix #124585: Assert when building keylist for dope sheet
The issue occurred when creating a keylist for an FCurve.
Keys outside the given range are ignored, but the call to `update_keyblocks`
still got the full range leading to the assertion.
The fix is to keep track of the index range for which bezt have been added
to the keycolumns. Note that we have to do that within the loop because
the FCurve might not be ordered (e.g. during transforms in the dope sheet)

Pull Request: https://projects.blender.org/blender/blender/pulls/125678
2024-08-01 14:04:29 +02:00
Jacques Lucke
6b9b958668 Fix #125291: crash when applying curves modifier when there is a bake
The crash was caused by attempting to write-back to the original data after it
has been removed (`add_data_block_items_writeback`).

This write-back is already disabled when applying a modifier, however the
corresponding flag was only set when applying modifiers on mesh objects. This
patch fixes this issue with two small changes:
* Rename `MOD_APPLY_TO_BASE_MESH` to `MOD_APPLY_TO_ORIGINAL` to make it more
  generic.
* Pass this flag into modifier evaluation for other geometry types besides
  meshes in `modifier_apply_obdata`.

Pull Request: https://projects.blender.org/blender/blender/pulls/125761
2024-08-01 13:36:43 +02:00
Bill Spitzak
984feb48fc Cleanup: Remove unused integer wrap_pixel method 2024-08-01 14:22:30 +03:00
Bill Spitzak
1479c9cde6 Cleanup: Use compositor read() for read_elem_bilinear()
This patch reuses the read method for the read_elem_bilinear method to
deduplicate code and also get the same fixes that were committed in
ef1d22aea5.
2024-08-01 14:20:50 +03:00
Bill Spitzak
ef1d22aea5 Fix #124842: Translation leaves empty pixels at edges
The Translate node leaves empty pixels at the boundary of the image.
This caused by incorrect clipping when sampling the pixels. To fix this,
we adjust COM_MemoryBuffer::read to read using Extend or Repeat using
BLI interpolation, then multiply that by a clipping rectangle. The
read_elem_sampled function is now defined in terms of the read method.

This also coincidentally fixes off by half a pixel error in nearest
neighbour interpolation.
2024-08-01 14:06:50 +03:00
Jacques Lucke
fe461903c1 Geometry Nodes: pass through in bake node if it is in a repeat zone
Bake nodes are not supported in a repeat zone. They used to just output
default values when used in a repeat zone, but now they just pass-through
the inputs like an unbaked bake node would.

This makes the behavior more like one would expect when using the same
node group in and outside of a repeat zone that happens to have a bake
node inside (which is not even used).
2024-08-01 12:39:08 +02:00
casey bianco-davis
c8404eb0c8 Fix: GPv3: Unable to select bezier handle with unselected control point
If one handle was selected and the control point was not,
the other point could not be selected even though it was visible.

This fixes the issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/125545
2024-08-01 12:16:08 +02:00
Jacques Lucke
1d37294d73 Fix #125504: crash when trying to create string socket in Capture Attribute node
String attributes are currently not supported in geometry nodes.
2024-08-01 11:38:52 +02:00
Jacques Lucke
add8e42bac Fix #125720: crash when showing simulated instances in spreadsheet 2024-08-01 11:33:05 +02:00
Jacques Lucke
0811cbbbc6 Fix #125758: deduplicate warnings shown in geometry nodes 2024-08-01 11:15:55 +02:00
Christoph Lendenfeld
a2b53f47dd Fix #125509: Reordering of channels doesn't work in Graph Editor
The reordering of channels didn't work in the following case:
* in the Graph Editor
* Channels outside of a FCurve group

The reason for that was that any channels outside a group get added to a temp group
(sorting somehow depends on groups) and that was missing the `AGRP_EXPANDED_G`
flag. The reason this was only broken in the Graph Editor was that this flag is only used
for the graph editor. The `EXPANDED_AGRP` macro has a special case for that
(used towards the end of `rearrange_action_channels`).

Pull Request: https://projects.blender.org/blender/blender/pulls/125673
2024-08-01 10:55:49 +02:00
Hans Goudey
c502368141 Cleanup: Sculpt: Avoid PBVHVertRef for accessing cloth positions 2024-07-31 23:55:54 -04:00
Hans Goudey
8be1d8cfd3 Refactor: Sculpt: Reduce scope of cloth length constraints set
Also avoid a double lookup when adding constraints.
2024-07-31 23:45:33 -04:00
Hans Goudey
8164565956 Sculpt: Data oriented refactor for cloth brush deformation
Part of #118145.
Since there are so many contiguous arrays used in the cloth brush,
this uses a different method for sharing code between the three
geometry types. For multires and BMesh, a per-node array of
vertex indices is created for the simulation calculation. Then the
results of the simulation are similarly transferred to the geometry.
2024-07-31 22:00:06 -04:00
Hans Goudey
f3b97a8fd8 Refactor: Sculpt: Skip inactive nodes in simulation loop
This should result in more even work distribution between threads.
Without this a thread might encounter just disabled nodes. Though
I'm not sure there will be real-world impacts to this change.
2024-07-31 22:00:06 -04:00
Hans Goudey
7856cb2827 Cleanup: Sculpt: Remove duplicate assignment 2024-07-31 22:00:06 -04:00
Hans Goudey
66ec57978f Refactor: Sculpt: Remove cloth distance calculation out of constraint loop
The constraint loop is single threaded, so any computation we can move
elsewhere should improve performance. This also establishes a falloff
calculation function that does more than one value at a time.
2024-07-31 22:00:06 -04:00
Sean Kim
73aeb33843 Refactor: Sculpt: Split initialization by pbvh type for boundary brush
Pull Request: https://projects.blender.org/blender/blender/pulls/125745
2024-08-01 02:57:55 +02:00
Sean Kim
653b273d2e Fix: Boundary brush bend deformation uses wrong normals
Introduced with 4b9f286af0

Pull Request: https://projects.blender.org/blender/blender/pulls/125741
2024-08-01 02:09:06 +02:00
Harley Acheson
bfa36039c2 UI: Add Periods to RNA multi-sentence descriptions
We are now wanting tooltip descriptions to not include a terminal
period unless they are multi-sentence (so internally containing a
period). #125460 removed the automatic addition of the terminal period,
but now we have to manually add them back where needed. This PR removes
the error message shown if these items end in period, and then adds one
for all RNA descriptions that are multi-sentence.

Pull Request: https://projects.blender.org/blender/blender/pulls/125507
2024-08-01 00:55:02 +02:00
Harley Acheson
7374077610 UI: Adding LTS to Title Bar and other Version Changes
This tries to keep to the spirit of task of #124511. Title bar shows
a more detailed version string, while status bar shows more compactly.
"LTS" is included in the long form when defined. Patch version shown
in both detailed and long form but only if non-zero. "Alpha", "Beta",
"Release Candidate" included in long form, but uses " a", " b", " RC"
for short form.

Pull Request: https://projects.blender.org/blender/blender/pulls/125332
2024-08-01 00:06:18 +02:00
Sean Kim
a78e56d465 Cleanup: Add const, use vector classes for helper method
Pull Request: https://projects.blender.org/blender/blender/pulls/125735
2024-07-31 23:55:29 +02:00
Sean Kim
e593198190 Refactor: Sculpt: Flatten array of structs into struct of arrays
Converts the SculptBoundary from containing an array of
SculptBoundaryEditInfo structs into holding a single struct that has
similarly sized arrays.

Pull Request: https://projects.blender.org/blender/blender/pulls/125734
2024-07-31 23:09:22 +02:00
Harley Acheson
5642944e33 UI: Screen Operations Status Bar
Status bar showing screen area operations when hovering on editor edges
and action zones. Screen area operators (move edge, split, join, etc)
showing keymaps and info during operations.

Pull Request: https://projects.blender.org/blender/blender/pulls/125467
2024-07-31 22:11:37 +02:00
Hans Goudey
fcfcdef360 Sculpt: Data oriented refactor for mask filter
Part of #118145.

This PR adds a lot of new code, but the implementations are the
same for the three geometry types, and all of the new code is
fairly straightforward. This also fixes an issue where the filter
didn't work properly for multires in main because of missing
propagation across grid boundaries.

Pull Request: https://projects.blender.org/blender/blender/pulls/125639
2024-07-31 21:16:09 +02:00
Harley Acheson
989fcc2c4f UI: Mouse Event Icon Alignment
We have a number of event icons, used on the Status Bar, to indicate
mouse actions. It is currently difficult to align these nicely because
they vary in width and design. This PR makes them all the same design
width and aligned to the left edge. This removes a need to add negative
spacing before any of them and only requires space after some of them.
This also adds a new one to indicate "double left click" as my current
use of this looks a bit sus. This also adds a "mouse wheel scroll"

Pull Request: https://projects.blender.org/blender/blender/pulls/125731
2024-07-31 20:57:19 +02:00
Hans Goudey
1d841806b5 Refactor: Sculpt: Move factor calculation out of cloth constraints loop
Part of #118145.
This loop is single threaded so the more we can remove from it the better.
The new code uses the regular original positions data rather than the
cloth sim's `init_pos` because they should be the same anyway, the
cloth sim is initialized right after undo nodes are pushed in both cases.
2024-07-31 14:36:44 -04:00
Hans Goudey
bc1c63d11a Cleanup: Sculpt: Use C++ math types for cloth collision 2024-07-31 14:36:44 -04:00
Hans Goudey
fc9da9e565 Cleanup: Sculpt: Use Vector for cloth collider cache list 2024-07-31 14:36:44 -04:00
Hans Goudey
30542df576 Refactor: Sculpt: Avoid matrix invert for every vertex in cloth brush 2024-07-31 14:36:44 -04:00
Hans Goudey
e15c839a15 Refactor: Sculpt: Remove unnecessary array initialization for cloth brush 2024-07-31 14:36:44 -04:00
Hans Goudey
c06e2ccde7 Cleanup: Sculpt: Use C++ vector types for cloth simulation 2024-07-31 14:36:44 -04:00
Hans Goudey
7bdd246352 Cleanup: Sculpt: Use C++ Map for cloth brush node state index 2024-07-31 14:36:44 -04:00