Commit Graph

189 Commits

Author SHA1 Message Date
Campbell Barton
c3b067dc80 Cleanup: single/double quote use in scripts 2024-10-16 14:45:08 +11:00
Campbell Barton
a7ab81d927 PyAPI: remove use of BaseException
BaseException was used as a catch-all in situations where it
didn't make sense and where "Exception" is more appropriate
based on Python's documentation & error checking tools,
`pylint` warns `broad-exception-caught` for e.g.

BaseException includes SystemExit, KeyboardInterrupt & GeneratorExit,
so unless the intention is to catch calls to `sys.exit(..)`,
breaking a out of a loop using Ctrl-C or generator-exit,
then it shouldn't be used.

Even then, it's preferable to catch those exceptions explicitly.
2024-10-01 13:18:46 +10:00
Pablo Vazquez
05a398cf45 UI: Preferences: Align new Editor properties
Place all Editor properties in an aligned column on top of other
more general widget properties.
2024-09-27 18:03:47 +02:00
Harley Acheson
28e5c1412e UI: Editor Edge Highlighting
Customizable highlighting of editor edges that can be used to help
differentiate between areas, indicate active area, and/or help users
with visual impairment. Can be completely removed as well. This
replaces the active area header highlighting, which doesn't work for
transparent headers.

Pull Request: https://projects.blender.org/blender/blender/pulls/116684
2024-09-26 21:55:26 +02:00
Harley Acheson
8450aa275f UI: Area Docking as Regular Feature, Not Experimental
This PR makes "Interactive Editor Docking" a regular feature, available
by default, and removes the option from Experimental Preferences.

Pull Request: https://projects.blender.org/blender/blender/pulls/127810
2024-09-24 23:23:48 +02:00
Jeroen Bakker
5c8ce24d40 Preferences: Don't show preferred device in OpenGL
When overriding the GPU backend to OpenGL from the command line the
vulkan device was still visible in the preferences. This is fixed by
testing both the active backend and the backend in the preferences to be
vulkan.
2024-09-24 09:46:40 +02:00
Jeroen Bakker
ddb2179e37 Vulkan: GPU device selection
Allows users to override the auto detection for GPU
selection. Normally the GPU selection is done by looping
over the order Vulkan provides and finding the highest
performing device based on its type (discrete, integrated,
software).

However users might have multiple discrete cards and want
to switch between them. Or developers want to validate other
GPUs without rebooting.

This PR adds the ability to override the auto detection
for the vulkan backend.

![image](/attachments/5d9198a8-af08-4eee-aa73-363edea11cd9)

**Future improvements**:
- This PR does not include a command line option. This can be added
  later for render farms.

Pull Request: https://projects.blender.org/blender/blender/pulls/127860
2024-09-23 11:18:24 +02:00
Jeroen Bakker
458faa6486 Preferences: GPU backend selection
This PR allows users to select a GPU backend.

In the system tab of the user preferences the GPU backend can be selected in the `Display Graphics` panel.
It will require a restart of Blender before the changes become effective.

During startup minimum requirements are checked. Blender will switch automatically
to OpenGL when no compatible Vulkan device could be detected. A dialog will be shown
to inform the user.

The setting of the in the `Display Graphics` panel are still overridden when blender is started
using the `--gpu-backend` option. When starting blender with `--debug-gpu` the backend
detection will print to the console.

See PR for detailed information and screenshots of the UI.

Implements #126504
Pull Request: https://projects.blender.org/blender/blender/pulls/126545
2024-09-06 08:28:41 +02:00
John Kiril Swenson
715129bf5b VSE: ability to connect and disconnect strips in the VSE.
Adds the ability to connect and disconnect strips in the VSE.

- Connected strips have an icon indicating their status, and attempting
  to select one connected strip selects all other connected strips in
  that chain.
- If the user attempts to connect a strip that is already connected to
  other strips, that strip will disconnect itself from others before
  connecting to new strips.
- Preview selection also works in bulk if multiple video strips are
  connected together in the timeline.
- When adding new strips from the Add menu or the File Browser, strips
  from the same file are connected by default. There's an option to
  turn this off in Editing > Video Sequencer user preferences.
- It is possible to individually tweak strips/handles and ignore
  connections with Alt+Click.
  - This shortcut overrides the old keymap item for "Linked Handle"
    selection. The property still exists if people want to use that
    shortcut for its old purpose.
- To make sure that connections remain valid even after duplication,
  I've added a condition to `seq_new_fix_links_recursive` that also
  updates connections using the `seq->tmp` var. (A note -- I've updated
  the comment for this field in `DNA_sequence_types.h` because the var
  is only used for duplication now. It was once present in
  `select_more_less_seq__internal` to be used for linked selection but
  is gone now).
  - There are also functions to cut one-way links and make sure that
    all strips are bidirectionally connected after duplicating.

