Commit Graph

120055 Commits

Author SHA1 Message Date
Sean Kim
6b7255b978 Refactor: Sculpt: Use return value instead of reference for orig_data
Pull Request: https://projects.blender.org/blender/blender/pulls/123755
2024-06-27 01:42:14 +02:00
Harley Acheson
eed83b56d2 UI: Calm Warnings With New Icons
Just calming warning with unused argument and
missing switch default.

Pull Request: https://projects.blender.org/blender/blender/pulls/123802
2024-06-27 01:35:45 +02:00
Sean Kim
9d4d1aea98 Sculpt: Add stroke stabilization to lasso tools
This PR adds stroke stabilization settings for the Sculpt mode lasso
tools:
* Mask
* Hide
* Trim
* Face Set

Only Sculpt tools have a user facing change, even though this was
implemented in `WM_gesture_lasso_modal` and related methods. Other
modes may choose to add these settings and toggles.

## Implementation
The implemented functionality is similar to the Annotate tool in both
interpolation of the new point and drawing the UI hint that
stabilization is happening.

The `radius` and `factor` properties have similar bounds as the same
Brush properties. All values are stored on a per-operator level, not on
a scene or otherwise global tool level.

Based off of [1].

[1] - https://blender.community/c/rightclickselect/ZWG5/

Pull Request: https://projects.blender.org/blender/blender/pulls/122062
2024-06-27 01:32:09 +02:00
Harley Acheson
8da3b74ee2 Cleanup: Remove Unneeded Old Icon-Related Files
Remove some unused icon-related files. alert_icons.*, blender_logo.png,
prvicons.*

Pull Request: https://projects.blender.org/blender/blender/pulls/123799
2024-06-27 01:18:13 +02:00
Hans Goudey
4d29e1dccb Refactor: Sculpt: Remove some constants from PBVH
The aim is to simpliofy the construction of a PBVH and to reduce
the breadth of its responsibilities.
2024-06-26 17:17:01 -04:00
Hans Goudey
c365daaedb Cleanup: Sculpt: Remove another unused PBVH variable 2024-06-26 16:53:49 -04:00
Hans Goudey
d3d9be486b Cleanup: Sculpt: Remove unused PBVH draw cache status variables 2024-06-26 16:47:32 -04:00
Harley Acheson
b7256b1ea7 UI: Use SVG Icon for Logo in Splash About
Use new SVG icon the "Blender" logo shown on the About screen. Allows
removal of blender_logo.png and no need for 1024x256 bitmap. Instead it
is made at exact requested size. This PR updates blender_logo_large.svg
because the (R) in it is not a stroke or path, but actual text - not
rasterized by Nano.

Pull Request: https://projects.blender.org/blender/blender/pulls/123790
2024-06-26 22:43:59 +02:00
Harley Acheson
5c377686e7 UI: Use SVG Icons for Alert Icons on Dialogs
Use new SVG icons in place of current "Alert" icons, used on dialogs
and confirmations. No need for alert_icons.svg, alert_icons.png,
alert_icons_update.py. Also looks better as they are made at exact
requested size instead of 256x256 then scaled down to display.

Pull Request: https://projects.blender.org/blender/blender/pulls/123786
2024-06-26 20:54:20 +02:00
Brecht Van Lommel
d9bd35c4bc Cleanup: make format 2024-06-26 20:39:01 +02:00
Harley Acheson
fe4c7c4178 UI: Consistent Status Bar Spacing
Drawing operator keymap information on the status bar is sometimes
custom and and sometimes automatic. This PR just make the automatic
display have the same spacing as custom. Slightly tighter with a
greater proportion of space between items than between an item's
icon and text.

Pull Request: https://projects.blender.org/blender/blender/pulls/123785
2024-06-26 20:29:48 +02:00
Hans Goudey
aa4c42958d Fix: Sculpt: Anchored brush "restore" broken for refactored brushes
Currently the "Anchored" stroke option doesn't work on the refactored
brushes. That's because the previous implementation used the combination
and application of proxies to restore to the previous position stored in the
undo step. The new brushes don't use proxies for performance reasons,
so the restoration of shape keys and original positions didn't happen.

Now, fully restore the original positions of shape keys and mesh original
positions. This method is quite simple since it uses the same mechanism
brushes use to change that data.

