Add support for a 5th modifier key called "hyper",
this is a modifier supported on Wayland & X11 although
other platforms could support an additional modifier too.
Both GNOME and KDE can map CapsLock to Hyper.
Other compositors can use the XKB_DEFAULT_OPTIONS environment variable.
This allows users to have an additional modifier for their own use
that doesn't conflict with other keys.
Ref !136340
Rename to be more consistent with other Blender keymaps, as well as the
naming convention used in "View Type."
- "SequencerCommon" -> "Video Sequence Editor"
- "SequencerPreview" -> "Preview"
- "Sequencer Timeline Tool" -> "Sequencer Tool"
- "Sequencer Preview Tool" -> "Preview Tool"
There is versioning in place to make sure custom keyconfigs keep working.
Once #131102 goes through, if we would like to rename the "Sequencer"
view type to "Timeline" or "Sequencer Timeline," then we can make the
necessary changes here too.
Pull Request: https://projects.blender.org/blender/blender/pulls/136217
Previously when an addon is expanded on the UI, the "Maintainer" string
would be cut short until a `<` character, to prevent showing e-mail on the
UI, however there could be more than one person/email entries in there
so to prevent cutting short the string, now we use regex to take out the
email part only, so full maintainer string is displayed.
Pull Request: https://projects.blender.org/blender/blender/pulls/136031
Fix a few small mistakes in the action baking code:
- Assigning an action slot should only happen after the action itself has
been assigned.
- `_ensure_channelbag_exists()` didn't actually ensure the channelbag
always exists; now it also creates the layer & strip if necessary.
Pull Request: https://projects.blender.org/blender/blender/pulls/135853
Some wheels don't use "Purelib", meaning the directory layout of the
wheel needs to be manipulated on installation.
Add partial support for Python's "Binary distribution format" when
Purelib is false, since paths such as `includes` & `scripts` are not
remapped into user accessible locations - they will remain in the
wheels "*.data" directory, these could be supported if it's needed
although it seems like a fairly niche use case.
Ref !135709
When baking custom properties that were named exactly the same
as a property already in Blender (in this case `scale`), it would fail.
The issue was introduced with eee32726c7 where the goal was
to not key addon defined properties.
The problem with that approach was that `obj.bpy_rna.properties`
not only contains addon defined properties but also all that are native to Blender.
So the rna path would be created to be identical as for e.g. transform properties.
The fix is to test the property for `is_runtime` which is true for addon
defined properties but false for blender internal properties
I tested with the test file of #121349 to confirm that doing so
doesn't bring that original bug back.
Pull Request: https://projects.blender.org/blender/blender/pulls/135297
- Add `type[]` for the `tool_cls` as it's expecting tool type class,
not the instance (similar to #132420)
- Add `set[str]` to `after` type as it's seems to be the way it's used
the most widely, e.g. in "UI Tool Simple" example that comes with Blender:
`bpy.utils.register_tool(MyTool, after={"builtin.scale_cage"}, separator=True, group=True)`
Pull Request: https://projects.blender.org/blender/blender/pulls/133975
Rename `ActionKeyframeStrip.channels()` to `.channelbag()`, and change
its first parameter from `slot_handle` to `slot`.
This is to be consistent with `ActionKeyframeStrip.channelbags`, which is
the array of channelbags in the keyframe strip. Having a function that's
singluar makes sense for finding a single element in the array.
The change from using the slot handle to using the slot is to be consistent
with `.channelbags.new(slot)`. Furthermore, the Python API should be using
slot handles as little as possible (they're basically meaningless numbers).
Using the slots directly is preferred. If that's not possible, it is
recommended to use the slot identifier (`slot.identifier`) instead, as that
can be used to look up the slot (`action.slots[slot_identifier]`).
This breaks the glTF add-on, which will be fixed in !133915.
Pull Request: https://projects.blender.org/blender/blender/pulls/133868
When calling bpy.utils.expose_bundled_modules(), these modules are
added to sys.path.
This provides a solution/workaround to two problems:
* Using bpy together with packages like usd-core is problematic. Besides
crashing due to C++ symbol conflicts, it's just impossible to import
different versions of the same module, or to have distinct environment
variables for both. (#127132)
* Blender add-ons using these VFX modules do not currently work with
the bpy module.
This adds about 15MB to the bpy package.
Pull Request: https://projects.blender.org/blender/blender/pulls/133082
Support differentiating between portable & system installations,
useful to properly locate relative paths which would not work
on system installations.
Ref !133143
* BLENDER_SYSTEM_SCRIPTS support for multiple script paths, separated by
; on Windows and : on other platforms.
* New BLENDER_CUSTOM_SPLASH to replace the splash screen image.
* New BLENDER_CUSTOM_SPLASH_BANNER to overlay an image on the splash.
Contributed by Sony Interactive Entertainment: https://github.com/PlayStation-OpenSource
Capitalize the default filename used for .blend files and other savable
and exportable file formats (like images, 3D formats, etc.) from
"untitled" to "Untitled".
Pull Request: https://projects.blender.org/blender/blender/pulls/132424
This is leading to "'super' object has no attribute '__del__'" errors
in some situations. As explained in #132476 this is only for future
proofing, so don't do it yet.
This reverts commit f301952b6a.
According to the Python API release notes, this is required now along
with super().__init__() which was already done.
Also fixes mistake in example in API docs.
Pull Request: https://projects.blender.org/blender/blender/pulls/132476
Operators keep being a pain... This time, the fact that unregistered
operators are not removed from `bpyt.type.Operator` subclasses list
breaks workflow to generate translations info for a specific add-on
(since it relies on differences between UI messages extracted when this
add-on is enabled, and when it is disabled).
Suppress unused warnings using the "vulture" utility.
- Include public definitions in the modules `__all__`.
- Mark arguments & variables as unused with a "_" prefix.
`Action.slots.new()` in the Python API previously took either an ID or nothing
as a parameter. In the former case it would create a slot with the appropriate
`id_root` and name for that ID. In the latter case it would create a default
slot with an unspecified `id_root` and default name.
This had several issues:
1. You couldn't create a slot with a specific `id_root` without already having
an ID of that type. In theory this isn't a problem, but in practice in larger
scripts/addons you don't necessarily have such an ID on hand at the call
site.
2. You couldn't directly create a slot with a desired name without an existing
ID with that name. This isn't so important, since you can always just set the
name afterwards. But it's a bit annoying.
3. Most other `new()` APIs in Blender *require* you to specify the name of the
item being created. So calling this with no parameters was violating that
norm.
4. Ideally, we want to eliminate unspecified `id_root`s, since they cause other
weirdness in the API such as slot identifiers changing upon slot assignment.
To resolve these issues, and just generally to make the API more
straightforward, this PR changes `slots.new()` to take two required parameters:
an ID type and a name. For example:
`slots.new(id_type='CAMERA', name="My Camera Data Slot")`.
This fully specifies everything needed for the slot identifier upon creation,
and doesn't require any outside data items to create a slot with the desired
type and name.
In the future if we decide we still want a `for_id`-style slot creation API, we
can reintroduce it as a separate function.
Ref: #130892
Pull Request: https://projects.blender.org/blender/blender/pulls/130970
In Blender 4.3 all the EEVEE Legacy compatibility Python API calls for
materials in were removed. All Python code that makes use of that API
need to be updated to make use of the new API.
This commit updates two built in Python scripts to use the new API
to avoid errors like the one reported in #130822
Candidate for 4.3.1 corrective release
Pull Request: https://projects.blender.org/blender/blender/pulls/130873