Commit Graph

1834 Commits

Author SHA1 Message Date
Damien Picard
f87d4e4e40 I18n: Extract and disambiguate a few messages
Extract
- Cycles denoiser enum.
- Extensions user preferences UI.
- Node operator poll message from new node function.

Improve
- Split "(Enabled|Disabled) on startup, overriding the preference."
into two messages.

Disambiguate
- "Add" when describing the action of adding something should use the
  Operator context.
- "Dimensions", in noise textures.
- "Transform" as a noun, the matrix transform type of Geometry Nodes,
  as opposed to the verb to move things in space.
- "Parent" as a noun or verb (the parent of an object, to parent an
  object to another).

Some issues reported by Satoshi Yamasaki, deathblood, and Gabriel Gazzán.

Pull Request: https://projects.blender.org/blender/blender/pulls/122969
2024-06-13 12:15:55 +02:00
Dalai Felinto
77a69d04f2 Extensions: Changes to the translatable tags table
* Drop the repository - let's combine tags in a single list (per type)
  to avoid duplications in the future.

* Give a more sensitive name for tthe property, to avoid tags.tags.
2024-06-13 10:17:10 +02:00
Brecht Van Lommel
c3dcad64c7 Fix #122989: Enabling installed legacy add-on fails without scripts folder
Needs to happen after refreshing the paths.
2024-06-12 18:36:55 +02:00
Campbell Barton
c6680ce7ca Extensions: include the version by default when building packages
Use the `{manifest_id}-{version}.zip` for the generated file
unless an explicit name is given.

Exclude all *.zip files located in the package root.
2024-06-12 22:38:32 +10:00
Campbell Barton
bda9a44785 Extensions: use "v1" version for the generated repository meta-data 2024-06-12 22:38:32 +10:00
Sergey Sharybin
2cdd9c1b2c Fix: Syntax error after recent extensions change
Caused by 4d8eea1402.
2024-06-12 12:08:59 +02:00
Campbell Barton
4d8eea1402 Extensions: convert package listings into a dictionary when loaded
Changes to the remote repository JSON format hadn't been properly
accounted for, a quick-fix was left in that converted the JSON
package listing into a dictionary as it was accessed (every redraw).

Update the behavior to perform the conversion when loading the data
from the JSON. This is also needed for multi platform & blender-version
support.
2024-06-12 16:50:08 +10:00
Campbell Barton
c99a40b286 Extensions: basic validation of remote repository data
Prevent non-compliant data in remote repositories from causing errors
in Blender's interface.

Move from a dictionary to a named-tuple which uses normalized values.
2024-06-12 15:13:04 +10:00
Campbell Barton
820fc124d4 Extensions: store repository data in a named tuple
No functional changes, adding more specific typing information helps
with further improvements.
2024-06-12 12:41:40 +10:00
Campbell Barton
cd741650d0 Fix incorrect check for the extension manifests time-stamp
The time-stamp on the directory was checked, not the manifest file.
2024-06-12 12:36:55 +10:00
Campbell Barton
eaa3f4c034 Cleanup: double-quote plain text strings 2024-06-12 10:56:12 +10:00
Miguel Pozo
6f724b83c6 Fix #122929: Freestyle options not visible in view layer properties (EEVEE) 2024-06-11 21:22:27 +02:00
Dalai Felinto
188b6fd3d0 Extensions: List of tags to be used for translation
Internal module used for translation.

Pull Request: https://projects.blender.org/blender/blender/pulls/123069
2024-06-11 17:42:56 +02:00
Damien Picard
f9c2758c85 Actually extract n_() message
Forgot to commit the actual functional part...