Pull Request: https://projects.blender.org/blender/blender/pulls/123783
2024-06-26 20:10:43 +02:00
Harley Acheson
992e47bc45 Fix #123675: Use ICON_TYPE_MONO_TEXTURE Icons for Error Conditions
VSE is drawing error icons on strips using icons of type
ICON_TYPE_COLOR_TEXTURE, using the regular icon texture, which is
no longer used for standard icons. This PR changes this to use regular
UI_icon_draw_ex() here instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/123700
2024-06-26 19:52:10 +02:00
Bastien Montagne
f6358f6e71 Merge branch 'blender-v4.2-release' 2024-06-26 19:28:22 +02:00
Damien Picard
f739d4832e I18n: Extract and disambiguate a few messages
Disambiguate
- "Thickness": use "Material" for EEVEE's thickness material setting.
- "Generated": use "Texture" for texture coordinates, "Image" for
  image source, keep default context for animation keyframe types.

Translate
- Split "Online access required to (check for|install) updates..."
  into 2x2 messages individually translatable.
- "Geometry" input in bake node.
- "New" for the Palette ID: extract it as part of the
   BLT_I18N_MSGID_MULTI_CTXT for "New".

Some issues reported by Gabriel Gazzán and Satoshi Yamasaki.

Pull Request: https://projects.blender.org/blender/blender/pulls/123404
2024-06-26 19:25:22 +02:00
Damien Picard
26cdf7e340 I18n: Extract many custom labels defined in uiItem*
Those labels needed a manual translation with IFACE_() or RPT_():
  - "Add Item",
  - "Blend",
  - "Cached from the first line art modifier.",
  - "Custom Curve",
  - "Custom Path",
  - "Custom Range",
  - "End",
  - "Enter a Unicode codepoint hex value",
  - "Forward Axis",
  - "Insert Unicode Character",
  - "Mid Level",
  - "Min",
  - "Mode",
  - "No Items",
  - "Object",
  - "Path",
  - "Probability",
  - "Sample Radius",
  - "Sharp edges or custom normals detected, disabling GPU subdivision",
  - "Start",
  - "Texture Mapping",
  - "Up Axis",
  - "Using both CPU and GPU subdivision",
2024-06-26 19:25:20 +02:00
Bastien Montagne
a50ab48709 Core: Cleanup: foreach_id: document acceptable return values from callbacks.
Essentially, callbacks in non-readonly are never expected to early-abort
the ID usages iteration. Add comments and an assert to ensure this.
2024-06-26 19:11:10 +02:00
Clément Foucault
36ff8c0231 Fix: EEVEE: Shadow visibility flag not versioned for 4.1 files
The versioning code was introduced in 4.1 release cycle when
we were planning to release EEVEE next in 4.1. This means that
the versioning was not applied to files created in 4.1 using
EEVEE-Legacy and loaded into 4.2.

Moving the code just before the EEVEE-Legacy removal make
the versioning work as expected. There is no side effect
inside the versioning code.

Fix #123500
2024-06-26 18:57:11 +02:00
Hans Goudey
1d7dc7190f Sculpt: Refactor distance falloff, clipping, and brush strength
Part of #118145.
Rewrite the application of brush hardness, filtering for 3D view clipping
and brush distance factor calculation to operate on arrays of data rather
than a single element at a time.

In the benchmark file from the task above, this improves performance by
5%, from 0.58s to 0.55s. I expect that's mainly because constant checks
have been moved out of the hot loops, avoiding function call overhead,
and because in some cases we avoid doing division for every element.

Pull Request: https://projects.blender.org/blender/blender/pulls/123671
2024-06-26 17:36:28 +02:00
Bastien Montagne
bbfd3d1896 Fix (unreported) Subdiv: MEM_freeN called on MEM_new-created data. 2024-06-26 17:24:23 +02:00
Clément Foucault
d4de4c1f01 Fix: EEVEE: Shadow: Jitter more than the light radius
When enabled, jittered shadows were jittering inside the
shading light radius that is clamped to a minimum for
numerical precision reasons.

