Commit Graph

3276 Commits

Author SHA1 Message Date
Campbell Barton
fc0a538168 Extensions: translate each permission individually
Without translating terms individually, the translation lookup table
would have had to included every permutation of permissions.
2024-06-06 16:42:22 +10:00
Campbell Barton
c9c3cb48f2 Merge branch 'blender-v4.2-release' 2024-06-06 14:43:01 +10:00
Campbell Barton
2533ff39f9 Extensions: support replacing missing legacy add-ons with extensions
This groups all the add-ons from 4.1 which were enabled but are no
longer distributed with Blender and provides an easy way for users to
install them. This panel is collapsed by default.

Ref !122727

Co-authored-by: Dalai Felinto <dalai@blender.org>
2024-06-06 14:41:20 +10:00
Campbell Barton
0f5e816a7d Merge branch 'blender-v4.2-release' 2024-06-06 11:28:06 +10:00
Campbell Barton
1771764851 Merge branch 'blender-v4.2-release' 2024-06-06 11:28:04 +10:00
Campbell Barton
949dfbfaa8 Cleanup: Python script formatting
- Double quotes for strings.
- Trailing commas when wrapped lines.
2024-06-06 11:26:28 +10:00
Nika Kutsniashvili
1d894aa1a7 Add Convert Image Empty to Mesh Plane operator
Since import images as mesh planes operator was added recently in core
Blender, it is now easy to also support converting image empties to mesh
planes by reusing the same code.

This results in a fast workflow where you can use Blender's drag & drop
& align feature for reference images, and quickly turn them into meshes
without registering second file handler and clicking anything before
import is finished.

Ref !122546
2024-06-06 11:15:47 +10:00
Campbell Barton
1694109b11 Merge branch 'blender-v4.2-release' 2024-06-06 10:23:33 +10:00
Campbell Barton
d06b298ad0 Merge branch 'blender-v4.2-release' 2024-06-06 10:23:30 +10:00
Campbell Barton
e16377c338 Merge branch 'blender-v4.2-release' 2024-06-06 10:23:29 +10:00
Campbell Barton
ea60343280 Merge branch 'blender-v4.2-release' 2024-06-06 10:23:27 +10:00
Campbell Barton
7796d206c1 Merge branch 'blender-v4.2-release' 2024-06-06 10:23:25 +10:00
Campbell Barton
809be0c8e0 Extensions: disable translation for labels such as URL & repo name 2024-06-06 10:20:13 +10:00
Campbell Barton
e60887c642 Cleanup: address mypy warnings 2024-06-06 10:07:13 +10:00
Campbell Barton
b56ddb6c90 Fix error building an extension without any paths defined
When the [build] table was defined without any paths, duplicate files
could be added to the zipfile.
2024-06-06 10:05:37 +10:00
Campbell Barton
613f00d5ff Fix variable use before assignment in extensions timer
Also remove unused global.
2024-06-06 09:55:13 +10:00
Campbell Barton
83a2693818 Fix error with debugging operator to lock/unlock extension repos 2024-06-06 09:55:13 +10:00
Lukas Stockner
5891a73785 Merge branch 'blender-v4.2-release' 2024-06-05 20:25:50 +02:00
Miguel Pozo
74224b25a5 GPU: Add GPU_shader_batch_create_from_infos
This is the first commit of the several required to support
subprocess-based parallel compilation on OpenGL.
This provides the base API and implementation, and exposes the max
subprocesses setting on the UI, but it's not used by any code yet.

More information and the rest of the code can be found in #121925.

This one includes:
- A new `GPU_shader_batch` API that allows requesting the compilation
  of multiple shaders at once, allowing GPU backed to compile them in
  parallel and asynchronously without blocking the Blender UI.
- A virtual `ShaderCompiler` class that backends can use to add their
  own implementation.
- A `ShaderCompilerGeneric` class that implements synchronous/blocking
  compilation of batches for backends that don't have their own
  implementation yet.
