Commit Graph

478 Commits

Author SHA1 Message Date
Campbell Barton
c4ed24ce9f Merge branch 'blender-v4.2-release' 2024-07-11 17:57:00 +10:00
Campbell Barton
569ccbec59 Merge branch 'blender-v4.2-release' 2024-07-11 17:56:58 +10:00
Campbell Barton
319684d8f6 Extensions: warn when extensions violate module policies
As each extension has it's own package, any modules it includes must be
imported as sub-modules. Warn if extensions are including themselves
in the sys.path as this breaks name-spacing of extensions.

Show these warnings in the add-on & extensions UI.
2024-07-11 17:50:30 +10:00
Campbell Barton
0bfea7caea Extensions: fix error it tests where the local repo wasn't cleared
Tests interfered with each other because the local repo path wasn't
cleared between different tests.
2024-07-11 17:37:31 +10:00
Campbell Barton
dffbd44631 Merge branch 'blender-v4.2-release' 2024-07-11 11:23:39 +10:00
Campbell Barton
69fd60b41a Extensions: update tests from changes to repo-list 2024-07-11 11:22:30 +10:00
Campbell Barton
3d87112bbd Merge branch 'blender-v4.2-release' 2024-07-11 11:13:06 +10:00
Campbell Barton
3c567ce171 Merge branch 'blender-v4.2-release' 2024-07-11 11:13:03 +10:00
Campbell Barton
1ff66501b4 Merge branch 'blender-v4.2-release' 2024-07-11 11:12:59 +10:00
Campbell Barton
0c01a01133 Extensions: add command line "repo-add --access-token" support 2024-07-11 11:06:57 +10:00
Campbell Barton
f59e872b3b Extensions: show "source" & access-token in the repo-list sub-command 2024-07-11 11:06:21 +10:00
Campbell Barton
375b173d67 Extensions: correct help text for the "build" command 2024-07-11 10:18:45 +10:00
Campbell Barton
41fe7b0d27 Merge branch 'blender-v4.2-release' 2024-07-10 17:42:42 +10:00
Campbell Barton
7ee6451a51 Extensions: support adding system repositories via the command line 2024-07-10 17:39:06 +10:00
Campbell Barton
d44b96bf07 Merge branch 'blender-v4.2-release' 2024-07-09 20:41:11 +10:00
Campbell Barton
3a29e25d21 Extensions: expand on the error report when a repository is locked
- Include the repository name.
- Add a hint for force-unlocking the repository.
2024-07-09 20:39:23 +10:00
Campbell Barton
13200f1f60 Merge branch 'blender-v4.2-release' 2024-07-09 19:49:51 +10:00
Campbell Barton
987a027326 Merge branch 'blender-v4.2-release' 2024-07-09 19:49:49 +10:00
Campbell Barton
29f5d56359 Merge branch 'blender-v4.2-release' 2024-07-09 19:49:46 +10:00
Campbell Barton
b44d5cb5af Fix unhandled exception when updating legacy add-ons to extensions 2024-07-09 19:45:18 +10:00
Campbell Barton
f4231418e9 Extensions: limit the size of the data read from the lock-file
Avoid reading a large amount of data if the lock file
inexplicably contains large amounts of data.
2024-07-09 19:37:12 +10:00
Campbell Barton
1ffde9338d Extensions: support force unlocking a repository
When the repository is owned by another Blender session,
support removing the file-system lock.

This is accessible from a menu in the repository popover.

This is needed if Blender exits unexpectedly while a repository
is being modified (typically install/upgrade).

Addresses #122135.
2024-07-09 19:27:32 +10:00
Campbell Barton
d06c79958c Merge branch 'blender-v4.2-release' 2024-07-09 15:43:02 +10:00
Campbell Barton
912194390a Extensions: ensure generated strings in the TOML file are valid
While this wasn't likely to cause any problems in practice,
using the sub-command "build --split-platform" with a platform
containing any characters that need escaping would have produced a TOML
with invalid syntax.

Add a utility function that's guaranteed to create a valid TOML string.
2024-07-09 15:32:09 +10:00
Fermin
ad58c9eaca XR: Add passthrough support for Meta Quest devices
Uses the OpenXR extension XR_FB_PASSTHROUGH_EXTENSION_NAME,
compatible mainly with the Meta Quest family of devices.

Currently, passthrough support over OpenXR is disabled by default
in the Quest Link app, and must be manually enabled in its settings
to use this feature.

The performance of the passthrough render varies with the quality
of the connection between the headset and the PC. For better results,
connecting the headset directly through USB to the PC, or at least
connecting the PC to the local network over ethernet, is recommended.