This patch sets the shadow radius to 0 only if the original
light radius is also zero, and use the former to determine
wether or not to apply jittering.
2024-06-26 16:58:37 +02:00
Miguel Pozo
eb37bace96 Merge branch 'blender-v4.2-release' 2024-06-26 16:45:15 +02:00
Miguel Pozo
2804b000ac Fix: GPU: Fix handling of invalid binary caches 2024-06-26 16:44:46 +02:00
Hans Goudey
bbf4d13683 Cleanup: Formatting 2024-06-26 10:39:59 -04:00
Philipp Oeser
de14cb1c1e Merge branch 'blender-v4.2-release' 2024-06-26 15:38:55 +02:00
Philipp Oeser
d4f5d4a6f6 Fix #123770: Vertex paint Accumulate option breaks Blur action
Accumulating allocates previous colors (which are used in
`do_vpaint_brush_blur_XXX`).

The actual problem here was that the  state of `brush_use_accumulate`
was not consistent across the lifetime of strokes.
Vertexpaint was doing the allocation in `vertex_paint_init_stroke`
(**before** `update_cache_invariants` where the mode gets changed to
`BRUSH_STROKE_SMOOTH` etc.), so here it still seemed we would use
accumulation, whereas later (after internally switching the tool/brush)
this was not the case anymore, leading to wrong behavior of
`do_vpaint_brush_blur_XXX`.

So now move the allocation to `init_session_data` (same as for
weightpaint) to make sure all codepaths have a consistent state of
`brush_use_accumulate`.

NOTE: this was made more obvious since 6de6d7267f added SHIFT-blurring
to the keymap

Pull Request: https://projects.blender.org/blender/blender/pulls/123778
2024-06-26 15:38:26 +02:00
Philipp Oeser
68d998f4ca Merge branch 'blender-v4.2-release' 2024-06-26 15:37:26 +02:00
Philipp Oeser
bc0b86797c Fix #94125: Collada: not all edit mode changes are exported
This was the case when mulitple objects had changes in multi-object-
editmode.

Similar to f8b11528b2 & 3dd08beab3, this now ensures we have mesh data
in editmode.

Pull Request: https://projects.blender.org/blender/blender/pulls/123732
2024-06-26 15:36:47 +02:00
Philipp Oeser
3851157405 Merge branch 'blender-v4.2-release' 2024-06-26 15:35:52 +02:00
Clément Foucault
56023d5b63 Fix: EEVEE: Transparent pass break AO pass
This was caused by bad ordering. AO pass should only
include Dithered objects.

Fix #123393
2024-06-26 15:21:02 +02:00
Falk David
581a01a92d Fix: GPv3: "Chisel Marker" brush size pressure default
The `GP_BRUSH_PRESET_MARKER_CHISEL` did not set
the `BRUSH_SIZE_PRESSURE` flag. Now fixed.
2024-06-26 14:43:17 +02:00
Falk David
d1a01ceff2 Fix: GPv3: Draw Tool: Angle setting alignement
The angle at which the angle factor is greatest/smallest
was flipped by 90 degrees when compared to GPv2.
Additionally, the smoothing rate was a bit too slow.
2024-06-26 14:43:17 +02:00
Falk David
3a0236c889 Curves: Return empty span from offsets() if there are no curves
The function `CurvesGeometry::offsets()` would return a span pointing to
`nullptr` with a size of `1` if there were no curves in the geometry.

This was already changed for `offsets_for_write()` in
c3365666e5, which retuns an empty span.
Do the same for `offsets()` now.

Pull Request: https://projects.blender.org/blender/blender/pulls/123772
2024-06-26 14:38:48 +02:00
Jeroen Bakker
02a45fb60d Vulkan: Add read dependency for push constants fallback
When a shader uses push constants fallback the push constants are
stored inside a uniform buffer. The uniform buffer needs to be guarded
with a read barrier.

Pull Request: https://projects.blender.org/blender/blender/pulls/123777
2024-06-26 14:38:08 +02:00
Jacques Lucke
09ab585a05 Merge branch 'blender-v4.2-release' 2024-06-26 14:03:55 +02:00
Miguel Porces
b120440f7c Fix: Nodes: show group icon for custom node groups
The bl_icon of NodeCustomGroups is being ignored in latest versions.
This commit re-enables the icon drawing for those nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/123669
2024-06-26 14:03:02 +02:00
Jacques Lucke
89471e8566 Merge branch 'blender-v4.2-release' 2024-06-26 14:01:58 +02:00
Jacques Lucke
29f6167db1 Fix #123624: no geometry after applying visual geometry to mesh
This happened because `BKE_object_get_evaluated_mesh` now only returns
the mesh if there are no pending depsgraph updates. However, given that the
ID was tagged for changes before the evaluated mesh was accessed, it looked
like there were missing updates when there were not.

