Commit Graph

150077 Commits

Author SHA1 Message Date
Miguel Pozo
a249e93ad1 GPU: Add missing virtual destructor to ShaderCompiler 2024-06-06 15:50:09 +02:00
Brecht Van Lommel
5e1812dbb8 Merge branch 'blender-v4.2-release' 2024-06-06 15:29:35 +02:00
Sybren A. Stüvel
e49963c6a7 Refactor: Anim: type conversions for Strip and KeyframeStrip
Two quality-of-life additions to juggle the `Strip` and `KeyframeStrip`
types:

- New function `Layer.strip_add<KeyframeStrip>()` that returns a
  `KeyframeStrip` instead of a `Strip`.
- Implicit conversion operator `operator Strip &()` on `KeyframeStrip`
  so that `KeyframeStrip` can be passed to a parameter of type
  `Strip &`.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/122659
2024-06-06 15:29:05 +02:00
Brecht Van Lommel
f7797a90f6 Core: Make BLENDER_SYSTEM_SCRIPTS always add paths
Originally this would replace scripts that come bundled with Blender,
but it's unclear how this is useful.

Searching for this online mainly leads to people asking how they can
use it to add scripts. For example in a studio environment you might
want to deploy add-ons and startup scripts for all users.

Even if you wanted to use it for replacement though, it wasn't really
doing that and inconsistent for different types of scripts:

* startup: ignored
* modules: replaces bundled scripts
* presets: adds to bundled scripts
* addons (in 4.1): ignored
* addons_core (in 4.2): ignored
* startup/bl_app_templates_system: replaces bundled scripts

This change makes it add scripts from this path for all. This is a
breaking change, though arguably this feature was just broken to
begin with and not used much in practice because of that.

The alternative would be add a new set of environment variables to
avoid breaking existing behavior. But that also means keeping around the
broken behavior or fixing it in another way.

Supporting multiple paths may be used too, but for now just support
a single one as doing this for all BLENDER_SYSTEM variables is
non-trivial. The main use case for that would be add-ons anyway, and
those will mainly be handled through upcoming
BLENDER_SYSTEM_EXTENSIONS instead.

Ref #122512

Pull Request: https://projects.blender.org/blender/blender/pulls/122689
2024-06-06 15:28:44 +02:00
Julian Eisel
e425faf696 Cleanup: Replace term "radial" with "pie menu" in UI code
Code was often referring to pie menus using the term "radial" which just
obfuscates that it relates to pie menus. Just call it what it is
directly.

Doesn't replace usages of the term for names that are not strictly tied
to pie menus. Also doesn't change instances of the term in the Python
API to keep compatibility, noted in #110461.

Pull Request: https://projects.blender.org/blender/blender/pulls/122825
2024-06-06 14:55:23 +02:00
Damien Picard
15ec49ff28 Nodes: improve temp viewer from Connect to Output
This PR changes the temporary viewers created in node groups by Connect to Output in two ways:
- Rename it, as it is currently called "tmp_viewer", which stands out
  as strange and code-like. It is renamed to "(Viewer)", which can be
  translated.
- Use the actual connected socket type.
  Currently the viewer uses hardcoded socket types (Geometry for Geometry
  Nodes, Shader for shader nodes). While in GN we can only connect
  geometry to the output, in shader nodes other types can be inspected.
  This change allows the tmp_viewer to use the type of the actual socket
  being inspected, to have a better idea of what it contains from
  outside the group.

  It can be especially useful if a group is used in multiple materials
  and different sockets are being previewed in each one.

It also does some cleanup, details in the commits.

Pull Request: https://projects.blender.org/blender/blender/pulls/122520
2024-06-06 14:47:23 +02:00
Julien Duroure
5372fe2d16 Merge branch 'blender-v4.2-release' 2024-06-06 12:42:47 +02:00
Julien Duroure
b0153f5891 glTF exporter: Collection Export: update filepath when changing format
Update .glb / .gltf extension
Part of #122783

Still remaining the change of default (grayed) value if user didn't set filepath yet
But not sure this can be accessible from python API
2024-06-06 12:40:27 +02:00
Sergey Sharybin
a03985d6e4 Merge branch 'blender-v4.2-release' 2024-06-06 12:32:17 +02:00
Sergey Sharybin
7886ce7bd4 Fix: Cycles crash when using multiple devices
Additional requirement is to have OpenImageDenoiser, and the devices
should not support OIDN denoiser.

Reproduced here in the studio with a system on Linux with either double
Quadro GP100 cards, and Limnux with Quadro 6000 + Quadro 6000 ADA.

The reason for the crash is that the find_best_device() might return
nullptr, and it was never checked.

