Commit Graph

137481 Commits

Author SHA1 Message Date
Campbell Barton
42e1239ba8 Core: support restricting the types an XML preset may load
Prevent potential problems from untrusted XML (typically themes)
traversing into data outside the intended targets.

From what I can tell it's not currently possible but changes to RNA
could allow for this which would likely go by unnoticed.

Further details in code-comments.
2024-06-27 21:21:07 +10:00
Campbell Barton
65d0f365a9 Cleanup: correct misleading name of internal function 2024-06-27 21:01:15 +10:00
Sergey Sharybin
2dc4bd3cdf Fix: PSD images are read wrong
The original report on Blender is is #123218, this commit takes care of
fixing it for macOS by updating the OpenImageIO libraries.

Ref #123218
Ref #118455

Pull Request: https://projects.blender.org/blender/blender/pulls/123826
2024-06-27 12:47:39 +02:00
Dalai Felinto
c6e452d865 UI: Extensions: Add a separator between Install and the "⌄" button
It was too easy to click on Install by mistake, while trying to click on
the "⌄" menu. This is particulary problematic since we enable add-ons by
default.

Co-authored by: Pablo Vazquez, based on (informal) report by Campbell Barton.
2024-06-27 12:06:53 +02:00
Brecht Van Lommel
b802f146e6 Tools: Move warning about wrong clang-format version to the bottom
So it doesn't scroll off screen and is easy to miss.
2024-06-27 11:49:00 +02:00
Campbell Barton
989de85cf6 Extensions: fixed & refactor internals for extension visibility
Add utility class to check extension visibility to remove
incomplete logic that was duplicated into operator code.
Also minor refactoring to reduce the number of arguments passed
to internal function.s
2024-06-27 14:33:47 +10:00
Brecht Van Lommel
4e4d8476c4 Tools: Remove cycles commit syncs script, moved to the standalone repo
Pull Request: https://projects.blender.org/blender/blender/pulls/123788
2024-06-26 21:30:00 +02:00
Brecht Van Lommel
4b47a48ea2 Hydra: Fix Cycles render delegate to build with USD 24.x 2024-06-26 21:06:40 +02:00
Brecht Van Lommel
a060de65a4 Cycles: Sync minor build related changes with standalone repo 2024-06-26 20:39:03 +02:00
howetuft
5e40dcc95d Cycles: Expose object node in XML API
The Object node is not currently exposed in the XML API, but rather
implicitly created along with Mesh nodes. This prevents accessing
features that are dependent on this node, like caustics settings.

Pull Request: https://projects.blender.org/blender/cycles/pulls/8
2024-06-26 20:39:03 +02:00
howetuft
dc35852107 Cycles: Expose vertex normals and tangent space attributes in XML API
The vertex normals and tangent space attributes are not currently exposed by
the XML API, in the Mesh node. This notably prevents the XML API user
from applying normal maps to meshes in tangent space.

To overcome this situation, this commit adds three attributes to the Mesh node:
N: vertex normals
tangent: tangents
tangent_sign: tangent signs

Nota: at the moment, these attributes are only available for non-subdivided
meshes.

Pull Request: https://projects.blender.org/blender/cycles/pulls/9
2024-06-26 20:39:02 +02:00
Pierre Pontier
3be050ed47 Fix: Cycles build error with GCC and Clang with some build options
Pull Request: https://projects.blender.org/blender/cycles/pulls/5
2024-06-26 20:39:02 +02:00
Brecht Van Lommel
d9bd35c4bc Cleanup: make format 2024-06-26 20:39:01 +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
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
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
2804b000ac Fix: GPU: Fix handling of invalid binary caches 2024-06-26 16:44:46 +02:00
Campbell Barton
99fcbf877d Extensions: Remove "Enabled" section, use sorting instead
This changes the sorting for the installed extensions.
- Update.
- Enable.
- A-Z.

Don't use A-Z for "Available" extensions to prevent name manipulation
to bring an extension up on the ranks.

Match the design of !123728, rewritten to support sorting across
multiple repositories and update tags which weren't handled in the PR.

Details:

- Remove the "Filter" popover & the option "Updates Available"
  since updates are now shown first.
- Add an iterator to for visible extensions to de-duplicate logic which
  was copied for code that scanned for tags.
- Split out logic for drawing an extension into it's own function.
- Tags are now calculated based on visible extensions limited by search.
2024-06-26 23:59:58 +10: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 6de6d7267f3d 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
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 & 3dd08beab308, 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
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
Alaska
3232458152 Fix #123763: Cycles Metal renders with MNEE stuck on some Macs
On some Macs, MNEE would be disabled in Cycles to work around a bug.
However this just led to these devices skipping over MNEE related
parts of the rendering pipeline and not properly progressing through
the render.

This commit fixes this issue by properly disabling MNEE on these devices.

Pull Request: https://projects.blender.org/blender/blender/pulls/123765
2024-06-26 14:15:01 +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
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
Pratik Borhade
1dd017ac62 Fix #123228: GPU subdivision setting can be adjusted on an unsupported device
GPU subdivision is only supported on OpenGL backend. Exclude this
property for metal backend then.

Pull Request: https://projects.blender.org/blender/blender/pulls/123313
2024-06-26 13:31:37 +02:00
Pratik Borhade
5dbb769c08 Fix #123617: Scrollbar barely visible in light theme
Change default `item` value in light theme that controls the scrollbar
color.