- A `GLShaderCompiler` that supports parallel compilation using
  subprocesses.
- A new `BLI_subprocess` API, including IPC (required for the
  `GLShaderCompiler` implementation).
- The implementation of the subprocess program in
  `GPU_compilation_subprocess`.
- A new `Max Shader Compilation Subprocesses` option in
  `Preferences > System > Memory & Limits` to enable parallel shader
  compilation and the max number of subprocesses to allocate (each
  subprocess has a relatively high memory footprint).

Implementation Overview:
There's a single `GLShaderCompiler` shared by all OpenGL contexts.
This class stores a pool of up to `GCaps.max_parallel_compilations`
subprocesses that can be used for compilation.
Each subprocess has a shared memory pool used for sending the shader
source code from the main Blender process and for receiving the already
compiled shader binary from the subprocess. This is synchronized using
a series of shared semaphores.
The subprocesses maintain a shader cache on disk inside a
`BLENDER_SHADER_CACHE` folder at the OS temporary folder.
Shaders that fail to compile are tried to be compiled again locally for
proper error reports.
Hanged subprocesses are currently detected using a timeout of 30s.

Pull Request: https://projects.blender.org/blender/blender/pulls/122232
2024-06-05 18:45:57 +02:00
Pablo Vazquez
c1cf43e25e Merge branch 'blender-v4.2-release' 2024-06-05 17:58:05 +02:00
Pablo Vazquez
7b601464c3 UI: Add new TAG icon
Introduce a new icon: `TAG`. A generic tag/label, to be used anywhere
there are tags.

Details and images in the pull request.

Pull Request: https://projects.blender.org/blender/blender/pulls/122738
2024-06-05 17:56:51 +02:00
Falk David
a40a4ccb2f GPv3: Draw Tool: Make "Simplify" option a screen space threshold
Previously, the "Simplify" option was a world space distance threshold.
This meant that zooming in and out of the view changed the way
this option behaved. There were complaints from artists about this.

This change improves two things:
* The simplify algorithm uses the screen space coordinates rather than the
  3D positions.
* The UI setting is in pixels making it much easier to tweak (no need
  for values in the 1e-4 range).

Pull Request: https://projects.blender.org/blender/blender/pulls/122719
2024-06-05 15:06:49 +02:00
Julian Eisel
a6ed013baa Refactor: Get asset data via asset representation, not file
The "active_file" context member as a way to get the active asset should be
avoided, in favor of "asset". This moves us away from the file browser backend
as basis of the asset system,
2024-06-05 13:46:33 +02:00
Jacques Lucke
e2de34263a Nodes: don't show custom color panel for reroute nodes
This color is not used anywhere.
2024-06-05 11:00:22 +02:00
Leon Schittek
db5d410164 Node Editor: add overlay to automatically label reroute nodes
Add an overlay option to automatically display a label on reroute nodes.

This automatic label is propagated through chained reroute nodes and
is based on the explicit label of linked reroute nodes.

The automatic label is dimmed to distinguish it from manually set ones.

Pull Request: https://projects.blender.org/blender/blender/pulls/113368
2024-06-05 10:02:37 +02:00
Campbell Barton
7c143367d7 Extensions: use deflate compression for ZIP files
Replace LZMA with ZLIB compression as default tools on Linux & Windows
can't decompress these ZIP files and some users wish to open and inspect
the extensions.

While LZMA has the potential for significantly better compression it
turns out the actual gains were marginal for extensions that contain
many Python files (compared with `tar.lzma`) because each file is
compressed individually, see #122710.
2024-06-05 17:18:42 +10:00
Campbell Barton
8719057b4a Cleanup: unused arguments and warnings raised by pylint 2024-06-05 16:21:20 +10:00
Campbell Barton
17ec64770c Extensions: ensure paths are always included for the "build" command
Scanning the file-system for paths to include didn't detect cases when
explicitly included paths (such as wheels) were missing.

