Commit Graph

527 Commits

Author SHA1 Message Date
Campbell Barton
54153629f4 Fix #127329: Keyboard interrupt doesn't work from Python 2024-09-11 14:30:51 +10:00
Julien Duroure
780721de19 glTF exporter: fix error message if hook failed 2024-09-01 15:16:27 +02:00
Julien Duroure
c132bd896f glTF exporter: children type check refactoring 2024-08-30 06:56:34 +02:00
Julien Duroure
11451a2082 glTF export: Add logging level control for export
This was already the case at import
2024-08-30 06:48:07 +02:00
Julien Duroure
4dad2a567d glTF: Use wait cursor instead of empty % cursor 2024-08-30 06:43:52 +02:00
Julien Duroure
8d575d3c85 glTF exporter: Enable exporting joint leaf at tail of leaf bones 2024-08-30 06:42:26 +02:00
Julien Duroure
5122255739 glTF: Manage Quaternion and Matrix attribute types for custom attributes 2024-08-30 06:39:52 +02:00
Julien Duroure
58141b7396 glTF exporter: set udim material names with tile number 2024-08-30 06:37:34 +02:00
Julien Duroure
69ab986370 glTF exporter: Regression: RGB to Shader socket unlit management 2024-08-30 06:29:42 +02:00
Julien Duroure
7c6975f6c8 glTF exporter: avoid double export
Make sure to not check instances inside instances collection when GN instance is enable.
2024-08-30 06:26:47 +02:00
Julien Duroure
6191eb1e9d glTF exporter: Fix custom prop when apply modifier
Since 4.2, props are Statically Typed
so no need to copy them in that case, because overwriting them will crash
2024-08-30 06:23:11 +02:00
Julien Duroure
42840ded01 glTF exporter: Fix UI after Blender changes 2024-08-30 06:20:04 +02:00
Julien Duroure
4e5093130c Fix #126920 glTF: Cleanup - file renaming
Long filepaths cannot be unzipped (by default) on Windows, so cleaning filenames to avoid too long paths
2024-08-30 06:00:10 +02:00
Alaska
2fd2af86e8 Fix incorrect export FBX time
Ref: !125717
2024-08-28 12:30:56 +10:00
Andrej730
798fbe7dbd Fix: Typo in extensions repository lock info message
`Fore` -> `Force`

Pull Request: https://projects.blender.org/blender/blender/pulls/126778
2024-08-26 12:28:52 +02:00
Bastien Montagne
c1aef6b4b0 Cleanup: make format 2024-08-19 14:26:53 +02:00
Bastien Montagne
d3589270d4 I18N tools: disable multi-processing for the time being.
Not sure why, but today I got almost systematic deadlocks in the
ProcessPoolExecutor calls (and similar issues with direct usage of
multiprocessing)... For now synchronous single process will do.
2024-08-19 13:52:48 +02:00
Campbell Barton
8a7ff41a85 Cleanup: wrap long lines in Python scripts 2024-08-19 10:48:07 +10:00
Bastien Montagne
473456323f I18N: Extraction tools: Add timeout to async multi-processing.
Once in a while these get (dead)locked for some reason, at least avoid
having to kill the whole Blender then.
2024-08-12 13:00:46 +02:00
Bastien Montagne
7d52265771 Fix several issues with i18n tools on non-linux platforms.
- Paths of C++-parsed files were not properly 'unixified' on Windows.
  This was bad both for changes noisyness in PO files, and broke on
  the un-escaping of `\n` and `\t` sequences.
- The `ProcessPoolExecutor` starts sub-processes differently on Linux
  than on Windows or OSX. While Linux's `fork` keeps the same
  environment (i.e. all Blender stuff remains available in workers
  subprocesses), the 'spawn' used on Windows (and reportedly OSX) starts
  a new bare python interpreter. This means that code executed by these
  needs to be Blender-agnostic to be portable.

The only thing that is currently known broken on non-Linux platforms is
the RTL processing of some languages like Arabic or Hebrew.
2024-08-10 17:35:28 +02:00
Campbell Barton
f8e06a5f5f Fix #125763: Uninitialized extension repos printing warnings on startup
Since [0] missing repository directories printed a warning on startup.

When checking for blocked extensions on startup, skip directories
that don't exist & don't print any warnings if the repository data
hasn't been downloaded.

[0]: 656fe6d3e4
2024-08-06 20:53:41 +10:00
Campbell Barton
fc6a99e0d2 Fix #77837: Error removing addons/extension/wheels on WIN32
When deleting files on WIN32, open files cannot be removed.
This is especially a problem for compiled Python modules which
remain open once imported.