Pull Request: https://projects.blender.org/blender/blender/pulls/122823
2024-06-06 12:31:31 +02:00
Julien Duroure
b4511ba069 Merge branch 'blender-v4.2-release' 2024-06-06 12:19:58 +02:00
Julien Duroure
c6e38d084c glTF exporter: Collection Export: Exporting a center of mass of root objects option 2024-06-06 12:18:52 +02:00
Julien Duroure
835547e6a4 Merge branch 'blender-v4.2-release' 2024-06-06 12:03:47 +02:00
Julien Duroure
8fd9712df9 glTF exporter: add alphamode management backward compatibility
When a file is created with pre- 4.2 version, but is open with 4.2 version:
We can now detect the automatically created node setup
Wrong for the exact value of the cutoff, but better than nothing to get it detected
2024-06-06 12:01:48 +02:00
Julian Eisel
6a14cca1de Cleanup: Avoid spacial UI list lookup when not necessary
This lookup is only necessary for certain events and if not done in a
pie menu, so it can easily be avoided in many cases. Also reduces
variable scope.
2024-06-06 11:33:47 +02:00
Philipp Oeser
7e73f10f79 Merge branch 'blender-v4.2-release' 2024-06-06 11:10:24 +02:00
Philipp Oeser
9b1d81eec2 Fix #122526: Pie menu executes the active as well as the shortcut button
A bit on shaky ground here, but it looks like we actually dont want to
execute the hovered buttons value/op if we chose another item in the pie
menu. This can be achieved by using the **onfree** arg to
`button_activate_exit` called on the active(hovered) button.

Not sure if this is the correct solution tbh (but maybe it demonstrates
where the bug of #122526 can be located).
I have tested pie menus with this patch and they seems to behave
normally (even nested ones).

Pull Request: https://projects.blender.org/blender/blender/pulls/122567
2024-06-06 11:09:35 +02:00
Julien Duroure
a28540cb13 glTF: Bump addon version to 4.3.0 in main after 4.2 branch creation 2024-06-06 10:48:01 +02:00
Campbell Barton
6a1fe4b7d5 Merge branch 'blender-v4.2-release' 2024-06-06 18:20:56 +10:00
Campbell Barton
d7fdbc8eb2 Merge branch 'blender-v4.2-release' 2024-06-06 18:20:53 +10:00
Campbell Barton
fa5f2354f7 Extensions: adjust add-ons shown in missing built-in extensions
Based on feedback in !122727, include previously built-in add-ons
in the built-in extensions panel even if there is no support for
adding it back via the extensions repository.
2024-06-06 18:19:54 +10:00
Damien Picard
3b5f7b0052 I18n: Restore keyconfig after extracting messages
The translation extraction goes through each keyconfig preset file and
activates it in order to extract its messages. This change makes it
restore the original config, otherwise it would end up switching to
Industry Compatible.

Pull Request: https://projects.blender.org/blender/blender/pulls/122789
2024-06-06 09:53:01 +02:00
Campbell Barton
d7f3448825 Merge branch 'blender-v4.2-release' 2024-06-06 17:44:20 +10:00
Campbell Barton
1e97bae53e Merge branch 'blender-v4.2-release' 2024-06-06 17:44:17 +10:00
Campbell Barton
c2aa06ddbe Merge branch 'blender-v4.2-release' 2024-06-06 17:44:12 +10:00
Campbell Barton
8cb94adbef Extensions: support updated permissions table in the manifest
- Update the example manifest.
- Validate the values are short, single line strings.
2024-06-06 17:42:20 +10:00
Campbell Barton
d5850809cd Cleanup: update Makefile to quite mypy errors, remove redundant check 2024-06-06 17:40:24 +10:00
Pratik Borhade
1395a958d7 Fix #122788: Typo in python api docs 2024-06-06 12:49:29 +05:30
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
846f86d1ad Cleanup: spelling in comments 2024-06-06 11:35:00 +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
Hans Goudey
b99d98e826 Cleanup: Sculpt: Adjust naming of undo step struct
Change `UndoSculpt` to `StepData` and `usculpt` to `step-data`.
Previously it wasn't clear that the struct contained the data for a
single undo step and wasn't some more general thing.
2024-06-05 21:04:44 -04:00
Hans Goudey
5b73bc5db2 Cleanup: Sculpt: Avoid unnecessary function prefixes in undo code
These are redundant with the `sculpt_paint::undo` namespace.
2024-06-05 21:04:44 -04:00
Hans Goudey
0eb4981674 Cleanup: Sculpt: Avoid separate declarations for retrieving undo nodes 2024-06-05 21:04:44 -04:00
Hans Goudey
0365e7f2d7 Cleanup: Remove unused context pointer in sculpt undo step 2024-06-05 21:04:44 -04:00
Hans Goudey
b3506feaf9 Refactor: Sculpt: Avoid pushing undo node to retrieve original data
It's semantically wrong to "create" undo system data just to retrieve
it as original data. This is similar to 28f2383477 which
already made this change in a few places.
2024-06-05 21:04:44 -04: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
d98a7a7756 Merge branch 'blender-v4.2-release' 2024-06-06 10:23:16 +10:00
Campbell Barton
809be0c8e0 Extensions: disable translation for labels such as URL & repo name 2024-06-06 10:20:13 +10:00
Lukas Stockner
b9b7de143d Cycles: Update baking test after seed change 2024-06-06 02:15:32 +02:00
Campbell Barton
e60887c642 Cleanup: address mypy warnings 2024-06-06 10:07:13 +10:00