Protect the backward-compatible API implementation with
`#ifdef WITH_ANIM_BAKLAVA` directives.
This also moves the `use_backward_compatible_api()` function further up
in the file, to the place where I'll need it when building the backward-
compatible API implementation for Action groups.
The backward-compatible API implementation makes the legacy Action API also
work on new layered Actions, exposing the data for the first slot.
Pull Request: https://projects.blender.org/blender/blender/pulls/127241
Add group name support to the backward-compatible implementation of
`Action.fcurves.new()`. This ensures that the legacy Action API creates
a new-style channel group in the appropriate channel bag.
Pull Request: https://projects.blender.org/blender/blender/pulls/127241
No functional changes.
The comments in the file are used as categories by some of our ICON
reading tools.
This also groups the TOGGLES icons together, with comments about their
order. This only includes the icons actively used as toggles at the
moment.
Note that ICON_NONE has always to be the first one in this file since
some parts of the code (e.g., the code to turn RECORD_ON into colored,
and the code for the popover chevron) have no-icon hardcoded as 0.
Ref: !127197
This error was introduced on 7dc3e8e04d
by the automatic script used (after my original PR code - !127194).
The SVG had the same attributes added twice.
The issue was technically introduced on
ffa802da7ac09273a34903438550e0966c4063dc (which is not in main but part
of the code which was merged).
The device code was disabled for primitives with deformation blur
and the intersection function always returned false, hence no
rendered primitive.
Other than that, there were a few bugs on both device and host codes
(e.g., the order of current and previous times and the primitive name.)
Pull Request: https://projects.blender.org/blender/blender/pulls/127163
Subtexture reading is supported via GPUFramebuffer. The input
parameters was an rect, but is called an area which includes
width and height.
Due to inconsistent naming the area was assumed to be a region leading
to incorrect sub texture being downloaded or crashes due to out of
bound writes.
This fix crashes when selecting in edit mode.
Pull Request: https://projects.blender.org/blender/blender/pulls/127229
Changes:
- Use macros to reduce Cocoa event forwarding boilerplate
- Use @autoreleasepool where necessary
- Use idiomatic Objective-C properties for `COCOA_VIEW_CLASS`
Style Changes:
- Use C-Style Comments
- Use braces for conditional statements
- Use Objective-C dot-notation
Ref #126772
Pull Request: https://projects.blender.org/blender/blender/pulls/126769
Explain in a comment why the RNA property `AnimData.action_slot_handle` is
still necessary (TL;DR: library overrides), even though its use in Python
code is limited / should be avoided.
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/127185
Remove `Action.last_slot_handle` from RNA. This is considered to be an
internal implementation detail, and Python code should not be using its
value for anything.
No actual functional changes, as this RNA property isn't used anywhere.
Pull Request: https://projects.blender.org/blender/blender/pulls/127185
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
In case of overridden collection, only root collection can be instanced
from outliner. Whereas, "Add collection instance" operation from viewport
works with child collections as well. To make outliner operation consistent,
set `is_liboverride_allowed` to true. This will let instancing of child collection that
are overridden.
Co-authored-by: Bastien Montagne <mont29@noreply.localhost>
Pull Request: https://projects.blender.org/blender/blender/pulls/126881
Accessing `bl_rna` for type defined in `scripts/modules/bpy_types.py`
could return their parent-classes RNA when accessed via their parent
types __subclasses__() method.
Operations on collections could tag the same collection multiple times.
Track the changed state instead. Also rename (ok/updated to "changed"),
for clarity & consistency.
Remove duplicate depsgraph tagging from ED_rigidbody_object_remove too.
- Move sys_info into an internal module to avoid having so many
top level modules for Blender's internal functionality.
- Rename system_info sub-modules that pre-fill URL's for clarity.
- Move top-level exception handling into the operator.
- Report an error if an unexpected exception occurs.
- Use `Exception` instead of `BaseException` as there is no reason to
catch the additional exceptions.
- Remove use of sys_info from the command line example,
replace with in-lined system info.
* Use `float3` where possible
* Adjust names, introduce a utility `struct` to represent the accumulation
happening in the method
* Remove dead code
* Use `std::queue` instead of custom hand-written queue working on a
`Vector`
* Apply `const` where possible
* Use C++ math library
Pull Request: https://projects.blender.org/blender/blender/pulls/127212
Somehow this untested implementation made it in, I thought I had
tested this. The mistake I made was imagining the VBOs were "indexed"
using the node vertex indices, but we use a flat duplicate-per-triangle
vertex VBO format.
USD Skeletons (armatures) are joint-based rather than bone-based in
construction. This means that there's no native bone concept nor is
there any bone lengths. Currently, Blender's USD import uses an
estimation, roughly corresponding to the average distance between
joints in the entire Skeleton, to set the bone length in situations
where it's not obvious that 2 joints are directly connected. This is
imperfect but shouldn't affect actual functioning of the rig.
For armatures coming from external software this is probably the best we
can do. However, for armatures originating from Blender, we can use a
custom primvar to store the bone lengths directly. This allows Blender
armatures to be exported and re-imported in much better fidelity.
This is superior to prior techniques, like those employed by FBX, which
alter the actual Skeleton, inserting extra joints where unnecessary. Not
only is this detrimental when using these files in external software,
but it's still imperfect when importing back into Blender too.
Pull Request: https://projects.blender.org/blender/blender/pulls/126954
Part of #118145.
In the future we want to move the ownership of the BVH tree to the
original mesh rather than `SculptSession`, in order to persist it
across some more general non-topology changing operations like
node tools. The first step of that change is replacing all places
that used `SculptSession::pbvh` for access with a function.
Add `.faces()`, `.verts()`,`.all_verts()`, and `.grids()` functions to nodes.
Don't change BMesh data access yet. More complex const correctness
makes that situation more difficult.
Pull Request: https://projects.blender.org/blender/blender/pulls/127201
In geometry nodes, the viewer gets activated by clicking on the preview icon. For the compositor, preview is enabled either using the image viewer or the backdrop.
Another difference is that all nodes can be previewed in the compositor. Which makes the preview icon on the composite and viewer node redundant.
Pull Request: https://projects.blender.org/blender/blender/pulls/127044
This exposes warnings that are propagated to the modifier in the Python API.
This allows people to show these warnings in custom UIs for their node groups.
Warnings are accessed like this:
```python
for warning in modifier.node_warnings:
print(warning.message)
print(warning.type)
```
Note that this only works on the geometry nodes modifier. These warnings may
be extended with more information in the future. E.g. it could be useful to know
which node created the warning.
Pull Request: https://projects.blender.org/blender/blender/pulls/127193
Speedup the Color Balance VSE strip modifier, with two things:
- Generally, use a much lower overhead parallel_for, also with
lower grain size (32 image rows, instead of 64 that were used
before). This is what makes the "float" variant faster.
- For "byte" variant, create a precalculated lookup table instead
of doing all the math per-pixel. This was *almost* done in
existing code, except it was put into the code path that was
never-ever used. However, since this is all done on premultiplied
values, I'm using lookup table size of 1024 instead of 256, so
that semitransparent pixels get some more precision for
"in-between values". This LUT is what results in the main speedup
of "byte" variant.
Calculating Color Balance at 4K resolution, times in milliseconds:
- PC (Ryzen 5950X), PNG (byte): 22.2 -> 2.9 ms, EXR (float): 20.1 -> 15.2 ms
- Mac (M1 Max), PNG (byte): 28.9 -> 7.5 ms, EXR (float): 21.8 -> 8.5 ms
More timing details in PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/127121
As of 2a56403cb0, bevel weight data is stored as a generic
attribute. The bevel modifier is currently hard-coded to use the
`bevel_weight_edge` attribute as the data source for the weights.
This commit adds a string textbox where the user can specify alternate
attributes for the bevel's edge weights.
The string name field is added as a search button which provides a list
of all attributes in the original mesh. This is meant to work similarly
to geometry nodes, so mismatched attribute data types and domains are
automatically converted/interpolated as necessary. Attributes created
by previous modifiers can also be used, but they won't appear in the
search menu.
Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/117366
Slots can now be deleted from an Action via the channel list in the Action
editor. As with all deletions there, it deletes the associated F-Curves
from the Action without any warnings.
Pull Request: https://projects.blender.org/blender/blender/pulls/127112
Refactor `if (ale->type == ANIMTYPE_GROUP)` into `switch (ale->type)`
with a single `case` filled out. This will make an upcoming commit
cleaner, as it simply adds another case.
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/127112