Previously it was not as common for add-ons to include compiled Python
modules however with extensions supporting Python-wheels,
it's increasingly likely users run into this.

Workaround the problem by:
- Scheduling the files for removal next time Blender starts.
- Rename paths that cannot be removed to avoid collisions when
  the paths is reused (re-installing for example).

This is supported for:
- Extensions.
- Python wheels.
- Legacy user add-ons.
- App-templates.

Details:
- On startup, a file exists that indicates cleanup is needed.
  In the common case the file doesn't exist.
  Otherwise module paths are scanned for files to remove.
- Since errors resolving paths to remove could result in user data loss,
  ensure the paths are always within the (extension/addon/app-template)
  directory.
- File locking isn't used, if multiple Blender instances start at the
  same time and try to remove the same files, this won't cause errors.
  Even so, remove the checking file immediately avoid unnecessary
  file-system access overhead for other Blender instances.

Also resolves #125049.
2024-08-05 09:49:14 +10:00
Campbell Barton
805f66c5c4 Extensions: restore fix for removing extensions with symlinks
Regression from [0], removed the fix for #123827.

[0]: 08b75549e3
2024-08-04 20:52:00 +10:00
Campbell Barton
ef505727c6 Fix error where upgrading an extension always enabled it
Upgrading disabled extensions should never enable them.
2024-07-31 13:50:22 +10:00
Campbell Barton
14b03fca3c PyAPI: add bpy.app.python_args, use when calling Python from Blender
Expose arguments to use when creating a Python sub-process.

Python could fail to start when loaded in a customized environment,
with PYTHONPATH set for e.g. Blender ignores these and loads but a
Python sub-process attempts to use these environment variables which
may point to incompatible Python versions.

Resolve the root cause of #124731.
2024-07-31 11:59:23 +10:00
Sybren A. Stüvel
ba1f7caffa Fix #125226: Anim: Rigify limbs.spline_tentacle doesn't generate correctly
A template string was accidentally turned into an f-string in
78b9218c98, which changes the way it is
evaluated. Easy enough to roll back that one change.
2024-07-30 16:13:27 +02:00
Campbell Barton
3a88af5402 Fix #125660: Extensions fail to sync HTTPS repositories on WIN32
Workaround: `[ASN1] nested asn1 error` error when making HTTPS
connections on systems with certificates that OpenSSL cannot parse
are installed.

This is a general issue with Python, resolve by applying a proposed
fix [0] to the extensions Python process at run-time.
(this doesn't impact Blender's Python run-time).

The down side is HTTPS connections will only work for extensions
on systems with this problem so this needs to be resolved by Python
long term.

While any changes to Python's SSL checks is worth avoiding,
this simply skips SSL certificates in the windows store that OpenSSL
can't parse instead of failing all SSL connections.

See related issues:

- https://github.com/python/cpython/issues/79846
- https://github.com/openssl/openssl/issues/25023

[0]: https://github.com/python/cpython/pull/91740

Ref !124943.
2024-07-30 22:49:21 +10:00
Campbell Barton
656fe6d3e4 Extensions: support "blocklist" in the remote repository
Support blocking extensions so there is a way for the maintainers of
the remote repository to notify the user if one of their installed
extensions blocked along with a reason for blocking.

Blocked extensions cannot be installed from the preferences or by
dropping a URL.

When an installed & blocked extension is found:

- An icon int the status bar shows an alert,
  clicking on the icon shows the blocked extensions.
- The extensions preferences show a warning.
- The extensions & add-ons UI shows an alert icon
  and "details" section shows the reason.

Details:

- Blocked & installed extensions are shown first in the installed
  extensions panel.
- The internal "install" logic prevents downloading & installing
  blocked extensions.
- Blocked extensions can still be downloaded & installed from disk.
- The "list" command includes an error message if any installed
  extensions are blocked.
- The "server-generate" command can optionally take a configuration
  file that includes the blocklist for the generated JSON.

See design #124954.
2024-07-26 16:05:34 +10:00
Campbell Barton
8019ad8912 Fix unhandled exception for non dictionary items in extensions repo
Ensure items in the repository list are dictionaries.
2024-07-26 11:50:26 +10:00
Campbell Barton
b4d5c6eea5 Cleanup: remove unused imports 2024-07-26 10:26:11 +10:00
Campbell Barton
8da807684c Fix #122754: Extensions empty when filtering addons in the workspace 2024-07-24 14:09:50 +10:00
Campbell Barton
4cf9f53946 Cleanup: remove unused BUG_ADDON URL preset 2024-07-24 13:35:41 +10:00
Dalai Felinto
13f27ea0ae Fix #122858: Core extensions report bugs to add-on repository
Core extensions should have their bugs reported as any other issue in
Blender.