Pull Request: https://projects.blender.org/blender/blender/pulls/124333
2024-08-22 14:54:42 +02:00
Harley Acheson
aa78d43a05 UI: Multicolor Autokeying Indicator
Show the autokeying indicator (record button) on the Timeline header in
red when enabled. With a white outline on dark theme, or with a black
outline on light theme. The red color is user changeable.

Pull Request: https://projects.blender.org/blender/blender/pulls/126344
2024-08-16 23:16:40 +02:00
Omar Emara
f40cf759c7 Compositor: Add experimental option for new CPU compositor
This patch introduces a new experimental option for the new CPU
compositor under development. This is to make development easier such
that it happens directly in main, but the compositor is not expected to
work and will probably crash.

Pull Request: https://projects.blender.org/blender/blender/pulls/125960
2024-08-08 15:40:06 +02:00
Harley Acheson
5bf44c6eb4 UI: Text Style for Tooltips
This gives users the ability to control the size of tooltip text
separately from other text styles. This is an accessibility issue
in that users with low vision can choose to make these larger than
the working text.

Pull Request: https://projects.blender.org/blender/blender/pulls/125147
2024-07-25 19:12:41 +02: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
Harley Acheson
108b71047a UI: Remove "Widget Label" Text Style
This PR removes the "Widget Label" text style, found in Preferences /
Themes / Text Style. This results in both labels and the text found in
input boxes sharing settings. This results in a slight loss of
customization but it isn't that useful to have these things separate
and results in code complication and errors.

Pull Request: https://projects.blender.org/blender/blender/pulls/122898
2024-07-19 21:57:49 +02:00
Harley Acheson
e802fe1433 UI: Screen Area Docking Experimental Feature
Improvements to Area maintenance, adding the ability to move and dock
areas to any location, including between multiple windows. Allows
transitioning between splitting, joining, moving, and docking without
early commit. Improved visual feedback. Design Doc #124915. Added
as experiment feature.

Pull Request: https://projects.blender.org/blender/blender/pulls/123414
2024-07-18 02:47:32 +02:00
Campbell Barton
ac6e216b26 Merge branch 'blender-v4.2-release' 2024-07-08 13:05:45 +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
Bastien Montagne
6d68f82398 Merge branch 'blender-v4.2-release' 2024-07-02 16:52:15 +02:00
Bastien Montagne
570eee1717 Debug: Add new userpref option to enforce recompute of ID usercount on filesave.
This is a workaround to allow user to keep working without loss of data
when an issue like #124049 happens.

This commit also expose again the `use_all_linked_data_direct` debug
option, no idea why that one was removed.
2024-07-02 16:46:19 +02:00
Campbell Barton
11b32ed48b Merge branch 'blender-v4.2-release' 2024-07-02 15:07:17 +10:00
Campbell Barton
c29d8326e0 UI: sort add-ons by name
Previously add-ons were sorted by category & name, remove the category
only sorting by name since the category is no longer displayed and
isn't part of extension meta-data. Now the add-ons are sorted by name
(case insensitive).

Details:

- Store add-ons modules sorted to avoid having to sort on every redraw.
- addon_utils.modules() now returns an iterator.
2024-07-02 15:06:14 +10:00
Campbell Barton
f1bfaaf2f7 Merge branch 'blender-v4.2-release' 2024-06-27 21:26:23 +10:00
Campbell Barton
42e1239ba8 Core: support restricting the types an XML preset may load
Prevent potential problems from untrusted XML (typically themes)
traversing into data outside the intended targets.

From what I can tell it's not currently possible but changes to RNA
could allow for this which would likely go by unnoticed.

Further details in code-comments.
2024-06-27 21:21:07 +10:00
Pratik Borhade
e9291548d3 Merge branch 'blender-v4.2-release' 2024-06-26 17:04:14 +05:30
Pratik Borhade
1dd017ac62 Fix #123228: GPU subdivision setting can be adjusted on an unsupported device
GPU subdivision is only supported on OpenGL backend. Exclude this
property for metal backend then.

Pull Request: https://projects.blender.org/blender/blender/pulls/123313
2024-06-26 13:31:37 +02:00
Campbell Barton
732a246cc0 Merge branch 'blender-v4.2-release' 2024-06-23 14:50:09 +10:00
Campbell Barton
485a4dbf0f Extensions: order "System" repositories last
The default "System" repository which was ordered before "User Default",
order system repositories last as these are a special case many users
won't touch.
2024-06-23 14:43:31 +10:00
Campbell Barton
278aa84218 Merge branch 'blender-v4.2-release' 2024-06-23 13:02:18 +10:00
Campbell Barton
c78adfc698 Extensions: use str.casefold for case insensitive search
`str.casefold` is intended for case insensitive string matching and
finds more matches with some unicode characters.
2024-06-23 12:57:08 +10:00
Campbell Barton
bfd999401f Merge branch 'blender-v4.2-release' 2024-06-21 11:37:32 +10:00
Campbell Barton
38e25d7838 UI: tweaks to extension & addon items
- Use line separator over box instead of separate boxes.
- Format web-links with a label, then the button instead
  of positioning the buttons side-by-side.

