Replace use of "bl_pkg" operator category with "extensions",
this naming was used while the functionality was experimental,
not intended to be used once extensions was moved out of experimental.
It doesn't hurt, but it doesn't really provide any benefit either
to how we use the value in the code at the moment, so I view it as
kind of misleading, since all the calls here are done at runtime.
Pull Request: https://projects.blender.org/blender/blender/pulls/122419
When joining areas, one will be removed which can cause
wm_gizmomaps_handled_modal_update to attempt operation on a region that
is deallocated. This PR just exits if there is no current region.
Pull Request: https://projects.blender.org/blender/blender/pulls/122504
This commit adds logic to convert between USD dome lights and Blender
world materials.
The USD dome light rotation is represented in a mapping node input to the
environment texture. If the dome light has a color specified in addition to
the texture map, the color will be converted to a vector multiply on the
the environment texture output.
I the imported USD has multiple dome lights, only the first dome light will
be converted to a world material.
Co-authored-by: kiki <charles@skeletalstudios.com>
Co-authored-by: Michael Kowalski <makowalski@nvidia.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/121800
The direct lights are usually much smoother and with
higher dynamic range than indirect lighting. Using
the R11B11G10 float format exhibit color shifts and
banding even in simple setups without a way to mitigate
the issue.
Using RGB9_E5 encoding improve the quality while retaining
the storage benefit of 32bit formats. The added overhead
of the software encoding not perceptible in a full lighting
pass.
This affects direct lights and SSS convolution result.
Fix#121937
Pull Request: https://projects.blender.org/blender/blender/pulls/122515
This patch also fixes a crash when image input of `Stabilize2DNode` is unconnected and interpolation is set to bicubic.
Differences to GPU compositor:
- ~1px difference is observed due to different rounding of domain size vs. canvas size. This difference is constant for all image sizes.
- If image input is unconnected but other inputs are, CPU compositor doesn't consider the operation to be constant, whereas GPU compositor still outputs a constant result.
Pull Request: https://projects.blender.org/blender/blender/pulls/122288
If an object is hidden it is unsafe to look deep into its properties, such
as evaluated mesh state. Do early visibility checks to avoid accessing
possibly stake pointers.
Pull Request: https://projects.blender.org/blender/blender/pulls/122496
blah
Add a new operator 'Frame Scene Range' to the Dope Sheet, Graph Editor,
NLA, and VSE 'view' menus. It is added both to the regular menu and the
pie menu (by default on the ` hotkey).
The operator will only change the horizontal view, to show the scene
range or the preview range, depending on whether the preview range is
active or not.
The label of the operator switches between "Frame Scene Range" and
"Frame Preview Range" to indicate what will happen.
For the VSE this operator is quite similar to the 'Frame All', as that
by default also frames the scene range. There are a few notable
differences though:
- Frame All includes any strip that extends beyond the scene end frame.
- Frame All ignores the preview range.
Pull Request: https://projects.blender.org/blender/blender/pulls/122311
Introduces a `uiTextEditing` struct to hold most data for handling text editing,
with improved naming. This should help untangling this code a bit, reduce
perceived complexity, and make the relation between data and the button state
more clear.
Generally I'd like to try to minimize use of `uiHandleButtonData`, to reduce
complexity while increasing flexibility. For example it would be good if text
editing code could be independent of the active button, so a text button can
receive input while other UI elements remain interactive (e.g. for search
popups, which have their own ad-hoc layout, event handling and drawing code).
This is a rather conservative initial refactor, I might follow up with further
(more risky) changes in separate PRs. But this seems like enough of an
improvement to get in first.
Pull Request: https://projects.blender.org/blender/blender/pulls/122332
This implements the angle and angle factor draw tool settings in the `Advanced` panel.
The behavior is changed slightly to GPv2. Instead of calculating the radius of the point
based on an interpolated value between the adjusted radius and the previous point,
in GPv3 the radius is adjusted by a "smoothed angle factor". This factor is the angle factor
based on the previous point, but smoothed over time (by a constant amount).
Pull Request: https://projects.blender.org/blender/blender/pulls/122488
The fill tool generated strokes for exterior as well as interior
boundaries. This is undesirable because fill strokes can't actually have
holes and the overlapping strokes are not very useful.
This reconstructs GPv2 behavior where only the outer-most starting
points for boundaries are used, ignoring interior boundaries.
Pull Request: https://projects.blender.org/blender/blender/pulls/122498
The setting adds the "Custom Shape Wire Width"
option to the "Viewport Display/Custom Shape" section of a pose bone.
As the setting says, this controls how thick the wire is drawn in the viewport.
This is done by adding a geometry shader that makes two triangles out of a line.
The Anti-Aliasing is controlled by the setting
Viewport->Quality->Smooth Wires->Overlay in the user preferences.
## Artifacts
When increasing the line width, the lines start to separate at their vertices.
This comes from extruding each edge along the normal of its direction.
This could be solved by adding round caps in a later PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/120176
Being offline shouldn't be considered an error which checking for
updates on startup, so connectivity issues are suppressed unless
running in debug mode.
Ref !122463
When trying to optimize performance, we can disable other object in viewport when baking animation
We are now able to bake also drivers on SK with this option
The solution is to copy drivers to temporary created custom properties on armature,
to be able to evaluate them during baking
This patch refactors the GPU context handing in the GPU compositor.
First, GPU context handling in the GPU compositor constructor was
removed, that's because the constructor does nothing GPU related.
Second, the destructor and the execute methods were unified to use the
global DST context for main thread execution and a dedicated system GPU
context for threaded execution. The former is the case for blocking
rendering as well as background mode, so the blocking due to the global
DST is not an issue, but it makes the code more robust to implementation
errors like #122070.
Pull Request: https://projects.blender.org/blender/blender/pulls/122389
This patch makes it such that the GPU context required for the
compositor is only created when the GPU compositor is in use. This
should fix#121761 for the CPU compositor, but generally also make the
CPU compositor more robust to such errors in the future, and a tiny bit
faster since context creation is skipped.
Pull Request: https://projects.blender.org/blender/blender/pulls/122420
To be tackled by future commits:
* Setting the property when checking for updates.
* Read this property for the splashscreen information (and in the future the status bar).
Ref: !122487
During the conversion of GPv3 to GPv2, we computed the
time difference between the points. So we we're keeping track
of the time a point was created relative to the previous point.
There doesn't seem to be a good reason to do this.
It can also go very wrong in case the times of two points are
very close to one another (which can result in catastrophic
cancellation).
With this change, the time delta values are now the time
a point was created, relative to the first point.
Pull Request: https://projects.blender.org/blender/blender/pulls/122367
Split up the "(none/legacy)" enum item for the `AnimData.action_binding`
property.
Depending on the Action in `AnimData.action`, a different item will be
returned. With a legacy Action assigned, it will show "Legacy Action"
with an explanation in the tooltip. Layered actions will now just show
"None".
Pull Request: https://projects.blender.org/blender/blender/pulls/122485
User feedback has been that the pinned modifier looks broken because
there is no feedback in the UI showing that it's pinned (related to the
recently reported #121620). It's also inconvenient to disable the pinning
if it's required to move the modifier up (before another modifier that
controls normals for example). Now the "Pin" icon is displayed here,
and clicking on it turns off the pinning.
Also, change the property name from "Stick to Last" to "Pin to Last".
"Stick" is a weird word in the UI, it sounds uncommon and strangely
physical. "Pin" is more associated with this concept.
---
![Screenshot from 2024-05-29 11-41-06](/attachments/4581d362-e2fb-4edf-83dd-7f1e1b71ec4d)
Pull Request: https://projects.blender.org/blender/blender/pulls/122444
Add guards to the RNA code to prevent the creation of legacy data on a
layered Action, and vice versa.
On a legacy Action, it is now impossible to create new layers or bindings.
On a layered Action, it's now impossible to create legacy F-Curves or
groups.
Refactor: Anim: rename bl_animation_id.py to bl_animation_action.py
The `Animation` datablock is no more, and this file tests `Action`.
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/122483
Remove the button "Update Views" that requires the user to update visible views manually. This is now consistent with the automatic update of compositor tree, when views are added or deleted, see #120685.
The patch also addresses #109866 (not really a fix since behavior in that bug report is intentional).
Pull Request: https://projects.blender.org/blender/blender/pulls/122290
ZES_ENABLE_SYSMAN is supposed to be set for free_memory queries to be
available.
These queries are then optionally used since
759bb6c76879042ee15f9c26c820433611764988, for the host memory fallback
feature.
Setting SYCL_ENABLE_PCI was leading ZES_ENABLE_SYSMAN to be set by DPCPP
2022-12 but it's not used by newer versions of DPCPP.
We however temporarily disable SYSMAN by default on Linux as builds with
JEMALLOC enabled currently lead to driver runtime issues. These can be
worked around by using LD_PRELOAD=libigsc.so.
Move the content of `animation.cc` into `action.cc`. This is part of the
removal of the `Animation` datablock, and the injection of its
functionality into the `Action` datablock.
The test file `animation_test.cc` is renamed to `action_test.cc`.
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/122480
Expose `Action::is_action_layered()` and `Action::is_action_legacy` to
RNA.
Motivation for the names: the two functions are so closely related, that I
wanted to give them a more common prefix than just `is_`.
Pull Request: https://projects.blender.org/blender/blender/pulls/122478
Previously, the code only checked that ctrl is pressed. This works, but
also allows other keys to be hold at the same time which might conflict
with other shortcuts. Now the code also makes sure that shift and alt
are not pressed.
Vulkan layers should not be controlled from application, but
should be enabled via `vkconfig`. There are configurations
in the layers that are mutual exclusive and hard to maintain from
within an application.
An example is that currently we are not able to use renderdoc efficient,
because there is an validation error triggered from within renderdoc.
This PR removes all vulkan layer configuration from Blender.
Pull Request: https://projects.blender.org/blender/blender/pulls/122473
This adds support for renaming some sockets in the node UI directly by Ctrl+Clicking
on them. This is sometimes more convenient than going to the sidebar. It affects the
Menu Switch and Bake node as well as the Simulation and Repeat zone.
Some related notes:
* The Group Input and Group Output node are not yet supported, because it currently
breaks the right-alignment on the Group Input node. I couldn't find a workaround for
this yet.
* Double-clicking on the socket name does not trigger renaming yet. This seems to
be a deeper issue in the interface code.
* The highlighting when hovering over sockets that can be renamed is very dim
making it hard to see. Alternatives like drawing a box around the label when hovering
it (like in list views) have been discussed but seem to be much more difficult to get to work.
Despite these limitations, it seems reasonable to add this already, as it shouldn't affect
anyone negatively. The nodes still look like before.
Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/121945
The cloth scale Filter relies on properly set up deformation constraints
(this is done in `do_cloth_brush_build_constraints_task`).
Whenever the Brush (not the Filter) is set to `SCULPT_TOOL_CLOTH`
(having it selected prior to the filter), another code path is taken and
the setting up the proper constraints is skipped (making the Filter
disfunctional).
To distinguish between filter usage and brush usage, there were already
checks for the `StrokeCache` (indicating brush usage afaict), so to
resolve, use the same check to prevent entering the particular code path
associated with the `SCULPT_TOOL_CLOTH`.
Probably an oversight in c2f0522760
Pull Request: https://projects.blender.org/blender/blender/pulls/122440
Asserts triggered e.g. by opening Gold production files (like
`pro/shots/220_storm/220_0020/220_0020-anim.blend`). Their root cause
are zero tangent vectors.
The asserts initially came from unormalized normals, but the root issue
is actually using zero vector as axis in calls to
`math::rotate_direction_around_axis`.
While rotating a zero direction vector is possible (though useless),
rotating around a zero axis vector makes no sense?
So this commit adds an assert that the given axis is non-zero in
`rotate_direction_around_axis`. And 'fixes' the found cases triggering
such assert by skipping rotation when the axis (tangent) is null.
Another related issue fixed by this commit is the iterative process in
calls to `calculate_next_normal`, which can accumulate small floating
point errors over time, leading to generating not normalized-enough
normals at some point.
Pull Request: https://projects.blender.org/blender/blender/pulls/122441