Avoid BLI_path_slash_rfind for accessing file-names as NULL is returned
when the path has no slashes, use BLI_path_basename instead.
Also remove 2 cases where BLI_path_basename was inlined.
Disable recently-added support for some Apple-specific key modifiers
when editing UI text. Only until we can add support for same for text
objects, console, and text editor. Keeping consistent between areas.
Pull Request: https://projects.blender.org/blender/blender/pulls/108333
- Avoid using geometry sets from a different abstraction level
- Deduplicate basic attribute copying propagation code
- Allow more use of implicit sharing when data arrays are unchanged
- Optimize for when a point cloud delete selection is empty
- Handle face corners generically for "only face" case
Pass the curves and points to keep instead of delete. In the same test
file as the previous commit, this gave an increase from 50 to 60 FPS
when deleting curves.
In several nodes, and sculpt brushes, use the proper `IndexMask` type
instead of a span of ranges to encode a selection. This allows deleting
the duplicate data copying utilities using the second format.
Using the new index mask implementation, things can be a bit simpler.
It's also simpler to use `complement` instead of `to_ranges_invert`,
which just made everything less standard. Also create the new curve
offsets in place instead of copying, and use implicit sharing to share
attributes when no curves were deleted.
With a version of `IndexMask::complement()` optmized locally, I observed
the following speedups with a 1.2 million point curve system:
- Delete points: 29 FPS -> 45 FPS
- Delete curves: 48 FPS -> 49 FPS
- Delete tip points: 25 FPS -> 32 FPS
Also add a method to apply the "gather" function to all attributes,
mostly as a continued experiment of consolidating attribute propagation.
This can be used more elsewhere in the future.
Does not happen very often, but that weak handling of copying linked
data as linked data currently can lead to an invalid namemap in Main.
This is a known issue, fixing it requires addressing #107847.
In the mean time, work around it by re-validating and fixing the namemap
after the problematic liboverride calls.
NOTE: only identified issue currently is the proxy conversion of linked
proxies. The other cases *should* be fine.
Found while investigating issues when opening the
`lib/tests/libraries_and_linking/libraries/main_scene.blend` file.
Logic in `main_namemap_validate_and_fix` could end up re-generating
a thousand of time the names of IDs because of an invalid assumption
about processed IDs being re-processable (in case they get renamed).
Also do not `CLOG_ERROR` when checking and fixing errors, if this code is
called to fix errors, it means errors are expected. Use `CLOG_INFO`
instead, or `CLOG_WARN` when the info is really important (like when IDs
had to be renamed).
And finally, simplify code clearing invalid namemaps, there is now a
function to handle this task, `BKE_main_namemap_clear`.
Issues & improvements found while working on readfile errors when
opening `lib/tests/libraries_and_linking/libraries/main_scene.blend`.
In readfile code, when looking up for an already existing Library ID
based on the filepath, the logic handling said file path was wrong.
NOTE: This probably does not have any effect in practice, but better be
safe than sorry.
Found while investigating issues when opening
`lib/tests/libraries_and_linking/libraries/main_scene.blend`.
When double clicking a channel in the Graph Editor, it would select all keyframes but not create an undo step for that.
This is an issue when double clicking to select all keys and then applying an operator.
The redo panel would also revert the selection since it didn't have an undo step
Pull Request: https://projects.blender.org/blender/blender/pulls/107887
Previously, each GHOST Context instantiated its own Metal device
queue. Commands are only synchronized within a queue, this was the
root cause of a number of flickering issues which had previously
been worked-around with synchronization primitives.
New solution uses a shared queue to simplify dependencies and
alleviate possibility of stalls and bugs when resources are modified
or shared across separate GPU command queues.
Authored by Apple: Michael Parkin-White
Pull Request: https://projects.blender.org/blender/blender/pulls/108223
Pressing 'A' to select all pose bones in an armature caused a segfault,
as `id->override_library->runtime->tag` was checked while
`id->override_library->runtime` was `nullptr`. An extra check resolved
the crash.
Pressing 'A' to select all pose bones in an armature caused a segfault,
as `id->override_library->runtime->tag` was checked while
`id->override_library->runtime` was `nullptr`. An extra check resolved
the crash.
There is no reason to use case-sensitive path lookups on MS-Windows.
Also replace BLI_str_endswith with BLI_path_basename since ends-with
checks don't ensure a preceding path separator.
There are other events besides `MOUSEMOVE` that's passed in during modal
handling, causes the `tgpi->mvalo` variable to be overwritten without
moving the stroke in the first place, this results in inaccurate offsets
during mouse/pen grabbing in primitive gizmo `IN_MOVE` mode. Now fixed.
Also fixed the operator hint to include the grab functionality.
Pull Request: https://projects.blender.org/blender/blender/pulls/108172
fc854fc252 caused the precision modification to be removed after
navigation was complete.
The ideal is when starting navigation.
This is because the precision button can be released during navigation,
thus confirming the precision change.
In order to execute the navigation of type "VIEW3D_OT_move," the user
is required to press both the `Shift` and `MMB` keys.
However, pressing `Shift` also activates the precision modifier for the
transform.
Consequently, while the `MMB` is unpressed, the transform operation
unintentionally remains in precision mode, altering the mouse position.
To address this issue, the solution was to eliminate the precision
changes immediately after the navigation is initiated.
Unfortunately, we have no way of knowing whether the user actually
unintentionally enabled precision, so this solution serves as a
workaround. Ideally, keymap conflicts should be avoided.
The runtime backup/restore logic was slightly wrong: it is possible that
an object requires light linking runtime but does not need light linking
itself. This is typical configuration for the receivers/blockers.
Modified the logic so that the evaluated object light linking is allocated
if there was a runtime field needed.
This required to make it so light linking evaluation takes care of feeing
the light_linking if it is empty. The downside of this approach is a
redundant allocation from the object backup when removing light linking
collection from emitter. But this is not a typical evaluation flow, and
the more typical flows are cheap with this approach.
Pull Request: https://projects.blender.org/blender/blender/pulls/108261