Correct problem where face split inadvertently triggered the
un-triangulate detection logic in places due to freshly added diagonals.
Defer face split until after tagging is complete so the new edges don't
interfere with edge counting.
Ref !141511
When the layer tree in the evaluated state of the Grease Pencil object changed,
the code would fail to get the crazyspace deformation.
Currently we rely on a 1 to 1 index mapping of the original and evaluated
layers. For obvious reasons, this is very weak and can easily break.
The new implementation works as follows:
* Caller that wants to get the crazyspace deformation passes the evaluated and original
object + the original drawing to get the deformation of.
* Fallback deformation are the original positions.
* If there are drawing edit hints in the evaluated geoemtry set, then
* find the edit hint that corresponds to the original drawing
* use the positions in the edit hint.
To create the drawing edit hints, we need to know what evaluated layer corresponds
to which original layer. Currently, this simply stores the original layer index on the
evaluated layer runtime data.
The solution is not ideal and there are some possible improvements like:
* Find a way to solve the more general case, e.g. when there are multiple original
IDs involved.
* Propagate the "mapping" to original layers even when the type of geometry is
changed, like going to curve instances and back.
Pull Request: https://projects.blender.org/blender/blender/pulls/139285
After spending way too much time looking into the image handle code
because I assumed the issue is some interaction between OSL code using
a texture and the image system that's in SVM mode (which never happened
before the custom camera) with printf debuggine because OptiX doesn't
work in debug builds, it turns out the issue was something else entirely:
C++ iterator bullshit.
Specifically, when we remove an entry from services->textures, this
invalidates the iterator, so the code restarts from the beginning.
However, the for-loop still increments the iterator *before* checking
the termination criterion.
If we remove the only element of the map, we:
- Set it = map.begin(), which equals map.end() since it's empty now
- Increment it at the end of the loop iteration
- Compare it == map.end(), which is wrong now since we're past the end
No idea how this didn't blow up sooner, none of this seems camera-specific??
Anyways, the fix is simple - only increment if we didn't restart.
Pull Request: https://projects.blender.org/blender/blender/pulls/141580
This is related to #140381, where the symptom of the bug was a crash
caused by an undefined behavior. In that case, setting a valid active
viewer key was the proper fix. However,
`find_active_context_recursive()` could return `nullptr` in theory so
the same problem might occur in the future.
The commit resolves the undefined behavior by avoiding the
dereferencing of a null pointer.
Pull Request: https://projects.blender.org/blender/blender/pulls/141270
Reading from the top-right of the selection buffer could read
past the buffer bounds. Resolve by ensuring the clamped buffer
isn't empty. Relates to #141591.
When Timeline and similar regions become very short we try to remove
overlapping parts as they can no longer fit. While doing this I didn't
consider that the marker/Scrubbing Region color could include
transparency. This PR just backtracks a little and hides the marker
region in a different way, allowing transparency if wanted.
Pull Request: https://projects.blender.org/blender/blender/pulls/141581
The `files` property, provided by the blender file browser, contain
paths relative to the `directory` property. Use that instead of using
the file's parent directory.
Pull Request: https://projects.blender.org/blender/blender/pulls/141575
The memfile undo data-block change detection didn't work for meshes
because we ended up writing a new pointer every time. In practice the
array the pointer references is always empty anyway, so we can just add
a check and write null instead.
Unfortunately this fix only applies to 4.5, since the attribute DNA
data (which is actually used at runtime in 5.0) is created temporarily
specifically for writing, so it gets a new address every time.
We'll probably need to solve #127706 in 5.0 to fix this.
Pull Request: https://projects.blender.org/blender/blender/pulls/141457
When launching Blender via blender-launcher.exe, the window briefly
displays incorrectly on startup when using the Vulkan backend. This is
caused by not properly handling the GHOST_kWindowStateFullScreen case.
Previously, even if the window state was set to fullscreen, nCmdShow
would default to SW_SHOWNORMAL or SW_SHOWNOACTIVATE. With this fix,
nCmdShow is explicitly set to SW_SHOWMAXIMIZED when the window is in
fullscreen state, preventing the flicker.
Pull Request: https://projects.blender.org/blender/blender/pulls/141518
Instead of only showing a button to switch to the texture properties -
which don't actually allow creating a texture for linestyle - add a
data-block selector that allows creating a texture for linestyle. It
will also show a button to switch to the texture properties, if
available.
It seems like the previous UI didn't have any good way of assigning a
texture for linestyle, without going into the texture node editor.
Pull Request: https://projects.blender.org/blender/blender/pulls/141408
Zooming in `view_zoomstep_apply_ex` ignores any kind of v2d limits,
which are only applied later in `UI_view2d_curRect_validate`. After
zooming in all the way, further attempted zooms get undone by
`ui_view2d_curRect_validate_resize` in the following manner:
1. VSE has no `V2D_LIMITZOOM` flag set, so a v2d that is too small tries
to grow to `v2d->min[0]`.
2. Since `V2D_KEEPOFS_X` flag is set so that resizing the VSE can be
anchored to the left, the way that the v2d is altered to grow to the
minimum width (10 frames) is by increasing only `cur->xmax` instead
of both sides.
Fix by gating keepofs logic behind a similar `do_keepofs` to the one
which was added to `view_zoomstep_apply_ex` in 385a8a4d6a.
This is quite safe and regression-proof since every space but the
VSE has `V2D_ZOOM_IGNORE_KEEPOFS` unset, in which case the logic is
unchanged.
Ref: 7d9499bdc4, 8b36cf3eac, 385a8a4d6a, 28b1a33e16.
When selecting gizmos (such as one of the scale handles in the
Transform tool), the depth test state does not match what is shown in
the viewport. This can lead to unintuitive gizmo selection.
The issue is caused by the incorrect assumption that the depth state is
already `GPU_DEPTH_NONE` before rendering the gizmos for selection.
The solution is to ensure the status before rendering.
Pull Request: https://projects.blender.org/blender/blender/pulls/141412
Remove `BLI_assert(tc->sorted_index_map);` calls. Add one special case
in the function that investigates whether there is any selected item in
`tc->data`.
Earlier, I've been quite liberal in spreading these asserts around, to
guard against code paths that should have originally sorted `tc->data`
but by mistake didn't create `tc->sorted_index_map`.
They've been removed now, as they seem to be causing more trouble than
they're worth: the "sorting selected first" behaviour is only explicitly
there for proportional editing. With proportional editing disabled,
`tc->data` **only** contains selected items, and those are trivially
sorted first.
By now `tc->foreach_index_selected` can work without `sorted_index_map`;
if it is `nullptr`, it will assume that we're in the trivial case, and
that the array items can just be visited in index order.
Pull Request: https://projects.blender.org/blender/blender/pulls/141386
In case Blender was able to allocate a vertex buffer for huge geometry,
but isn't able to allocate its staging buffer it would crash. In this
case errors will be reported in the console.
This PR fixes this by clearing the data in stead of uploading.
Pull Request: https://projects.blender.org/blender/blender/pulls/141553
Previously in 95259228d9, property names
within geometry nodes panels are trimmed to make it less verbose if the
property name contains the parent panel's name as prefix, this didn't
take into account where property name can be the same as panel name, in
which case there will be an empty property name which is undesired. So
we should not trim the name in this case.
Pull Request: https://projects.blender.org/blender/blender/pulls/141500
Previously when joining a stroke from other layers, those original
strokes are kept even when joining mode isn't "Join and Copy". Now the
operator will correctly remove the incoming strokes from their original
layers.
Pull Request: https://projects.blender.org/blender/blender/pulls/141527
The root cause of the crash was that currently the depsgraph does not support
being rebuilt twice without being evaluated in the meantime. While not ideal to
rebuild the depsgraph twice, it's really something I'd expect to work without
crashes/leaks.
The double-rebuild when switching the scene was introduced by b6e1afb6e1
which tagged the depsgraph relations indirectly. Tagging relations at that place
should be valid though. The same bug can easily be reproduced by explicitly
writing code that rebuilds the depsgraph twice as shown in
https://projects.blender.org/blender/blender/issues/139079#issuecomment-1615029.
So far, we've found two places that need to be fixed to properly support
rebuilding the depsgraph before it has been evaluated:
* `update_invalid_cow_pointers`: `previously_visible_components_mask` was used
to check if the id is new and therefore not expanded yet. However, this check
is wrong in the case when the depsgraph was not evaluated yet. Instead, check
whether the ID is expanded directly. IDs which don't use copy-on-eval are
still handled properly due to another existing check.
* `DepsgraphNodeBuilder::begin_build`: This just discarded
allocated-but-not-expanded IDs without freeing them. Now they are freed when
their ownership is not transferred to `IDInfo`.
See
https://projects.blender.org/blender/blender/issues/139079#issuecomment-1615029
for more details.
Pull Request: https://projects.blender.org/blender/blender/pulls/141199
"Median" can have:
- a geometrical meaning, as in the median of points in a mesh,
- a statistical meaning, as in the median of a set of values. Used
in node attribute statistics.
This commit adds the specific "NodeTree" translation context to the
latter sense.
Reported by Satoshi Yamasaki in #43295.
"Edges" usually refers to the edges of a mesh. In the context of the
Keying compositing node, it should be the image processing sense of
edges between color areas. This mirrors the singular "Edge", already
similarly disambiguated.
Reported by Satoshi Yamasaki in #43295.
"Strip" generally is a sequencer or animation strip, but in this
context it is a string manipulation action for file names. It is
defined as part of the Path Mode defined in the FBX and OBJ exporters.
Those exporters are defined in Python and C++, respectively. This
commit changes both exporters to use the "File browser" translation
context.
In addition, the tooltip for "Relative" from the FBX exporter was
changed to match its OBJ counterpart, and the "Strip Path" mode was
also matched to the other version which reads better as an enum item.
Reported by Ye Gui in #43295.
Link items need to be gathered using the same translation context as
the actual enum prop they come from, in this case "Nodetree".
Reported by Ye Gui in #43295.
Node socket tooltips can include substrings from many different
sources. This commit adds two that were previously untranslated:
- hardcoded strings that simply need to be manually translated using
`TIP_()`,
- the socket name, which should use its context. This simply copies
the translation code from the socket name label.
Reported by Gabriel Gazzán in #43295.
Commit 9ce0a2d1d5 added the ability to specify translation contexts to
node UI panels, but it failed to update the regex that extracts them.
This commit solves that by adding the proper `add_panel` function to
the extraction regex.
Reported by Satoshi Yamasaki in #43295.
Job names displayed in the status bar were not extracted or
translated. This commit adds a regex to the bl_i18n_utils settings to
detect `WM_jobs_get()`, and the `RPT_` translation macro to translate
the message in the UI.
About 30 new messages are translated.
Reported by Ye Gui in #43295.
This node uses the recently-introduced uiLayout API to draw its UI.
This still needs to do manual translation using `IFACE_()`. This
commit adds this macro.
Reported by Ye Gui in #43295.
New sequence strip modifiers get a name that is to be translated if
translation of data is enabled. This used the default translation
context, but "Sequence" must be used because this is the context used
to extract the modifier names (`modifiersTypes` array in modifier.cc).
Reported by Ye Gui in #43295.
Node tree interface sockets can have subtypes depending on their type.
These use enum items extracted elsewhere using the "Unit" translation
context. The sockets' subtypes thus need to use the same context as
well.
Reported by Satoshi Yamasaki in #43295.
Detected an incorrect structure type. A property struct was used to
store feature data. This could lead to incorrect values for enabling
descriptorBufferPushDescriptor, what isn't used.
When only handles were selected they could not be set.
The problem is that `retrieve_editable_and_selected_strokes`
only counts strokes that have selected control points.
Pull Request: https://projects.blender.org/blender/blender/pulls/141437
The soft eraser could leave points with zero opacity. To fix this issue
for now, we apply a post-process step when the stroke is done to remove
these points.
In the future, it would be better to refactor the eraser a bit more and
delete points during the stroke.
Part of #131686.
Pull Request: https://projects.blender.org/blender/blender/pulls/141454
You could basically not interact with the animation (except for
keyframes in the main region), channels region was totally empty, NLA
could not be used, ...
It is not something users will animate a lot, but we should still have
animation editors in mind when adding a new object type.
Just missing from cc31d7bb49
Pull Request: https://projects.blender.org/blender/blender/pulls/141449