Fix#79163 bug related to the bevel operation producing disconnected UVs for
new bevel faces. This change replaces previous approach using scattered and
selective usage of functions: bev_merge_uvs, bev_merge_edge_uvs and
bev_merge_end_uvs with one coherent technique for all stages of the bevel operation.
It is utilizing a concept of loop (BMLoop) buckets to keep track of UV vertices
that should be merged at the end of bevel operation by a single call to
bevel_merge_uvs function. This approach doesn't touch initial UV position
calculation done by interpolation algorithm in bev_create_ngon function and
keeps the concept of representative faces (called frep, facerep or rep_face in
code) to help decide to which bucket specific loops should be assigned.
This is from PR https://projects.blender.org/blender/blender/pulls/139595,
which has more explanation and discussion.
Add a footer region which contains essentially the playback and frame
range buttons from the Timeline Editor, to the following editors:
- Dope Sheet
- Graph
- NLA
- Sequencer
Available in the View menu in each editor, hidden by default.
The motivation is to provide a convenient way to access these
often used controls, and in the near future adjust these footers
to add more playback functionality related to each editor.
See PR for details and screenshots.
Pull Request: https://projects.blender.org/blender/blender/pulls/135697
GreasePencil ID type did not list `ID_OB` as its potential ID dependency
type, leading to lack of remapping of its layers' parents objects
pointers (e.g. on Object deletion), leading to crash from accessing
freed data.
Depth textures are always float, so we can skip the conversions. In this
case the depth value was converted to GPU_DATA_UINT_24_8 and back to
float again.
We detected that the gpu/draw tests could lead to
crashes after the tests where finished. It was
identified that the crash happened as the submission
runner wasn't exited, uses a mutex, that is being
destroyed by the main thread.
Solution is to wait until the submission runner has
finished, before destroying resources.
Pull Request: https://projects.blender.org/blender/blender/pulls/140650
GPU_DEPTH24_STENCIL8 and GPU_DEPTH_COMPONENT24 are deprecated in Blender
5.0. Internally they will be removed. When used via python they are
automatically converted to their DEPTH32F variant and a deprecation
warning will be displayed.
Pull Request: https://projects.blender.org/blender/blender/pulls/140644
Blender uses depth24 for legacy reasons. All backends that we support
have support for depth32f.
This PR updates all usages of depth24 with depth32f.
- depth24 are not supported on AMD/Intel/Vulkan and Metal. There depth32f
was already used to work around this limitation.
- This allows us to implement reverse depth in workbench, overlay and
grease pencil in the future.
Pull Request: https://projects.blender.org/blender/blender/pulls/140531
Avoid modifying the order of transform system data. Instead, create an
index map and use that to traverse the data arrays in sorted order.
The issue observed in #139042 stems from the assumption, in _some_ of
the code, that `tc->data[i]`, `tc->data_ext[i]`, and `tc->data_2d[i]`
all contain information about the same "transformable thing". Since
`tc->data` was sorted (by selection state and, optionally for
proportional editing, by distance) but the other arrays were not, this
caused issues.
The most obvious solution, sorting all arrays the same way, turned out
to be hard to do, as some elements in one array have pointers to
elements in another array. Reordering those arrays would therefore
also make it necessary to find and update those pointers.
Instead, I decided to implement a sorted index map. The arrays can
then be kept in their original order, and the index map can be used to
visit them in sorted order.
Pull Request: https://projects.blender.org/blender/blender/pulls/140132
The issue was that the wrong flag was passed to
`ANIM_nla_mapping_apply_if_needed_fcurve` resulting
in the handles not moved back in this method.
This issue was only visible when pasting on top of a single keyframe,
or when the key had free handles. That is because the handles would
be recalculated otherwise.
Pull Request: https://projects.blender.org/blender/blender/pulls/140542
Improve readability of the parse function for the OBJ importer.
Currently the behavior for parsing input data is nested with reading
and buffering the input stream in the same function. Separating
the problems into two separate functions makes the code easier
to read and understand. This avoids having 100+ lines of parsing
logic entwined with logic for reading/buffering the file.
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/140388
MESH_GGT_spin_redo (for the operator) depended on MESH_GGT_spin
(for the tool) having already been initialized however the order
gizmos are initialized currently isn't guaranteed.
Workaround the problem by adding a null check.
See the report for details.
Co-authored-by: Philipp Oeser <philipp@blender.org>
This replaces uiLayout aligment API with uiLayout methods,
following uiLayout refactors and the Python API naming.
Also this converts the layout aligment enum to a fixed enum class.
Pull Request: https://projects.blender.org/blender/blender/pulls/140622
The logic to access the edit-mesh for the selection engine didn't match
the logic used for drawing.
Resolve using the edit-mesh from: BKE_object_get_pre_modified_mesh
Ref !140525
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 `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
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