Pull Request: https://projects.blender.org/blender/blender/pulls/122971
2024-06-11 15:09:14 +02:00
Damien Picard
602b26f461 I18n: Disambiguate messages from custom properties
These messages are part of enum items not directly used by their
EnumProperty, because they are returned by a function. They cannot be
accessed in RNA at all times, and need to be extracted manually.
2024-06-11 15:09:09 +02:00
Campbell Barton
43356044eb Extensions: add the ability to create a repository that doesn't exist
When dropping a URL from an unknown repository add a dialog to support
adding a new repository.
2024-06-11 22:37:29 +10:00
Campbell Barton
f7d5d6d88f Fix error canceling an extension operator before it's started 2024-06-11 22:37:29 +10:00
Damien Picard
df2ee7298c I18n: Make Node Wrangler's support level OFFICIAL
The bl_info dictionary is deprecated for most extensions, but it is
still used for core add-ons and since Node Wrangler is now built-in,
it should be marked as official.

The reason for this change is actually that it enables translation of
the Node Wrangler UI, because add-ons below official support level
were never considered for translation.

-----

The reason only OFFICIAL add-ons are translated is that they are enabled [here](4f36fb1afe/scripts/modules/bl_i18n_utils/bl_extract_messages.py (L1052)) during message extraction.

Pull Request: https://projects.blender.org/blender/blender/pulls/123043
2024-06-11 14:30:32 +02:00
Jeroen Bakker
bb9e3df6d2 Fix #122766: Add missing Fast GI options to raytracing presets
The UI has changed and fast GI options was moved to the raytracing
panel in the UI. When this was done they were not added to the
raytracing presets what adds confusion when adding the presets.

This PR adds the fast GI options to the presets.

Pull Request: https://projects.blender.org/blender/blender/pulls/123061
2024-06-11 14:07:03 +02:00
Campbell Barton
12ff1ffe5b Extensions: remove add-ons which don't have a built-in upgrade opton
Previously these were shown as missing add-ons, since they have been
intentionally removed, remove them as part of versioning instead
of showing them as "Missing Add-ons". This is especially important
for X3D & STL which were enabled by default which meant any user
loading 4.1 preferences would have them shown as missing add-ons.
2024-06-11 19:53:38 +10:00
Campbell Barton
b46f6a4007 Extensions: add sub-modules that weren't being reloaded 2024-06-11 16:19:21 +10:00
Campbell Barton
a24add4a66 Extensions: support read-only system repositories
Local repositories no longer convert manifest files into a JSON file
(that matched the format of the remote repositories JSON data).
Instead the data is loaded directly from the manifest files.

This is necessary to support read-only "System" repositories.

Use a class to generalize loading from both data sources to simplify the
implementation which was previously inlined.

This fixes an error where stale data from the manifests was
sometimes used because the generated JSON was considered up to date.
2024-06-11 15:59:29 +10:00
Aaron Carlisle
38df2148f5 Docs: Update rna manual references 2024-06-10 23:55:55 -04:00
Campbell Barton
714d5515a3 Unbreak extensions test 2024-06-11 13:38:04 +10:00
Clément Foucault
e6ca5f00d5 EEVEE-Next: Rename lightprobe volume single sided to backface cull
This also modifies the RNA access path for consistency.
This was a long standing change that was oversighted.
2024-06-10 22:34:26 +02:00
Campbell Barton
c3067dd62d Extensions: group refresh actions in the menu
- Rename "Check for Updates" to "Refresh Remote"
- Rename "Refresh All" to "Refresh Local"
2024-06-10 23:14:53 +10:00
Campbell Barton
c0754209ef Extensions: suppress warnings when repository directories don't exist
Re-calculating statistics for outdated packages printed exceptions
whenever the repository directory didn't exist.
2024-06-10 22:46:20 +10:00
Campbell Barton
554b3c5bd9 Extensions: support custom-directory for system repositories
While this is reasonably obscure, not supporting this caused the UI
to be confusing and there is no strong reason not to support this.
2024-06-10 22:22:07 +10:00
Campbell Barton
0838e99979 Extensions: only show "use_cache" for remote repos
This option only makes sense for remote repos.
2024-06-10 22:22:05 +10:00
Campbell Barton
26bddd6c66 Fix error adding a repository when offline
Workaround the exception although other methods of syncing that
don't call the operator are worth investigating.
2024-06-10 21:39:19 +10:00
Campbell Barton
e0612b3c03 Fix undefined variable use when an extension repo has no remote data 2024-06-10 21:26:45 +10:00
Damien Picard
de139dd7e4 UI: Fix and improve a few messages
- "Show the result of running commands in the main interface...": add
  punctuation.
