Introduced with 96e549c092
While the above commit applied versionings to the related flags, it did
not convert either the UI elements or the underlying grease pencil code
to use the now generic `Brush` properties.
Pull Request: https://projects.blender.org/blender/blender/pulls/141001
This check was meant to catch unknown failure cases but instead it
meant any attribute with an empty array (e.g. from a mesh with no
faces) would not be loaded. Instead the failure case should only be
when there is no data when the array is not meant to be empty.
Pull Request: https://projects.blender.org/blender/blender/pulls/141096
Remove the impact of Auto orbit center preference onto Fly mode.
Until now, it was possible to experience dynamic translation speed
changes in the Fly mode with Auto preference enabled for the orbit
center. This was not desired.
Ref !141035
The code added in commit ffc204d1fa to dissolve redundant 2-edged
vertices after a manifold boolean assumed that after dissolving such
vertices a valid face would remain. This is not true of the face
started out degenerate (all vertices on the same line).
Fixed by checking for such cases and in any case not creating
any faces with less than three vertices.
The VSE preview job was pushing tasks while holding a lock
which is also used by the task. This could lead to a dead-lock
situation if scheduling decides to run the task immediately.
The easiest way to reproduce the issue is to run Blender with
`-t 1` command line argument and add WAV file.
The solution is to iterate over queue and create tasks while
holding a lock, but push them to the pool after releasing the
lock.
Pull Request: https://projects.blender.org/blender/blender/pulls/140972
For some reason the orco vertex buffer is requested after the position
buffer, but they are computed together. In case that happens, just
discard the position buffer.
Pull Request: https://projects.blender.org/blender/blender/pulls/141043
This happened because the velocity module is referencing
batche to be able to copy them after drawing.
Make sure to call step swap even when shaders are not
ready to ensure we don't dereference these possibly
freed batches on the next draw.
This also fixes the crashing benchmarks.
Pull Request: https://projects.blender.org/blender/blender/pulls/141022
This appear as meshes still present or missing when toggling
the option.
This was caused by the change in update detection from the
overlay properties.
The calls to `to_geometry_set` in this file can create a temporary
Instances struct for collections. That instances component will contain
two attributes, which are currently referenced in the attributes map
even after the temporary compoment storage goes out of scope. A simple
fix is to avoid adding these attributes to the map in the first place.
An alternative that would also be more efficient would be to handle each
instance reference type explicitly, without converting it to a temporary
geometry set. That seems to significantly complicate the code though;
for now it doesn't seem worth it.
Pull Request: https://projects.blender.org/blender/blender/pulls/140999
Add a precondition check that verifies all to-be-joined armatures are
unique. If this is detected, an error is shown and the operator is
aborted.
Joining shared Armatures is non-trivial, because the corresponding
pose bones may actually have different drivers or constraints on them
(because those live on the Object ID, and not the Armature).
Duplicating any shared Armature ID could be a first step, but I am not
convinced this is always the right approach. This is why joining
shared Armatures is not supported for now. Users can choose how to
make each Armature unique, either by deselecting objects or by
duplicating their data.
Pull Request: https://projects.blender.org/blender/blender/pulls/140971
When armature is selected for custom shape of a bone, we run into
stack overflow due to recursive calls. To prevent this situation,
exclude armature object type from the custom shape list.
This also clears the `pchan->custom` pointer after loading/linking a
blend file. Otherwise a linked Armature object can still be assigned
indirectly, by renaming objects in the library file.
Fixes: #140747Fixes: #140959
Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/140851
A non UTF8 title on Wayland causes disconnection from the server.
Resolve by using the path as-is unless invalid UTF8 byte sequences
are found, in that case they're replaced by `?`.
This is skipped on WIN32 & macOS since the issue only exists on Wayland.
Similar to BLI_str_utf8_invalid_strip except that it substitutes
invalid characters and doesn't change the string length.
Useful for displaying strings that include invalid UTF8 code-points.
Calling transform over the redo panel would access the regiondata
as a RegionView3D for any region type.
Resolve by checking the region type - as done elsewhere transform code.
Apply the "Zoom direction" preference to the rotation axis.
Until now, this preference was limited to translations.
Note that the X/Y swap is now applied in the accessor functions instead
of wmNDOFMotionData::tvec because swapping the X/Y axis doesn't work
well in some cases (color picker for example), and it's confusing
of axis swapping is handled in different parts of the code for
rotation & translation.
Ref !140975
Co-authored-by: Patryk-Skowronski <patryk_skowronski@3dconnexion.com>
This is discussed more in PR #140773.
The cause of the breakage was the change of the Manifold library
version from 3.0.1 to 3.1.0. That change is very positive otherwise
because we can remove the "use runids" workaround to prevent bad
face merging, and that removal is also part of this commit.
Removing that changes the time to do a big sphere-sphere test
from 660ms to 340ms.
The problem that needed fixing is that the new library version appears
not to do some aggressive simplification that the old version did,
and as a result, when we dissolve triangulation edges after the boolean
is done, it sometimes leaves valence-2 vertices on original edges.
To fix that, new code detects and then dissolves such vertices.
Add an error check that the path being linked doesn't match the current
blend file.
Also resolve reference leak in the case of library override errors.
Geometry nodes can't be evaluated when the node tree is not available. This
never worked before and the modifier evaluation was "cancelled" later on before
already. However, new code in the modifier evaluation requires the modifier to
be cancelled earlier already which is what this patch does.
Pull Request: https://projects.blender.org/blender/blender/pulls/140923
Using "Edit Source" from a buttons context menu in a popover could
access freed memory when comparing buttons. Resolve by checking the
button still exists in the region.
Caused by change in `AVCodecID` enum. Our `IMB_Ffmpeg_Codec_ID` enum,
which was stored in .blend file did match `AVCodecID`. But after change
in external library headers it fails to initialize correct codec.
Function `MOV_av_codec_id_get()` was added to map these 2 enums and
the values are no longer hard coded.
Functions, that accepted `int codec_id` argument were modified to accept
`IMB_Ffmpeg_Codec_ID` or `AVCodecID` types.
Because `codec_id` was still stored as integer in DNA, get/set struct functions
were added. This way, compiler always knows what type is used and emit
error/warning when incompatible types are used.
Unfortunately, there is no way to ensure, that DNA `codec_id` field is not
accessed directly in future code other than comment.
Pull Request: https://projects.blender.org/blender/blender/pulls/140745
The theme cursor size was ignored when setting custom cursors
such as the knife, only the DPI from GHOST was taken into account.
This meant cursors such as the knife would sometimes display too small.
Now when the theme-size is larger, a larger cursor will be used.
Currently the theme size is read from XCURSOR_SIZE environment variable
however it may be read from the system preferences in the future.
Also fix the software cursor sizes which incorrectly used the UI scale
preference which is ignored by cursor sizes.
Improves the screenshot selection UX by ensuring the selection
rectangle stays within the window.
**Changes**
- Clamp the selection rectangle while dragging the cursor,
preventing it from extending outside the window.
- When shifting the selection area, movement is constrained
so that the entire rectangle remains within the window.
- When `force_square` is `true`, the square is clamped to the
largest possible square that fits within the window bounds
if it would otherwise exceed them.
Pull Request: https://projects.blender.org/blender/blender/pulls/139805
Fix#140813 crash, when bevel operation doesn't choose proper representative
face (called frep, facerep or rep_face in code). In such scenario a nullptr
would be assigned to uv_face->attached_frep field in register_uv_face function
and later, as a result of that, BM_face_vert_share_loop function would crash
during call to update_uv_vert_map function.
This commit also includes additional safety check in register_uv_face function,
as well as removes compiler warning about assigned but unused center_bme variable.
This is from PR https://projects.blender.org/blender/blender/pulls/140864
but applied to the 4.5 release branch.
The metaball selection radius was inside the cube and could only
be selected with wire-frame shading.
Resolve by expanding the radius by the dimensions of the cube.
The issue was that the summary channel was marked as
possible to do NLA mapping in `ANIM_nla_mapping_allowed`.
When it comes to doing the actual mapping it would silently do nothing
though because `bAnimListElem.adt` is always a `nullptr` for the summary.
However in `action_select.cc:580` the `KED_F1_NLA_UNMAP`
and `KED_F2_NLA_UNMAP` flags were already removed.
Those flags tell the summary line to do NLA mapping in `keyframes_edit.cc:368`.
(We may be able to remove those in the future)
The fix is to ensure that the summary line is
recognized as unable to do NLA mapping. That makes sense to
me at least because the summary line points to data but in itself
does not know about the NLA.
As a side effect, this also fixes circle select.
Pull Request: https://projects.blender.org/blender/blender/pulls/140664
Regression in [0] which moved the logic from
knife_closest_constrain_to_edge from 2D to 3D space.
The 3D location used (kcd->curr.cage) didn't have constraints
applied, causing snap not to lock to the constrained axis.
Resolve by passing in the constrained location which is then used when
edge snapping is calculated.
[0]: 7249b78b6b
One obvious problem is that `mr.use_simplify_normals` was assigned after
face corner normals were retrieved. The other more complex problem is
that now the normals caches automatically mix custom normals from other
domains. This can cause the expensive "Tangent Space" normals to be
calculated even though we don't explicitly request face corner normals.
To fix this, clarify the purpose of the option to only apply to that custom
normals format and use the true normals instead in that case.
Pull Request: https://projects.blender.org/blender/blender/pulls/140879
Problem - offset collision check for bevels did not consider the reduced
offset when using bevel edge weights, thus greatly reducing the allowed offset.
Solution - calculate the offset check using the weighted value and not
the full offset.
Alternatives - Since this error was introduced in the patch dd334faa58
a solution would be to revert the patch. This is not optimum since the
patch did correct the inf/inf condition in the offset calculation (ex at
90 degs, tan is 1/0).
Limitations - This patch is a correction to return the bevel function to
it's previous abilities. Further work is needed to properly handle edge
offset interference when looking at n-gons with reflex angles. There are
also situations where the bevel operation exceeds the checked offset distance
(exs. inner arc spread and bevel profiles that are not normal to the bevelled edge).
It is possible for a vertex to be processed by some function that
attempts to calculate the average of an attribute of all neighboring
elements when all elements are hidden. This results in NaN when using
`math::rcp` for the size of the related indices.
This commit switches the `rcp` call for the safe variant and removes an
invalid assert that previously existed.
Further cleanup to consolidate the various different average methods
will occur in the main branch (e.g. the `check_loose` and `interior`
functions)
Pull Request: https://projects.blender.org/blender/blender/pulls/140569
Typically, we use this function to determine whether or not a subset of
data that has been collected with `gather` needs to be then persisted
into a larger array with `scatter`. As such, it makes sense to assert on
equality of the indices and smaller array size.
Pull Request: https://projects.blender.org/blender/blender/pulls/140752
The code around view transform selection accidentally got too coupled
to the scene. However, the file output settings do not have scene, so
the enumerator getter was crashing.
Caused by 7ceb4495c5.
This patch brings the code closer to the Blender 4.4 behavior by
maintaining a global from view name to an ID.
There is still a bug in the code which displays views from the active
scene's display settings in the override panel. This is because the
itemf() callback is hardcoded to use the display settings from the
active scene (via bContext). However, this issue exists since the
initial commit of the color management override option.
Pull Request: https://projects.blender.org/blender/blender/pulls/140729
When movie strip is added and redo panel is tweaked, operator failed to
re-execute.
Caused by c4eab49b9. This added `sequencer_generic_invoke_xy__internal`
call in operator exec function, but did not specify `SEQPROP_NOPATHS`
argument, which caused `directory` and `filepath` properties to be
overwritten.
This PR adds clarification for `SEQPROP_NOPATHS` use case, because it
isn't immediately obvious what this is doing.
Pull Request: https://projects.blender.org/blender/blender/pulls/140736