Changes by Brecht with minor edits (see !123420).

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
2024-06-21 11:34:10 +10:00
Campbell Barton
8b9cf02ce9 Merge branch 'blender-v4.2-release' 2024-06-21 10:53:08 +10:00
Campbell Barton
72ef03d5a1 Extensions: split add-ons & extensions into separate preferences
Add back the "Add-ons" preferences, removing add-on logic from
extensions.

- Add support for filtering add-ons by tags
  (separate from extension tags).
- Tags now respect the "Only Enabled" option.
- Remove the ability to enable/disable add-ons from extensions.
- Remove add-on preferences from extensions.
- Remove "Legacy" & "Core" prefix from add-on names.
- Remove "Show Legacy Add-ons" filtering option.

Implements design task #122735.

Details:

- Add-on names and descriptions are no longer translated,
  since it's impractical to translate text which is mostly
  maintained outside of Blender.
- Extensions names have a `[disabled]` suffix when disabled so it's
  possible to identify installed but disabled extensions.
- The add-on "type" is shown in the details,
  so it's possible to tell the difference between an extension,
  a core add-on & a legacy user add-on.
- Icons are also used to differentiate the add-on type.
- User add-on's must be uninstalled from the add-ons section
  (matching 4.1 behavior).
- Simplify logic for filtering tags, move into a function.
2024-06-21 10:42:53 +10:00
Campbell Barton
df78d23f93 Merge branch 'blender-v4.2-release' 2024-06-19 16:01:53 +10:00
Campbell Barton
6eb2b5f47b Fix local extension errors being shown as remote errors
Also fix error with non extension add-on display by removing
an exception for extensions which is no longer needed.
2024-06-19 15:58:45 +10:00
Pablo Vazquez
6684504d4f UI: Rename "Strip Colors" panel in theme editor
Rename to "Strip Color Tags" to match how these are called throughout
menus and overlay popover.
2024-06-18 16:13:28 +02:00
Falk David
10af923eac Grease Pencil: Move GPv3 out of experimental
This removes the experimental flags related to the GPv3 project.

Note that this doesn't remove GPv2 code just yet.
It just exposes GPv3 by default now.

Pull Request: https://projects.blender.org/blender/blender/pulls/122723
2024-06-17 13:50:41 +02:00
Campbell Barton
e0bdb74d8d Merge branch 'blender-v4.2-release' 2024-06-14 15:46:24 +10:00
Campbell Barton
e93f0ee53a Extensions: add network timeout and connection limit preferences
These settings are used when running extension updates but may be
used for any operations that perform online access.
2024-06-14 15:32:07 +10:00
Bastien Montagne
de713122f3 Merge branch 'blender-v4.2-release' 2024-06-13 12:17:10 +02:00
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
Devashish Lal
d1455c4138 Geometry Nodes: Add STL Import Node
This commit adds an initial STL import node, the first of the nodes from the
current Google Summer of Code Project [0]. The importer is refactored to
output a mesh pointer, and a node is added to wrap around the importer.
The node supports error messages from the importer. A new experimental
option is added to hide the nodes by default until they're ready to be exposed
generally.

0: https://devtalk.blender.org/t/gsoc-2024-geometry-nodes-file-import-nodes/34482)

Pull Request: https://projects.blender.org/blender/blender/pulls/122418
2024-06-10 20:47:37 +02: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
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
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
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
Campbell Barton
dc9430c480 Extensions: support system repositories & BLENDER_SYSTEM_EXTENSIONS
Support for "System" extensions as an alternative to the current
"User" extensions repository.

The purpose of this change is to support bundling extensions for
offline work or in environments where users setting up thier own
extensions isn't desirable, see #122512.

Details:

The default "System" repository on Linux will for example use:
- `/usr/share/blender/4.2/extensions/{system}` For system installs.
- `./4.2/extensions/{system}` For portable installs.

- Blender's default startup now has a "System" repository
  which users or administrators may populate.

- Repositories can select between User/System paths,
  setting a custom path overrides overrides this setting.

- Add "BLENDER_SYSTEM_EXTENSIONS" (matching "BLENDER_LOCAL_EXTENSIONS").

Ref !122832
2024-06-07 11:36:20 +10:00
Campbell Barton
881d83031e Cleanup: minor changes to extension repository handing
- Add a function to initialize all default repositories.
- Rename function for creating extensions.blender.org repo for clarity.

Prepare for !122832.
2024-06-07 11:02:48 +10:00