Now the depsgraph tag is only set after the object has actually been modified.
2024-06-26 14:00:05 +02:00
Falk David
2c773ce857 Fix: GPv3: Draw Tool: First point too large when using angle factor
The first point was always set to the brush radius, even when the
angle setting was used. Additionally, the approximation for the
pen direction started at (0, 0).

This fixes the issue by overwriting the radius of the first point
once we get the first extension sample and with that the first
approximation of the pen direction.
The pen direction is also set to the initial direction from the
first to the second point.
2024-06-26 13:51:18 +02:00
Falk David
c3b5a889bd Cleanup: GPv3: Draw Tool: Remove unnecessary lambdas 2024-06-26 11:13:56 +02:00
Falk David
db25962c27 Cleanup: GPv3: Draw Tool: Use math::numbers::pi 2024-06-26 11:13:17 +02:00
Falk David
8748225d58 GPv3: Draw Tool: Random Color
This implements the random color option from GPv2.

Now uses a perlin noise instead of the hash based noise
from before.

Pull Request: https://projects.blender.org/blender/blender/pulls/123746
2024-06-26 11:00:50 +02:00
Sergey Sharybin
4a37e8ed7b Merge branch 'blender-v4.2-release' 2024-06-26 09:59:31 +02:00
Sergey Sharybin
0081c4b64a Fix #123576: VSE Crash: Preview render fails if two Scene strips are stacked
The issue was caused by the ImBuf of the scene strip render sharing the float
buffer pixels with the ImBuf from the render result. If the render result is
ever gets freed (i.e., by a request to perform another render) it'll leave the
strip ImBuf pointing to a freed memory.

This was caused by the #109788.

The simple solution is to restore the code to the state prior to the ImBuf
refactor in the RenderRsult. A better solution would be to use implicit
sharing, similar to how it was done in the #108045.

Pull Request: https://projects.blender.org/blender/blender/pulls/123731
2024-06-26 09:58:46 +02:00
Lukas Tönne
be3942e5de Merge branch 'blender-v4.2-release' 2024-06-26 09:52:02 +02:00
Lukas Tönne
864d701083 Fix #123705: Object Info node is not setting Transform output
This was simply missing in the Object Info node.

Pull Request: https://projects.blender.org/blender/blender/pulls/123709
2024-06-26 09:50:52 +02:00
Omar Emara
58f19f41ce Fix: EEVEE displays wrong pass if Cryptomatte is enabled
EEVEE displays the Cryptomatte false color if the Cryptomatte passes are
enabled in the viewport, even if the display pass is set to something
else. This problem doesn't really trigger at the moment, because
Cryptomatte passes can't be enabled in the viewport unless the display
pass is set to Cryptomatte. But the issue triggers in case of multi-pass
compositing as in #123378.

This is caused by unconditional write to the fragment color in the film
shader in case of Cryptomatte. To fix this, we only write the fragment
color if the display storage type is Cryptomatte.

Needed by #123378.

Pull Request: https://projects.blender.org/blender/blender/pulls/123723
2024-06-26 08:44:43 +02:00
Campbell Barton
66e422f33d Merge branch 'blender-v4.2-release' 2024-06-26 14:27:40 +10:00
Campbell Barton
8b3ec86561 Merge branch 'blender-v4.2-release' 2024-06-26 14:27:38 +10:00
Campbell Barton
96906536db Extensions: add a Python API for user editable extension directories
Provide a convenient way to access a writable directory for extensions.
This will typically be accessed via:

  bpy.utils.extension_path_user(__package__, create=True)

This API is provided as some extensions on extensions.blender.org
are writing into the extensions own directory which is error prone:

- The extensions own directory is removed when upgrading.
- Users may not have write access to the extensions directory,
  especially with "System" repositories which may be on shared network
  drives for example.

These directories are only removed when:

- Uninstalling the extension.
- Removing the repository and its files.
2024-06-26 14:23:17 +10:00