Change the logic to build a list of paths which is merged with pattern
matched paths (de-duplicating), then add all files into the ZIP.
Any missing paths will raise an error.
2024-06-05 15:50:14 +10:00
Leon Schittek
b15dc90c9d Fix #119282: Enable edge-pan when duplicating nodes from menu
The commit that added this to the keymap (33d5ecd5b5) mentions not
hard-coding the edge-panning to be enabled. So this just enables the
edge-panning for the menu entries, as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/120324
2024-06-05 06:53:17 +02:00
Campbell Barton
6c1b908d46 Extensions: correct type checks for permissions 2024-06-05 14:41:20 +10:00
Julien Duroure
b28abfaad4 glTF: Bump version after recent update for EEVEE 2024-06-04 21:09:39 +02:00
Pablo Vazquez
fac32e9647 Cleanup: make format
Missed in my previous commit e2458001e4
2024-06-04 19:15:14 +02:00
Dalai Felinto
ffa363355d Extensions: "permissions" Expect a dictionary instead of a list
We don't do anything with the content of the dictionary yet (the reason
why each permission is required. But Blender can talk again with the
extensions server.

This still requires changes on the validation and build and
server_generate commands. To be tackled separately.
2024-06-04 19:08:17 +02:00
Pablo Vazquez
e2458001e4 UI: Extensions: Layout tweaks to list items
Light redesign of the extension/add-on list item.

The last time this layout was updated was in Blender 2.5, when text was
usually left-aligned, and add-ons preferences weren't streamlined yet.

The goal is to keep a familiar look, while making some improvements to
organization such as group actions (install/uninstall, buttons to external sources
like website, documentation, report a bug).

Detail images available in the pull request.

Pull Request: https://projects.blender.org/blender/blender/pulls/122726
2024-06-04 19:07:56 +02:00
Jacques Lucke
c49045ff53 Nodes: open node property panel by default
This makes it easier to find these properties which are more common
nowadays than they used to be. Especially in geometry nodes.
2024-06-04 19:06:26 +02:00
Bastien Montagne
1e5d1c0d04 Fix (unreported) I18N error when generating messages for an add-on.
Would error when a language is not selected in the translation UI, and
new messages are generated by the update.
2024-06-04 18:42:17 +02:00
Bastien Montagne
b179378766 Fix (unreported) crash in I18N messages extraction script.
Using `bpy.types.OperatorProperties.__subclasses__()` has become utterly
unreliable now, to the point that it keeps references to freed (aka
unregistered) operators now, leading to crash when accessing them.

This commit refactors quite seriously the `dump_rna_messages` code, by
first listing all 'valid' classes, and then processing them all at once
in a flat iteration.

RNA classes are still generated from class hierarchy rooted on the
'virtual' `rna_struct` one, except for operators. These are now
generated by introspecting `bpy.ops` instead.
2024-06-04 18:42:17 +02:00
Dalai Felinto
98dd62ebda UI: Extensions: Missing Script Files tweaks
* Move missing script files inside a panel.
* Call it Missing Add-ons.
* Add an explicit "X" to dismiss (instead of the checkbox).

Note: The panel is collapsed by default.

Co-authored by Pablo Vazquez.

Pull Request: https://projects.blender.org/blender/blender/pulls/122721
2024-06-04 18:16:34 +02:00
Pablo Vazquez
ae26d0468b UI: Extensions: Use icon for check notification
This message replaces labels that contain icons, since this message
didn't have an icon the UI looks like it flickers since the text
shifts position.
2024-06-04 18:05:42 +02:00
Dalai Felinto
c67bf1be9c UI: Extensions: "Online Extensions" panel tweaks
* Make the text smaller.
* Stash the entire panel content inside a box.

Co-authored by: Pablo Vazquez