Pull Request: https://projects.blender.org/blender/blender/pulls/123720
2024-06-26 13:28:49 +02:00
Bastien Montagne
2afcc9246f Fix (unreported) CMake choosing system wayland paths over pre-built ones.
`find_path` searches for `HINTS` before default system paths, while
`PATHS` are searched last. See also
https://cmake.org/cmake/help/latest/command/find_path.html
2024-06-26 12:17:40 +02:00
Bastien Montagne
c525e4db83 Revert "GHOST/Wayland: reference the stable tablet-v2 API"
The currently available `wayland-protocol` libraries in lib-linux_x64
repo do not appear to be advertised 1.36 (or 1.35) versions, since the
tablet protocol is not available among the stable ones.

This reverts commit 2a85eaaf169c51cfb24d4564fa58b4c89ce6d773.

Pull Request: https://projects.blender.org/blender/blender/pulls/123774
2024-06-26 11:48:55 +02:00
Bastien Montagne
73db631440 Fix broken tests build in multi-binaries case.
When `WITH_TESTS_SINGLE_BINARY` is disabled, and `WITH_BUILDINFO` is
enabled, (most of) the generated tests binaries need to link buildinfo.

Pull Request: https://projects.blender.org/blender/blender/pulls/123734
2024-06-26 10:48:15 +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
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
Campbell Barton
2a85eaaf16 GHOST/Wayland: reference the stable tablet-v2 API
The tablet API become stable in wayland-protocol 1.35
2024-06-26 16:26:18 +10:00
Campbell Barton
ce9500dc50 Linux: update wayland deps 2024-06-26 15:55:57 +10:00
Campbell Barton
bb4946135a Deps: bump version of wayland libraries
Since wayland libraries are dynamically loaded, this mainly allows
back-porting fixes to 4.2 that rely on newer protocols & API's.
2024-06-26 15:42:18 +10:00
Campbell Barton
2d8d3bd0f8 Linux: update OpenImageDenoise 2024-06-26 15:36:55 +10:00
Campbell Barton
1291ac6590 Linux: update OpenImageIO 2024-06-26 14:53:19 +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
Campbell Barton
f5aaee39d2 Extensions: prevent recursive file removal for corrupt repositories
When removing a repository & files a valid module name was assumed.
While this should always be the case, add an additional check so in
the unlikely event of memory/file corruption (especially `..`)
recursively removing files outside the repository is never allowed.
2024-06-26 14:22:21 +10:00
Richard Antalik
2075174496 Fix #120370: Fades don't work well with scene strips
Recently, `volume` property has been added to scene strips. This causes
only volume property to be animated when adding fades with `fades_add`
operator.

Add fades to volume and opacity properties if these are available.

Pull Request: https://projects.blender.org/blender/blender/pulls/123236
2024-06-26 06:04:50 +02:00
Nika Kutsniashvili
b933d6e1c7 Fix #123586: Sequencer: Box select in Preview doesn't work after selecting it in the menu
select_box operator needs different context in preview and sequencer
regions. It wasn't specified, so it defaulted to sequencer context and
wasn't working in preview.

This PR sets poll for region and sets correct context for preview. This
also means shortcut appears on menu item in preview now.

Pull Request: https://projects.blender.org/blender/blender/pulls/123757
2024-06-26 05:54:28 +02:00
Brecht Van Lommel
224307b9aa Fix: Cycles build error with OptiX after recent changes
Ref #123733

Pull Request: https://projects.blender.org/blender/blender/pulls/123761
2024-06-26 02:39:12 +02:00
Andrej730
fcad7e7d2b Fix mathutils array parsing exception message
Error in exception message when the argument doesn't meet the sequence
length requirement.

Ref: !123748
2024-06-26 10:25:56 +10:00
Mangal Kushwah
30ad15c01c Fix: #123349 Incorrect initialization of face sets by material
Changes the way the face set index generated for intialize by material.
In current implementation face set index is generated by adding 1 to
material index. In most cases it'll work fine. But in some cases hidden
face sets and material face sets can have same index.

Pull Request: https://projects.blender.org/blender/blender/pulls/123465
2024-06-26 02:22:16 +02:00
Campbell Barton
7dfedf4e84 Tools: various fixes/corrections to the autopep8 formatter
When autopep8 is accessed as a Python module (using `--no-subprocess`),
which is now default on MS-Windows.

- Perform version checks on the module version instead of the command.
- Remove checks for the command existing in the PATH.
- Adjust errors to make sense for a Python module.
2024-06-26 10:08:03 +10:00
Miguel Pozo
066619e1a8 Fix: GPU: GLStorageBuf::async_flush_to_host non named path
Fix the read parameter when there's no direct_state_access_support.
2024-06-25 19:52:39 +02:00
Weizhen Huang
02e6985c62 Fix #94323: Cycles blocky artifacts in overlapping volumes due to scale difference
when computing coefficients in volume, the volume density of the object
at the top of the stack is used, which leads to wrong result if
overlapping volumes have different scales.
This commit fixes the problem by pre-multiplying the volume density per
object when evaluating the shader.

Pull Request: https://projects.blender.org/blender/blender/pulls/123733
2024-06-25 18:49:26 +02:00
Miguel Pozo
9b61673b46 Fix: EEVEE: Add missing view bind
Seems to fix #123413
2024-06-25 17:58:21 +02:00
Bastien Montagne
fccdfa2b06 Fix (unreported) missing IDTypes init in lib_remapper tests.
This is usualy hidden it'd seem by the `WITH_TESTS_SINGLE_BINARY`
option.
2024-06-25 16:42:30 +02:00
Campbell Barton
fcba8b8099 Fix #123710: Remote repo re-used when installing from file selector
Functionality from [0] to skip-saving remote repositories was only
applied when dropping extensions. Now this is done when installing
from the file selector too.

[0]: 9b7f2c9976c4523fbee35bd0e286e92e22af5f85
2024-06-26 00:32:00 +10:00