Raycast and "nearest to ray" use the local vertex indices from triangles
to index original data, which needs to be sized with all the vertices, not
just unique vertices. Add a new function to access that data.
Mouse cursor changes when hovering at the top of popup blocks to
indicate that these can be dragged. On Mac this looks like a hand,
while for other platforms it is a drag cursor.
Pull Request: https://projects.blender.org/blender/blender/pulls/118358
Add multiple "hand" mouse cursors. These are mostly needed for Mac,
which needs open, close, and pointing hand cursors. This also adds
similar for Windows, but just for completeness and testing.
Pull Request: https://projects.blender.org/blender/blender/pulls/127164
Enable deferred parallel batch compilation for image renders.
This replaces the use of the `WM_job` system with a regular thread,
since `WM_job` requires access to the main context,
which is not accessible from the render thread.
It also simplifies the system so it creates a single thread at startup
and deletes it at exit.
Pull Request: https://projects.blender.org/blender/blender/pulls/125005
The code that decides the indentation for channel groups and fcurve channels
already accounted for the difference between the Action Editor and Dopesheet/
Graph Editor, since the level of nesting is different in the Action Editor vs
the other two. However, it didn't account for the difference between legacy and
layered actions, which have different nesting in the Action Editor.
Additionally, before layered actions were introduced it was impossible for
the Action Editor to display channels from e.g. materials, but those channels
can now be displayed in the Action Editor via the slot system. However, the
indentation code was structured such that material (etc.) channels were *always*
indented as if they were in the Dopesheet/Graph Editor, where they're always
nested under the IDs that use them.
This commit fixes the issue by having a separate code path for indenting in the
Action Editor that only indents channel groups and fcurve channels, and which
properly handles the difference between layered and legacy actions.
Pull Request: https://projects.blender.org/blender/blender/pulls/127202
When converting a legacy Action to a layered Action,
also convert group memberships.
This is important for bones to retain their structure in
the Channel Box.
Pull Request: https://projects.blender.org/blender/blender/pulls/127188
This adds layered animation support to the following operators, allowing users to manage the grouping and arrangement of fcurves in the channel list:
- "Group Channels"
- "Ungroup Channels"
- "Move Channels"
Pull Request: https://projects.blender.org/blender/blender/pulls/127080
The cause was simple: I missed this operator in the initial layered-action
channel group implementation, so deletion was using the legacy action code
even for layered actions.
This implements the needed code in the deletion operator to handle layered
actions.
Pull Request: https://projects.blender.org/blender/blender/pulls/127242
Renderdoc only export extensions it supports.
`VK_EXT_dynamic_rendering_unused_attachments` is not supported by
renderdoc and therefor no devices could be found to start the vulkan
backend.
In GHOST we already work around this issue by not checking this specific
extension. We should do the same in VKBackend.
Pull Request: https://projects.blender.org/blender/blender/pulls/127236
The `Action.groups` RNA functions now work with layered Actions as well.
They just expose / operate on the groups of the channelbag that belongs
to the first slot of the Action.
Pull Request: https://projects.blender.org/blender/blender/pulls/127241
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
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
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.
* 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.