This PR removes their "Rrport a Bug" link.

I left the link only for glTF since it has its own tracker. But I
wouldn't mind removing it as well.

Ref: !125218
2024-07-24 13:28:48 +10:00
Julien Duroure
0e881a7772 glTF exporter: Fix UDIM export crash when not rectangular tile locations 2024-07-23 13:10:58 +02:00
Julien Duroure
0c836f7f1a glTF exporter: Fix row active UI and add tooltip 2024-07-23 11:42:19 +02:00
Julien Duroure
3d0db481f4 glTF exporter: avoid crash when animation + full collection hierarchy 2024-07-23 11:05:39 +02:00
Campbell Barton
1aa37c8df2 Extensions: require 3 numbers for blender_version_{min/max}
When validating the manifest, require 3 numbers to match the official
extensions web-site which expects this.

See #124885.
2024-07-23 17:06:57 +10:00
Campbell Barton
bc2e47622f Extensions: minor wording tweak (v -> version)
Consistent with other errors when the versions mismatch.
2024-07-23 15:59:01 +10:00
Campbell Barton
dc74a98b9e Cleanup: remove unused imports 2024-07-23 15:58:21 +10:00
Campbell Barton
38766fd018 Extensions: tweak wording when dropping an unknown extension
When dropping an extension from extensions.blender.org which is
still in the review queue - an error was shown making it seem like
the extension was not compatible with the system.

Adjust wording to clarify that it was not found in the remote repo
which can be caused by it not being part of the repository or when
it's incompatible.

Resolves #125046.
2024-07-23 15:28:48 +10:00
Campbell Barton
f3a0ecb4e2 Fix #124885: unable to use manifest with "X.X" blender version
Allow `blender_version_{min/max}` to contain 1..3 numbers.
2024-07-23 14:30:15 +10:00
George Mavroeidis
8fc617d8e2 Cleanup: Animation: Remove pose library UI hint about the new asset shelf UI
Remove the 'Pose Library' panel from the Animation tab, which showed
the UI hint and toggle for the new asset shelf.

Reporting issue: blender/blender#121779

Co-authored-by: George Mavroeidis <gdmavroeidis@hotmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/124839
2024-07-22 12:33:28 +02:00
Campbell Barton
68c2c9cb26 Fix #125142: Legacy add-ons don't install when "bl_info" is first
When "bl_info" was on the first line, the legacy add-on would not
install. Correct the check which would also incorrectly detect legacy
add-ons when "bl_info" wasn't found at all.
2024-07-22 13:03:36 +10:00
Campbell Barton
9a568f2227 Fix #124769: Startup notification error with multiple remote repos
Regression in [0] caused extensions checks used the same directory & URL
for all remote repositories when checking for updates on startup.

[0]: d2049f0aa7
2024-07-22 12:07:05 +10:00
Campbell Barton
c7a26cf5c2 Fix #124850: Add-on legacy replacement fails without remote repo data
When the user attempted to install a previously enabled add-on as an
extension after enabling online access and *without* viewing extensions,
installation would fail.

Resolve by adding a check that the remote repository data is available,
adding a button to refresh remote repositories if it's not.
2024-07-17 22:42:16 +10:00
Campbell Barton
6120b2f605 Merge branch 'blender-v4.2-release' 2024-07-14 21:19:45 +10:00
Campbell Barton
b5145d6889 Fix #121469: "Enable Add-on" ignored when already installed
The logic to handle disabling, upgrading & re-enabling extensions
incorrectly assumed all installed add-ons were enabled.

Resolve by only using this logic on installed & enabled add-ons.
2024-07-14 21:14:14 +10:00
Campbell Barton
607ad28604 Merge branch 'blender-v4.2-release' 2024-07-12 16:25:49 +10:00
Campbell Barton
3358f427dd Fix #124457: Error enabling installed extension after failure to load
When Blender started with an extension enabled from a repository that
referenced a directory that didn't exist - creating the directory
and extensions would fail to import the extension.

This happened because the missing state of the module was cached.

Resolve by clearing Python's path cache for the repository after
running install actions which may have created the directory.

Also run importlib.invalidate_caches() when manually refreshing local
extensions to ensure modules cached as missing can be imported if
they have become available.
2024-07-12 16:22:09 +10:00
Campbell Barton
c4ed24ce9f Merge branch 'blender-v4.2-release' 2024-07-11 17:57:00 +10:00