Pull Request: https://projects.blender.org/blender/blender/pulls/122715
2024-06-04 18:04:54 +02:00
Falk David
0ac65555b2 Cleanup: GPv3: Draw Tool: Shorten name in UI
Shorten the display name of "Subdivision Steps" to "Subdivisions".
2024-06-04 17:24:54 +02:00
Sean Kim
e600a7c229 Fix #122493: Line Trim UI missing Extrude Mode
Exposes the missed `Extrude Mode` setting for the *Line Trim* tool.

Pull Request: https://projects.blender.org/blender/blender/pulls/122695
2024-06-04 16:38:37 +02:00
Brecht Van Lommel
5ce58d63b7 Fix: bl_info version from extension is string instead of int tuple
The extensions spec says this should use semantic version,
so it should always start with X.Y.Z numbers.

Co-authored-by: Campbell Barton <campbell@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/122687
2024-06-04 16:21:25 +02:00
Jeroen Bakker
6a71a91b83 EEVEE-Next: Light Probe RNA
Split `bpy.types.LightProbe` into specialized subclasses.
- Rename all grid_* to remove the prefix in the RNA and limit access to
  volume probe.
- Parallax and other sphere probe only properties should be limited to
  sphere probe.
- `visibility` properties are deprecated (to be removed in a future
  Blender version)

Ref #113976

Pull Request: https://projects.blender.org/blender/blender/pulls/122353
2024-06-04 15:05:22 +02:00
Dalai Felinto
67c292f26b Extensions: update Show Legacy Add-ons tooltip
The old tooltip was wrong. But it was also not very informative on to
what is a legacy add-on.
2024-06-04 15:02:11 +02:00
Dalai Felinto
8b53355602 UI: Add Extensions Updates to user preferences
This was an oversight when we introduced the Extensions Updates on the
Status Bar. Reported in real life by Pablo Vazquez.
2024-06-04 15:02:11 +02:00
Jeroen Bakker
c7807a425a EEVEE: Alias/remove legacy RNA material attributes
- `bpy.types.Material.blend_method` aliases `bpy.types.Material.surface_render_method`.
  'Opaque' and 'Alpha Clip' maps to deferred.
- Renamed `show_transparent_back` to `use_transparency_overlap`
- Renamed `use_screen_refraction` to `use_raytrace_refraction`
- Deprecate `use_sss_translucency` and `use_sss_translucency`

Related to: #113976

**NOTE**
The light probe changes will be done in a different patch.
Both patches should land just before we remove EEVEE Legacy
from the code-base.

Pull Request: https://projects.blender.org/blender/blender/pulls/122297
2024-06-04 14:48:40 +02:00
Clément Foucault
cc0d12dd20 EEVEE: Remove EEVEE-Legacy
This handles the transition to EEVEE-Next (now EEVEE).

This removes some things that make no sense to keep
even for compatibility.
- Scene.eevee.light_cache_data
- Scene Light cache operators
- Scene Light cache RNA properties

The remaining legacy properties will be removed later
on to avoid python API breakage.

We keep the identifier of EEVEE-Next as `BLENDER_EEVEE_NEXT`
to avoid addons being incorrectly silently made compatible
with the EEVEE-Next where the Python API is different.
This renaming should be done in 5.0 release.

Thank you EEVEE-Legacy, you served us well.

Pull Request: https://projects.blender.org/blender/blender/pulls/122433
2024-06-04 14:17:58 +02:00
Falk David
aaae9b956a GPv3: Draw Tool: Add separate "Stroke" panel
Duplicates the UI code for the "Stroke" panel and makes
sure it checks for the new GPv3 type in the poll functions.

This will allow us to slightly adapt the UI without
interfering with GPv2.
2024-06-04 13:58:10 +02:00
Dalai Felinto
a4aa5faa20 UI: Extensions: stash Dismiss/Allow Online Access buttons inside the panel
This includes a small cleanup:
* Remove dead code.
* Rename context to _context since it is not being used.
2024-06-04 09:49:36 +02:00