`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
This changes the location of the Draco library installation path.
The new location is at the root of addons_core/io_scene_gltf2 addon, as the library is created for this addon only.
This will solve issues where the gltf addon couldn't find the library in case of global python installation or custom script/lib paths
Pull Request: https://projects.blender.org/blender/blender/pulls/131080
Geometry Nodes can change the materials of the Object, for Mesh Objects,
the new materials are present in the evaluated Object, but for non-Mesh
Objects, the new materials may not be present until the evaluated Object
has been converted to a Mesh.
This patch fixes the materials in FBX export, with Apply Modifiers
enabled, of non-Mesh types with Geometry Nodes that change materials.
Rather than getting the materials from the evaluated Object, the
materials are now retrieved from the Mesh created from the evaluated
Object.
To support object-linked material slots, the materials on the new Mesh
are replaced at the same indices as the object-linked material slots.
Pull Request: https://projects.blender.org/blender/blender/pulls/130485
The FBX SDK specifies that normals should use the IndexToDirect FBX
reference mode. This mode allows data written to FBX to be deduplicated
by writing a separate array of indices into the deduplicated array of
data that can be used to reconstruct the full array of data.
When Unity imports per-vertex normals with the IndexToDirect reference
mode, it erroneously considers the imported mesh's normals invalid if
any of its normals were deduplicated. This issue is not present in other
external software that I have tested.
This patch modifies the export of per-vertex normals to not perform any
deduplication, avoiding the issue in Unity's FBX importer while
maintaining use of the IndexToDirect reference mode.
The add-on's patch version has been increased.
Pull Request: https://projects.blender.org/blender/blender/pulls/123186
Regression in [0] caused extensions with an empty wheel list
to raise an unhandled exception when extracting the Python
version from the wheel list.
Besides resolving this error, account for errors using the wheel
list since it isn't type checked in this code-path.
[0]: cfc10b0232565642afbfdc5a867f027640ce8274
Selectors for properties `space_object` and `space_subtarget` are
missing in Shrinkwrap constraint UI panel. This was because of the
difference between property names it didn't use `space_template` to
create those selectors. Since this is just a single special case,
a branch was added in `draw_shrinkwrap` in similar fashion to display
those selectors.
Pull Request: https://projects.blender.org/blender/blender/pulls/128347
Add error handling for rare but possible failures on installation.
- Account for the destination extension directory being a file.
- Handle the exception if renaming the temporary directory fails.
The stroke simplify operator was implemented at the beginning of GPv3
migration, which means it lacked a few other modes. This fix reused the
same code as in the simplify modifier to provide more simplify modes
back to the modifier so it can work just like GPv2.
Resolves#130616.
Pull Request: https://projects.blender.org/blender/blender/pulls/131076
When an extension could could be removed but it's directory could be
renamed, the install operation would fail anyway.
Resolve by completing the installation when the directory can be moved.
Report as part of #129884.
This check is done before the filter of non deformation bone.
So when we want to get this list, as it's cached, we get the list with non deformation bones, so try to access a bone that is filtered
Additional bug when we want to export only DEF bones :
the check is done on all bones, not only deformation bones, if we want to get only def bones.
So having at root a DEF and a nonDEF bone => Check will failed and said we can't remove armature
Solution: When checking if we can remove armature, indicate that we don't want to cache the result
Regression in [0] caused wheels with an older Python version
that used CPython's stable ABI to be considered incompatible.
Resolve using the stable ABI for version checks.
[0]: cfc10b0232565642afbfdc5a867f027640ce8274
When in grease pencil drawing mode, user could pin material or vertex
color to a specific brush or fill tool, but when switching tools, the
display and the logic of how those pinned material/vertex color are used
is inconsistent, leading to confusion.
The main cause of such problem is that the new GPv3 brush/fill tool is
not respecting pinning status, on top of that, user interface display
logic is also wrong. This PR makes sure that:
- Brush/fill tools respect pinning status.
- Buttons on the tool bar always display correct pinning status.
- Brush cursor will use correct color based on pinning status.
Pull Request: https://projects.blender.org/blender/blender/pulls/130968
`AnimData`, NLA strips, and action constraints all have an
`action_slots` field in RNA. The purpose of this field is to list
the slots of the currently assigned action (if any) that are suitable
for the relevant ID.
However, this is not clear from the naming. In particular, given that
there is another field `action_slot` that represents the currently
assigned slot, the name `action_slots` could be easily misinterpreted
as a way to assign multiple slots at once, which is not possible.
To help clarify its actual purpose and meaning, this PR renames the
field to `action_suitable_slots`.
As a bonus, this also ends up decluttering the Python autocomplete when
looking for things related to `action_slot`.
Ref: #130892
Pull Request: https://projects.blender.org/blender/blender/pulls/130754
Error in [0] intended to remove the panels but kept the space type &
region type, causing a warning on startup and the panels to be added
to a "Misc" tab.
[0]: 46773766a3
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
Compositor: UI: remove snapping to nodes.
Snapping nodes to other nodes behaves in a very unpredictable way, which makes most snapping options useless.
The patch removes the following:
- Snapping options `Node X`, `Node Y` and `Node XY`
- Menu `Snap Node Element`
- Menu `Snap Target`
New behavior:
- Activating `Snap` always acts as 'Snap to Grid'
Part of https://projects.blender.org/blender/blender/issues/128612
Pull Request: https://projects.blender.org/blender/blender/pulls/127667
The legacy option is turned off by default and will be removed
in the following weeks. It is only there to check for
regression for a short period of time. Afterward checking
for regression will require to use 4.3 as a reference.
Rel #102179
Pull Request: https://projects.blender.org/blender/blender/pulls/130683
The amount of settings in the text strip UI is quite large now; use collapsible (and closed by default) panels for outline/shadow/box options.
Images in PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/130449
The "X" button to delete a keymap entry is too close to the scrollbar,
potentially leading to misclicks that would delete data.
Add margin to the right of the buttons to prevent this.
The X button is now aligned when the box is open/closed.
Pull Request: https://projects.blender.org/blender/blender/pulls/130349
The background box for VSE text strips can have rounded corners now.
Actual rounded shape is a superellipse with 2.1 exponent; this is
very close to a circle section but feels a bit nicer with more
continuity between the flat part and the rounded part of the box.
At very large rounding radius this is not very fast; optimization
for that case will come in a separate commit.
Pull Request: https://projects.blender.org/blender/blender/pulls/129665