Commit Graph

3492 Commits

Author SHA1 Message Date
Campbell Barton
9cb3a17352 Linux: freedesktop support for file type association
Support freedesktop file association on Linux/Unix via the command line
arguments: `--register{-allusers}` `--unregister{-allusers}` as well
registration actions from the user preferences.

Once registered, the "Blender" application is available from launchers
and `*.blend` files are assoisated with the blender binary used for
registration.

The following operations are performed:

- Setup the desktop file.
- Setup the file association & make it default.
- Copy the icon.
- Setup the thumbnailer (`--register-allusers` only).

Notes:

- Registering/unregistering for all users manipulates files under
  `/usr/local` and requires running Blender as root.
  From the command line this can be done using `sudo`, e.g.
  `sudo ./blender --register-allusers`.
  From the GUI, the `pkexec` command is used.

- Recent versions of GNOME execute the thumbnailer in a restricted
  environment (`bwrap`) requiring `blender-thumbnailer` to be copied
  into `/usr/local/bin` (synlinks don't work).
  So thumbnailing copies the binary rather than linking and only works
  when registering for all users.

Ref !120283
2024-04-18 11:19:00 +10:00
Jacques Lucke
c00c1b8e23 Geometry Nodes: remove experimental option for matrix socket and nodes
This makes the matrix socket and initial set of corresponding nodes non-experimental.
That means, they'll be part of the next release.

Pull Request: https://projects.blender.org/blender/blender/pulls/120539
2024-04-17 10:34:13 +02:00
Campbell Barton
d3d14a706b Fix #120727: Filtering is case sensitive for Python UI-lists
Correct regression in b177f27e6f.
2024-04-17 14:47:13 +10:00
Pratik Borhade
1de48f98a5 Fix #120662: GP selection tool not working from toolbox
Caused by 658a9ac3a9
This seems to be happening due to wrong tools list passed for GPv3
sculpting.

Pull Request: https://projects.blender.org/blender/blender/pulls/120687
2024-04-16 13:50:42 +02:00
Pratik Borhade
6c2d9bd2f5 GPv3: Separate header and operators in context menu
Add separator after label in point and stroke context menu to separate
it from list of operators.

Pull Request: https://projects.blender.org/blender/blender/pulls/120690
2024-04-16 12:21:29 +02:00
Jacques Lucke
d1634b2a4a UI: support adding a search weight to menu entries for menu-search
The goal is to support better search experience in the cases where we want to
explicitly influence the ordering instead of relying only on general heuristics.
We used to support this already at some point I think, but not anymore since we
started using menu-search.

The implementation is fairly straight forward. It mainly just forwards the
search weight from the menu definition to the search code through various
required steps. The main annoying thing is that changing the signature of e.g.
`uiItemFullO_ptr` is fairly involved. Even using default parameters for these
functions is a bit annoying and becomes fairly unreadable and error-prone on the
call-site. For now, I worked around this by storing the search weight on the
`uiLayout` and to copy it to the `uiBut` from there. That seems preferable until
we have a better solution for adding parameters to all the `uiItem*` functions.

Pull Request: https://projects.blender.org/blender/blender/pulls/120572
2024-04-16 12:18:45 +02:00
Campbell Barton
2b7f46bc0b Fixes for keying-set export operator
- Escape identifiers for data-paths.
- Use repr for literal strings.
- Don't set the read-only is_path_absolute property.
2024-04-16 12:26:20 +10:00
Clément Foucault
626959ed21 EEVEE-Next: UI: Light-Probe panels
Cleanup pass on light-probe panel.

I tried to put properties in hierarchical order
with frequency of use in mind.

Pull Request: https://projects.blender.org/blender/blender/pulls/120616
2024-04-15 23:39:27 +02:00
Bartosz Kosiorek
dc35737b69 Fix: Move CFL Number parameter for Fluid into Adaptive Time Steps
The CFL Number is only used when Adaptive Time Steps is enabled.

Pull Request: https://projects.blender.org/blender/blender/pulls/120666
2024-04-15 18:39:36 +02:00
Pratik Borhade
2fefb39e22 GPv3: Wrong object type
Mistake in 658a9ac3a9

Pull Request: https://projects.blender.org/blender/blender/pulls/120653
2024-04-15 12:52:09 +02:00
Damien Picard
c306677119 I18n: extract and disambiguate a few messages
Extract
- Statuses for the external text editor
- Newly created enum node item
- Newly created plane track data
- Newly created custom orientation data
- Operator names in drag and drop menu (need to use operator's
  translation context)
- GN attribute statistic node inputs

Disambiguate
- Single-letter colors: A and B can mean Alpha and Blue, or simply A
  and B as in two operands in an operation
- Dissolve: issue reported by Tamar Mebonia in #43295
- Translate in the User Preferences. This introduces a new
  BLT_I18NCONTEXT_EDITOR_PREFERENCES ("Preferences") translation
  context
- Planar (reported by deathblood)
  This one is incomplete, because there is currently no way to
  disambiguate presets or GN fields. I don't see how either could be
  achieved cleanly.
  The former would need to define the context inside the preset and
  evaluate the file prior to showing it in the presets menu, which
  sound bad.
  The latter would need to introduce an additional string inside
  `FieldInput`s, which would be controversial given how little it
  would be used.

Remove
- Unused translation `iface_("%s")` in toolbar
- Remove obsolete N_() tags in a few node descriptions.

Pull Request: https://projects.blender.org/blender/blender/pulls/119065
2024-04-15 12:02:17 +02:00
Sybren A. Stüvel
51e1f29a68 Anim: Add new keyframe type 'GENERATED'
Add a new keyframe type named 'generated', which is meant to indicate
that the key was set by some automated tool (like an add-on), rather
than manually by an animator.

This is meant for tooling that needs to create keys in a repeatable way.
With this new key type, the tool can know which keys it generated
before, and thus those can be removed and re-generated.

Pull Request: https://projects.blender.org/blender/blender/pulls/120564
2024-04-15 10:42:54 +02:00
Dalai Felinto
af09a475e4 Extensions: User Interface: Sort advanced repository options
Local Cache and module are not related, so they should not be on the
same row. Instead group Local Cache with custom directory.

Designed with Pablo Vazquez.
2024-04-12 18:20:01 +02:00
Dalai Felinto
8771534434 Extensions: User Interface: Replace Label with icon and add placeholder
Design by Pablo Vazquez.
2024-04-12 18:20:01 +02:00
Dalai Felinto
c1edc32fe5 Extensions: User Interface
Remove label from Repositories popover, since it is now accessed via a
menu which already has the label.

Follow up for: blender/blender-addons-contrib@d5862549d3
2024-04-12 18:20:01 +02:00
Christoph Lendenfeld
883af6dd63 Anim: Add custom pre and post frame color to motion path
This PR adds an option to specify custom colors for a
motion path. One for frames before the current frame
and one frame for after. With this it is easier to see
the relation of the motion path to the current frame.
That was already the case with the default colors, but
not with custom colors.

On a technical side note, the colors pre and post the current
frame were already different.
The shader multiplied the custom color by 0.25
for anything pre current frame.

Pull Request: https://projects.blender.org/blender/blender/pulls/119375
2024-04-12 15:11:51 +02:00
Falk David
355079cbb2 GPv3: Add option to disable masks in viewlayer
In GPv2 there was an option to disable masks during rendering
of a viewlayer. This wasn't implemented for GPv3 yet.

This needs to change the way the draw calls are created,
because we need to skip over drawings at render time.
So to do this, we precompute the drawing offsets,
then check if we need to skip over it and otherwise
create the draw calls.

Pull Request: https://projects.blender.org/blender/blender/pulls/120561
2024-04-12 14:44:13 +02:00
Campbell Barton
a4de136e78 Cleanup: remove redundant preferences.inputs.use_ndof
This is available via: bpy.app.build_options.input_ndof
2024-04-12 21:26:20 +10:00
Falk David
ff625b79f6 GPv3: Expose "Use Lights" option in the object data properties
Adds a `use_lights` option to the layer in RNA and
exposes the setting in the object data properties under
the layer opacity.
2024-04-12 13:19:05 +02:00
Bastien Montagne
b56457aa5e Core: ID Management: Make 'Purge' operation always recursive by default.
Inherited from previous versions of this feature, by default the Purge
operation from the Outliner would remove all unused IDs, recursively.
The same operation invoked from the File -> Clean Up main menu would by
default only delete directly unused IDs.

Now both will by default remove all (directly or indirectly) unused data.
2024-04-12 11:25:00 +02:00
Campbell Barton
cee184e97a Fix error from recent preset refactor
The recent change in [0] which added a filepath argument to pre/post
callbacks broke adding presets.

Remove the argument from operators as the the filename is sometimes
created based on values set in the pre-callback.

This mostly reverts the change, only keeping the filepath argument
for the static-method callbacks declared on the menu or panels.

[0]: 72e6191c89
2024-04-12 16:28:06 +10:00
Campbell Barton
98986c6562 Python: replace '%' with str.format for examples & templates
Use modern/preferred string formatting for user facing scripts.
2024-04-12 15:33:40 +10:00
Campbell Barton
0bb6317035 Theme: store the last loaded preset as a filepath
This is needed so we can reliably know which extension is associated
with a theme, so a theme can be refreshed on update and cleared when
uninstalled, needed to resolve !120289.
2024-04-12 13:23:09 +10:00
Campbell Barton
72e6191c89 PyAPI: include a filepath in preset pre_cb/post_cb callbacks
This is needed so the presets path can be stored in the theme,
so it's possible to keep track of the current theme.

Needed for fixing #120289.
2024-04-12 13:21:42 +10:00
Campbell Barton
d5f837a8ee Cleanup: remove redundant string formatting 2024-04-12 10:04:07 +10:00
Campbell Barton
0660fa6971 UI: remove double-quoting in report
repr() already quotes, so including quotes isn't necessary
2024-04-12 10:02:41 +10:00
Jacques Lucke
549d02637a Curves: add menu to add some primitive curves in edit mode
This adds operators to add a bezier and circle primitive in curves
edit mode. The operators support the same settings as in the
legacy curve edit mode. The `shift+A` shortcut is added as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/120513
2024-04-11 15:11:02 +02:00
Pratik Borhade
a656ce5c16 UI: Remove active vertex theme option for 3d view and UV editor
`editmesh_active` theme is used to for active mesh element.
`vertex_active` is unused here (only used in graph editor) so remove it
from the 3d viewport and UV editor theme.

Found this in #119640

Pull Request: https://projects.blender.org/blender/blender/pulls/119649
2024-04-11 13:19:06 +02:00
Lukas Tönne
483802b62d GPv3: Cleanup: Rename keymap functions to gpencil_legacy
This should reduce the confusion a bit when more GPv3 keymaps are added
using the `grease_pencil` prefix.

Pull Request: https://projects.blender.org/blender/blender/pulls/120506
2024-04-11 12:56:17 +02:00
Christoph Lendenfeld
8ea7d44e62 Fix #120470: Keying Set export fails in python
Caused by 30b0c5b225
That commit removed `use_insertkey_xyz_to_rgb` but
I didn't see the use of that in the python script.
Fixed by removing the usage of that property from the python script as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/120509
2024-04-11 11:15:28 +02:00
Campbell Barton
182f1746b7 Theme: reset the theme to the default when removing a preset
It's strange to keep the theme displayed after its removal.
2024-04-11 17:44:27 +10:00
Campbell Barton
3a30e80f60 UI: don't translate user defined names 2024-04-11 17:43:36 +10:00
Lukas Tönne
658a9ac3a9 GPv3: Initial sculpt mode
Adds an (empty) sculpt mode for Grease Pencil v3 objects.

The object `SCULPT_GPENCIL` mode is re-used for Grease Pencil object
types. A `SCULPT_GREASE_PENCIL` context mode has been added, which is
specific to grease pencil objects. This is necessary for polling tools
and keymaps.

Pull Request: https://projects.blender.org/blender/blender/pulls/119338
2024-04-11 09:39:48 +02:00
Harley Acheson
7642a5452a UI: Consistent Cursor Color
Change Console and text editor cursor color to match that of
widget_text_cursor. Console cursor is currently red which we normally
use for error conditions.

Pull Request: https://projects.blender.org/blender/blender/pulls/120491
2024-04-11 04:00:14 +02:00
Julian Eisel
335d379667 UI: Indicate type of search in keymap search button
Shows either "Search by Name" or "Search by Key-Binding" as placeholder text in
the search button. This makes it more clear what's expected to be entered here.

Personally I often did/do the mistake of searching for the wrong thing in this
button, because I forgot that I changed it earlier. The placeholder text can
avoid this mistake.

Pull Request: https://projects.blender.org/blender/blender/pulls/113681
2024-04-10 16:36:58 +02:00
Hans Goudey
86bde1b58b Cleanup: Make format 2024-04-10 08:01:58 -04:00
Pratik Borhade
5bc033b4d7 UI: Add Rename operator in bone collection context menu
Operator to rename tree view item already exists: `UI_OT_view_item_rename`
Add this in context menu as discussed in !120003

Pull Request: https://projects.blender.org/blender/blender/pulls/120086
2024-04-10 13:09:32 +02:00
Jacques Lucke
01ee34ebd1 Curves: add operator to set bezier handle types
This adds an operator to set the handle types of bezier curves. It also
adds the same shortcut that is available in the legacy curve edit mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/120426
2024-04-10 13:08:50 +02:00
Campbell Barton
1fb36c4f5e Cleanup: avoid redundant string formatting 2024-04-10 14:48:56 +10:00
Campbell Barton
16bc74edac Cleanup: remove type hints & f-strings from core scripts
Follow conventions for core scripts.
2024-04-10 12:37:16 +10:00
Campbell Barton
74a65d77cc Cleanup: spelling in comments 2024-04-10 12:28:33 +10:00
Campbell Barton
35011e9c4e Fix error accessing the add-on install "target" without a context
Introspecting the add-on install operator from operator cheat-sheet
raised a Python exception.
2024-04-10 11:54:54 +10:00
Harley Acheson
d2d810f11a UI: Splash Screen Import Changes
Removal of "What's New" button, addition of a section divider, and many
very small changes to the text, some reordering of items.

Pull Request: https://projects.blender.org/blender/blender/pulls/118224
2024-04-09 22:57:06 +02:00
Jesse Yurkovich
509a7870c3 Collection Exporters: Enable file exporters to be specified on Collections
This implements the ability to have file exporters added and configured on Collections.

Exporting is reachable from several locations:
- Individually on each exporter configuration: The `Export` button in each panel header
- For all exporters on the collection: The `Export All` button in the main panel interface
- For all exporters on all collections in the scene: The `File`->`Export All Collections` button

Visibility of which collections currently have exporters configured is done by ways of an icon added to the Collection row in the Outliner.

Adding multiple exporters for the same file type is permitted. The user is free to setup several exports of the same format but with different file locations or settings etc.

Notes:
Only USD and Wavefront OBJ are enabled for the initial commit. Additional formats, including those implemented in Python will be added as separate commits after this.

Ref #115690
Pull Request: https://projects.blender.org/blender/blender/pulls/116646
2024-04-08 22:10:39 +02:00
Sybren A. Stüvel
26c5881cc2 Anim: change experimental flag label & linked issue on Gitea
Changed the experimental flag label from "Animation: Project Baklava" to
"New Animation System" to be more self-explanatory. Also I changed the
associated item on project.blender.org to #120406, which tracks the work
that is still to be done.
2024-04-08 17:34:11 +02:00
Sybren A. Stüvel
a5d0ae9644 Anim: Add a simple GUI for assigning Animation data-blocks
Add a 'Baklava' panel to the 3D Viewport side-panel. It's a
developer-GUI, not meant for animators (or for inclusion beyond the
experimental feature, for that matter).

Note that this GUI shows all layer properties, even though the data
model is currently limited to a single layer. This means that things
like 'influence' and 'mix mode' are irrelevant, as there is no
underlying layer to mix with.

Also key insertion and animation evaluation are not implemented yet (but
will be in upcoming commits).

For more info, see #113594.

Pull Request: https://projects.blender.org/blender/blender/pulls/118677
2024-04-08 12:53:32 +02:00
Sybren A. Stüvel
38878b4ac2 Anim: add Animation data-block management functions
Add code (including RNA wrappers) for:

- Creating, removing, and accessing `Animation` data-blocks.
- Creating and removing layers, strips, and bindings on those `Animation`
  data-blocks.
- Accessing those via RNA.

Note that this does not include assignment to any animated data-block,
so it is of limited practical use.

For more info, see #113594.

Pull Request: https://projects.blender.org/blender/blender/pulls/118677
2024-04-08 12:53:32 +02:00
Philipp Oeser
0b30cb1929 UI: Clarify Playback "Play In" option
The "Play In" > "Properties Editor" option is not only updating Property
Editors but also the sidebars of other editors (such as the 3DView).

This caused a bit of confusion since we also have "Play In" > "3D
Viewport" (which only updates the 3DView main region but not the
sidebar)

So now call the option "Properties and Sidebars" in the UI ("Editor" has
been stripped to fit the text - but also since the editor is usually
only called "Properties" e.g. in the editor dropdown).

Came up in #120012

Pull Request: https://projects.blender.org/blender/blender/pulls/120305
2024-04-05 18:17:41 +02:00
Jacques Lucke
548df007a5 Curves: add subdivide curves edit mode operator 2024-04-05 13:50:09 +02:00
Jacques Lucke
6c25c66194 Curves: add switch direction edit mode operator 2024-04-05 13:23:22 +02:00