At the moment, only menus and tooltips have a shadow. However, other
elements can benefit from having a shadow. This PR adds shadows to
panels in overlapped regions. Makes the default shadow size slightly
larger, but less opaque so it's not so prominent. While dragging a
panel this makes the shadow larger for a "floating" effect.
Pull Request: https://projects.blender.org/blender/blender/pulls/139847
Some USD files have the displacement input specified in the shader but
do not have it marked as an output in either the shader or the material.
Skip processing if we do not have a valid displacement source.
Pull Request: https://projects.blender.org/blender/blender/pulls/140619
Remove barely used theme settings for "Navigation Bar" and
"Execution Region".
These properties were only used in two areas, which already had a good
candidate to be replaced with.
Visually it should look exactly the same by default.
Part of #135192, simplifying and cleaning up theme settings.
See PR for details and screenshots.
Pull Request: https://projects.blender.org/blender/blender/pulls/140352
Replace the hardcoded red, green, blue colors for speed and
reprojection error curves in the Clip Editor Graph, with
theme X, Y, and Z settings respectively.
Update the tooltip as well to reflect the change.
See PR for details and screenshots.
Pull Request: https://projects.blender.org/blender/blender/pulls/140409
`blend_write_prepare` expects to work on a shallow copy of the
`CurvesGeometry` struct. This is necessary because it changes
the struct to contain only the layers being written. This is
particularly important with writing with the new format enabled,
where attributes are written as part of `AttributeStorage`.
Writing with a shallow copy of the struct also gives us the
flexibility to zero the runtime pointer in the written file which
is generally a good practice.
Pull Request: https://projects.blender.org/blender/blender/pulls/140560
The distributed memory access toggle in Cycles preferences would show up
when a user has two GPUs that can access each other's memory, but only one
of them is supported by Cycles.
For example the AMD RX 5700XT and AMD Vega 64 can access each other's
memory, but only the 5700XT is supported by Cycles.
Pull Request: https://projects.blender.org/blender/blender/pulls/140521
The `Theme Space List` theme settings are often used for channels-like
interfaces such as Graph Editor, DopeSheet, NLA, VSE, Movie Clip.
Node Editor and Spreadsheet also had these settings but they are not
used. Remove them to simplify theme making.
Part of #135192
See PR for details and screenshots.
Pull Request: https://projects.blender.org/blender/blender/pulls/140536
The grid layout type for UI list is planned for removal in 5.0, see
blender/blender#110461.
In previous UI meetings, we talked about deprecating the Grid mode of
the UI list, which is not actually accessible in UI and was never used.
Nowadays, there is a new grid view that can be exposed in the API in
the future.
Initially, I wanted to remove references to layout_type in UI templates
in the text editor, because a lot of add-on developers on the
extensions platform base their lists on that code, and a lot of them
are therefore including soon to be deprecated code in their add-ons,
which I want to avoid in the future. But I thought we might as well
remove it from our python scripts as well, since it's just basically
redundant code that doesn't do anything. And also because many add-on
developers use bundled python scripts for references as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/138395
For UILists that doesn't use `filter_items()`, search filter doesn't work
along with invert button. For filter_items, invert case is already
handled in filter_items_by_name. In absense of that function,
handle the invert case inside `UI_list_filter_and_sort_items`. Existing logic
is a bit wrong. Now flags are adjusted, i.e. when search string matches, check
for invert status to decide whether items should be in the list or not.
Pull Request: https://projects.blender.org/blender/blender/pulls/139523
The `a + array_len > in.len` check was off-by-1 whenever accessing a
non-array property without raw access. This was because `array_len` was
actually the array length of the property, which is `0` for non-array
properties.
Given an array which was too short, this would cause the slower loop to
overrun the end of the array by one item. When getting items this would
cause a crash on a debug build with `Fatal Python error:
_PyMem_DebugRawFree: bad trailing pad byte`.
So use `item_len` instead, wichi is always set to `1` for non-array
properties.
Also do not assume that an `array_len` of `0` means that the property is
an array. While this may be true currently, it is cleaner and safer to
use the dedicated RNA API to check that.
This PR also adds some basic checks for expected failure of `foreach_set`
/`foreach_get` API when the provided array is too small.
Co-authored-by: Bastien Montagne <bastien@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/115967
This patch uses the Vector Math node to implement Color to Float
implicit conversion versioning. This is shorter and much clearer than
the Dot and Math node that were used before.
Pull Request: https://projects.blender.org/blender/blender/pulls/140583
This was caused by a hash colision caused by an incorrect
auto conversion from `Object*` to `ObjectRef`. The `ObjectRef`
would then not contain any instancing data and would create
the same hash for the same particle system on each instance
(since only `foreach_hair_particle_handle` was constructing
`ObjectKey` from an `Object*` it did not affect the instance
itself).
Marking the incriminating constructor `explicit` to avoid
more issues. Changing the `ObjectKey` creation for psys to use
`ObjectRef` fixes the issue.
Pull Request: https://projects.blender.org/blender/blender/pulls/140544
This patch renames the Degr input of the Rotate compositing node to
Angle. That's because it is needlessly shortened and is also wrong,
as the unit is internally radians and it also depends on the scene
settings on the UI side and can be radians.
Reference #96219.
Resolves#53574.
Pull Request: https://projects.blender.org/blender/blender/pulls/110637
The way these tests work is similar to the existing field inferencing tests.
There is a .blend file that is opened and then we check the inferred structure
types from Python. A new `NodeSocket.inferred_structure_type` property is added
to be able to access this information. Other then the field inferencing tests,
this patch does not directly check the socket shapes, which are not always
exactly determined by the inferred structure type.
This also fixes a few issues I found while adding the tests.
Pull Request: https://projects.blender.org/blender/blender/pulls/140520
The performance of the sorted_paths_array kernel on B570 is problematic.
Relying on local sorting+partitioning instead gives a 25% overall rendering
speedup and no regression in shade_surface when rendering Agent 327 Barbershop scene.
On Arc A770, it still gives a 2% speedup when rendering Barbershop.
Pull Request: https://projects.blender.org/blender/blender/pulls/140308
We should never select something that is hidden in the viewport.
Generally, there can be multiple reasons why keyframe handles are not
shown in the Graph Editor:
- the `View` > `Show Handles` option is disabled
- the `Only Show Selected Keyframes Handles` is enabled
- a keyframe `Interpolation` method is anything but `Bezier`
This PR corrects the first.
Details:
- In `box_select_graphkeys()`, the `incl_handles` parameter is only
be passed to `initialize_box_select_key_editing_data()`
- add a separate `KEYFRAME_ITER_HANDLES_INVISIBLE` flag (representing
SIPO_NOHANDLES)
- "include_handles" purely represents operator setting / user intend now
- "final" decision about handles/their visibility is done in
`keyframe_ok_checks()` etc
For consistency, add "include_handles" option to Lasso/Circle as well
Part of #139314
Pull Request: https://projects.blender.org/blender/blender/pulls/139349
The issue was incorrect reference counting, making the type not safe to use.
The solution is to use the automatically reference counted `ImplicitSharingPtr`
instead of doing it manually.
Pull Request: https://projects.blender.org/blender/blender/pulls/140551
Add an optional init function which operators
An alternative to [0] which missed Python API support (causing #140451).
While that could be resolved, tracking which "slots" have been set
would have to be flagged on every map/hash insertion which seems
excessive and is prone to bmesh operators failing if the flag is ever
missed. Prefer a simpler init function so dissolve edges doesn't have
a zero threshold.
Also support multi-line comment blocks in the generated API docs.
[0]: bd3a66a416
If the outer window edge is greater than the area border width then
there are unpainted pixels at the edge. This only happens if the
border width is less than 2. This PR just adds a minimum width to
ensure coverage.
Pull Request: https://projects.blender.org/blender/blender/pulls/140563
The "delete this F-Curve" function assumes that the F-Curve is either a
driver or contained in `adt->action`. This does not have to be true, as
the Action editor can also show F-Curves from other uses (for example an
NLA strip). The channel delete operator (`ANIM_OT_channels_delete`) now
takes this into account.
Pull Request: https://projects.blender.org/blender/blender/pulls/140291
LoongArch is a new RISC ISA developed by Loongson, this adds the missing
entry to BLI_build_config.h. It has been verified to work on Arch Linux's
loong64 port.
Pull Request: https://projects.blender.org/blender/blender/pulls/130916