- "Re-Installed" -> "Reinstalled" seems more common.
- "increase_" and "decrease_subdivision" in the Grease Pencil
  modal...: use title case instead of snake case for label.
- "Use a automatic number..." -> "an", typo.
- "... points,{} splines": missing space.
- "End Frame is larger than Start Frame": wrong order in error message.
- "Approximate the object as sphere, which diameter is equal to
  thickness the defined...": grammar.
- "Show Seconds" -> "Use Timecode": this option is not necessarily about
  seconds. Suggested by Pablo Vasquez.
- Brightness and contrast node input descriptions: add missing spaces.
- "Gamma controls the relative intensity... full white.": remove
  trailing ".".

Pull Request: https://projects.blender.org/blender/blender/pulls/122972
2024-06-10 13:26:05 +02:00
Richard Antalik
6dfed3a021 Fix #122895: Frame change does not work in VSE mixed view
Add timeline version of tweak tool to timeline+preview mixed view.

This was removed in 8c53a18c48. Previously tools combined keymaps for
both preview and timeline, but in combined view preview operators were
disabled.

Pull Request: https://projects.blender.org/blender/blender/pulls/122992
2024-06-10 13:20:03 +02:00
Damien Picard
a5df83167e I18n: Fix add-on extraction
- The "location" and "warning" fields in bl_info are no longer exposed
  in the interface, so there is no need to extract them any more.

- Some add-ons do not define a description (Copy Global Transform for
  example), so they should be skipped.

- Some third-party legacy add-ons do not use the 'support' field, and
  that can cause an error in extraction. Since this won't happen
  for built-in add-ons, checking that an add-on is built-in is enough.