Thanks a lot to [KISKA](https://kiska.com/)
for their support in the development of this feature.

Pull Request: https://projects.blender.org/blender/blender/pulls/124204
2024-07-09 06:10:17 +02:00
Harley Acheson
4e98eebab8 Merge branch 'blender-v4.2-release' 2024-07-08 10:14:03 -07:00
Harley Acheson
987b781412 UI: Various Grammar Changes for Extensions
Various minimal grammar changes in the new Extensions system. For
example changing "Please turn Online Access on the System settings" to
"Please turn Online Access on in the System settings"

Pull Request: https://projects.blender.org/blender/blender/pulls/124262
2024-07-08 19:12:56 +02:00
Jesse Yurkovich
5bb5cfd97a Merge branch 'blender-v4.2-release' 2024-07-08 09:07:07 -07:00
Falk David
07bc687785 Python: Define attribute groups based on AttributeOwnerType
The function `rna_def_attributes_common` assumed that the owner of the
attributes is an `ID`. This PR refactors the code to partially remove this
assumption.

The `rna_def_attributes_common` function now takes an argument
`AttributeOwnerType type` that defines what `AttributeGroup` should be used.

This is in preperation for #116043 where we want to use
`rna_def_attributes_common` for grease pencil drawings, which are not IDs.

In addition to the refactor explained above, this also changes the API
slightly:
Previously, the `AttributeGroup` defiend `active_color`,
`active_color_index`, `active_color_name`, `default_color_name`, and
`render_color_index` for all IDs. These properties could only be used by
meshes. So this PR seperates the `AttributeGroup` type into one type
per attribute owner: `AttributeGroupMesh`, `AttributeGroupPointCloud`,
`AttributeGroupCurves`, and `AttributeGroupGreasePencil`.
As such the properties mentioned above are now only usable by meshes.

Note that this technically breaks the API and will have to be noted in the
release notes.

Pull Request: https://projects.blender.org/blender/blender/pulls/123658
2024-07-08 17:11:21 +02:00
Hans Goudey
4e6a962b2b Fix #120590: FBX import gives sharp edges for non-normalized normals
A few files included in reports contained normals that were not normalized.
In order to contain consistent normals around smooth corner fans, sharp
edges are added when neighboring corner normals aren't close enough.
Non-unit-vector normals also triggered this check.

Blender used to do this implicitly when the derived `MeshLoop.normal`
value was set. That API has been changed already, and it's clearer if the
addon provides normalized normals, so this PR adds a normalization
step to the FBX importer.

Pull Request: https://projects.blender.org/blender/blender/pulls/124261
2024-07-08 17:09:22 +02:00
Sybren A. Stüvel
9d3dc77e05 Anim: move Bone Selection Sets add-on into Blender
The functionality of the Bone Selection Sets add-on is now integrated
into Blender itself. Rigify has been updated to no longer check for the
add-on, but just assume that the functionality is available.

The keymap is still the same, and so are all the class names. This
ensures that there are no conflicts when people still have the old
add-on enabled somehow. And there is versioning code to remove the
'add-on enabled' state so that Blender won't complain it cannot find it
any more.

Compared to the add-on, the following changes are made:

- The 'bone' icon has been removed from the list of available selection
  sets. It was the same for each entry anyway, and thus didn't provide
  any information.
- The code has been split up into multiple files, with the UI elements
  in `scripts/startup/bl_ui/properties_data_armature.py` and the
  operators in `scripts/startup/bl_operators/bone_selection_sets.py`.
- Helper functions and classes are prefixed with `_` to indicate that
  they are not part of any public API.
- The `Operator` helper subclasses have been transformed to mix-in
  classes. This way the only subclasses of `Operator` are the actual
  operators.
- Comments & descriptions have been updated for clarity & consistency.

This commit contains code by the following authors, ordered by number of
commits in the original add-on repository, highest first:

Co-Authored By: Ines Almeida <britalmeida@gmail.com>
Co-Authored By: Sybren A. Stüvel <sybren@stuvel.eu>
Co-Authored By: Campbell Barton <ideasman42@gmail.com>
Co-Authored By: meta-androcto <meta.androcto1@gmail.com>
Co-Authored By: Demeter Dzadik <Mets>
Co-Authored By: lijenstina <lijenstina@gmail.com>
Co-Authored By: Brecht Van Lommel <brechtvanlommel@gmail.com>
Co-Authored By: Aaron Carlisle <carlisle.b3d@gmail.com>

For the full history see the original add-on at:
https://projects.blender.org/blender/blender-addons/commits/branch/main/bone_selection_sets.py

Reviewed On: https://projects.blender.org/blender/blender/pulls/124343
2024-07-08 16:28:42 +02:00
Sybren A. Stüvel
ef669e3b99 Anim: fix Rigify bone selection set generation code
The "create selection set for bone collection" function was checking for
bone collection membership the wrong way. This is now fixed.

Reviewed On: https://projects.blender.org/blender/blender/pulls/124343
2024-07-08 16:28:42 +02:00
Campbell Barton
df162e5f1b Merge branch 'blender-v4.2-release' 2024-07-08 22:36:13 +10:00
Damien Picard
e9de6b5e7a I18n: More translation fixes for Rigify
Allow translation of a few missing messages in the Rigify add-on. In
particular, the most important "Generate Rig" button!

Some issues reported by Gabriel Gazzàn.
2024-07-08 13:00:08 +02:00
Campbell Barton
e52783033d Merge branch 'blender-v4.2-release' 2024-07-08 15:31:44 +10:00
Campbell Barton
9bbf269fe3 Extensions: suppress all pylint warnings & handle add-on errors
- Suppress pylint warnings via comments or be minor changes.
- Any errors disabling add-ons before upgrading or uninstalling are now
  reported to the operators.
- Disable cyclic import warning is it's impractical to resolve.
- Enable useless-suppression warning.
2024-07-08 15:29:27 +10:00
Campbell Barton
817efe4aef Merge branch 'blender-v4.2-release' 2024-07-08 13:33:34 +10:00
Campbell Barton
05feac04fa Extensions: minor changes to error handling & uninstalling
- Any change that cases validate to fail reports a fatal_error.
- If removing a package fails, attempt to the remove cache.
2024-07-08 13:27:58 +10:00
Campbell Barton
bae1d3311f Merge branch 'blender-v4.2-release' 2024-07-08 13:05:49 +10:00
Campbell Barton
ac6e216b26 Merge branch 'blender-v4.2-release' 2024-07-08 13:05:45 +10:00
Campbell Barton
74f8ac15f5 Extensions: "build --split-platform" now includes it's own wheels
The `[build.generated]` section now includes a filtered list of wheels
to simplify checking existing wheels on the server.

Also disallow quotes & control characters in wheel paths because they
already shouldn't be used and doing so would cause escaping issues in
the generated TOML.

Implements #124242.
2024-07-08 12:50:43 +10:00
Campbell Barton
f3630777f6 Extensions: show add-on errors in the add-ons panel
Restore the UI from 4.1. Also correct an error when extensions are
disabled.
2024-07-08 11:36:52 +10:00
Campbell Barton
a515da841b Merge branch 'blender-v4.2-release' 2024-07-07 17:51:42 +10:00
Campbell Barton
5877efbec3 Extensions: add missing checks for errors in IO, JSON & TOML data
Exceptions need be caught and forwarded so they show it in Blender's
interface. While most common errors where accounted for, various IO
errors & malformed JSON/TOML could cause internal operations to fail
with unhandled exceptions.
2024-07-07 17:43:33 +10:00
Campbell Barton
08bf742302 Merge branch 'blender-v4.2-release' 2024-07-06 15:00:43 +10:00
Campbell Barton
11b1919bcf Extensions: resolve popup glitches when dropping URL's
Use UILayout::template_popup_confirm to replace workarounds that didn't
work very well.

- Resolve "Add Repository..." button in the dialog not closing the
  popup when pressed.
- Add a "Cancel" button while the remote resository data is
  downloading.
- Remove the hack to scale the UILayout to hide the existing
  confirm/cancel buttons.

Resolves #124098.
2024-07-06 14:49:41 +10:00
Campbell Barton
8250ac142f Merge branch 'blender-v4.2-release' 2024-07-05 20:49:47 +10:00
Campbell Barton
337abcdfc1 Merge branch 'blender-v4.2-release' 2024-07-05 20:49:45 +10:00
Campbell Barton
a53aad6f73 Extensions: refactor message logging into a class
Pass a logging class between functions instead of a function. Has the
advantage that different kinds of messages are exposed as methods.
2024-07-05 20:46:40 +10:00
Campbell Barton
08b75549e3 Extensions: add a new error type "FATAL_ERROR"
Some errors were reported as warnings because they didn't prevent the
operation from completing (such as failing to remove some paths when
uninstalling).

Change message types for the extensions internal command line program:

- Add "fatal error" to use when an operation fails and exits with a
  non-zero error code.
- Use "error" when an operation fails which doesn't prevent other
  actions from succeeding.
- Use "warn" reporting issues what don't prevent the operation
  from completing but may cause problems.
2024-07-05 20:46:40 +10:00