Pull Request: https://projects.blender.org/blender/blender/pulls/122970
2024-06-10 11:13:10 +02:00
Nathan Burnham
852d658a85 PyAPI Doc: fix formatting error
Ref: !122983
2024-06-10 17:01:00 +10:00
Campbell Barton
5fda92a44f Extension: defer loading extensions JSON/TOML meta-data until needed
Repositories JSON & manifests were being loaded at startup.
Lazily load this data to prevent unnecessary overhead.
2024-06-10 00:24:00 +10:00
Campbell Barton
b4ea8583ed WM: correct logic for resetting add-ons & caching meta-data
All add-ons were being scanned at startup, while this didn't cause
errors it was noticeable with extensions where any errors in the
manifest were being reported at startup, even when running with
factory-startup (including blender's own tests).

Address two issues:

- The logic to "reset" add-ons, so as to match the preferences when
  reverting or resetting preferences always ran on startup.
  This occurred because a check for Python being initialized was
  incorrectly used to detect that this wasn't the first time preferences
  were being loaded (regression in [0]).

- Resetting add-ons scanned all add-ons (including disabled add-ons) to
  ensure their module cache is up to date. Since this the cache is
  lazily initialized, it's simpler to set it as uninitialized as
  resetting the add-ons doesn't require the cached meta-data.

[0]: 497bc4d199
2024-06-10 00:22:56 +10:00
Campbell Barton
ff5909e441 Extensions: restore the "Refresh" operator
The old add-ons UI had a "Refresh" operator that would re-scan
the file-system and show any changes.

Add an equivalent operator that works for both extensions and legacy
add-ons and add it to the extension menu.

This is useful for a few situations:

- Refresh based on changes to "System" repositories which are read-only
  from Blender and intended to be manipulated outside of Blender.
- Anyone managing their own "User" repository.
- For developers to create extensions, where re-starting to see changes
  to meta-data is inconvenient.
- Troubleshooting problems parsing extension meta-data as problems are
  reported to the operator.
2024-06-09 20:20:27 +10:00
Campbell Barton
b0232b4e0e Cleanup: various warnings from pylint for extensions & addons 2024-06-08 23:33:45 +10:00
Campbell Barton
5f06d3aa17 Extensions: consider system repositories read-only
The following operations have been removed for system repositories:

- Installing from disk.
- Uninstall extensions.
- Delete files (when removing the repository).

Also change the operator to remove a repository so the option to
remove files is now a boolean instead of an enum. While a dynamic
enum can be made to work, this option is logically a boolean.
2024-06-08 23:04:17 +10:00
Campbell Barton
09ae9377f1 Extensions: reduce the timer frequency to avoid too much overhead
Since these actions are no longer blocking, 100 times a second could
add unnecessary overhead (although updates are only shown when changes
are detected). Nevertheless, reduce the frequency to 10 times a second.
2024-06-08 13:32:26 +10:00
Campbell Barton
4547f4106a Extensions: use the operators cancel callback shutdown processes
When installing extensions, the user could exit Blender which wasn't
being handled properly - the processes would be left running and raise
a broken pipe error (on Linux).

Resolve this by canceling the processes, matching the behavior of when
escape is pressed.

This means exiting Blender while installing/updating wont leave the
repositories in an unknown state.
2024-06-08 13:32:25 +10:00
Campbell Barton
4718d68349 Extensions: expose extensions debug option in release builds
These are useful for more verbose output and expose useful utilities
for development.
2024-06-08 13:32:24 +10:00
Harley Acheson
d08cebf6d7 Fix #122838: Save and Removal of Themes with Multi-Word Names
In Preferences / Themes you can add a new theme with a name that has
multiple words and the resulting file name will have spaces converted
to underscores. Unfortunately such multi-word themes will not pass the
poll function for saving and deletion. This PR just adds calls that
convert from the display name to file name in order for these to work.

Pull Request: https://projects.blender.org/blender/blender/pulls/122848
2024-06-07 20:20:06 +02:00
Campbell Barton
451141a77a Extensions: make install/upgrade non-blocking
Run extension commands as a non-blocking operator.
2024-06-08 00:44:44 +10:00
Campbell Barton
c0f39e7b40 Extensions: correct 3D coat mapping 2024-06-07 21:44:14 +10:00
Thomas Barlow
eb7a2f47d2 Fix #122794: FBX Subsurf Export applies the last Subsurf modifier
Disabling the last Subdivision Surface modifier was removed by mistake
in
blender/blender-addons/commit/bc801d7b1dad4be446435e0cab4d3a80e6bb1d04

This patch restores the mistakenly removed code that disables the last
Subdivision Surface modifier when the option to export FBX Subdivision
Surface is enabled.

The add-on's patch version has been increased.

Pull Request: https://projects.blender.org/blender/blender/pulls/122841
2024-06-07 12:55:29 +02:00
Campbell Barton
059dc93cde Extensions: support refreshing local repositories when offline
Since [0] there was no way to refresh local repositories,
with the poll messages suggesting to restart Blender to see updates
which isn't practical for developers.

The ability to refresh was prevented when "Online Access" was disabled,
meaning a developer couldn't easily develop their own add-ons unless
they were online.

[0]: 651621da0d
2024-06-07 17:36:59 +10:00
Campbell Barton
3dd8c826b5 Extensions: correct the descriptions for active repository actions 2024-06-07 16:52:51 +10:00
Campbell Barton
dc0e559cbb Extensions: remove intermediate operators for upgrade and sync
The buttons to upgrade or sync extensions called extension
operators via bpy.app.handlers, requiring awkward glue-code
which didn't show error reports in to the user.

Remove these operators and call the upgrade & sync operators directly.
2024-06-07 16:33:03 +10:00