This patch adds a new `max_working_set_exceeded()` check on Metal so that we can display a "System is out of GPU memory" message to the user. Without this, we get obtuse "CommandBuffer failed" errors at render time due to exceeding the size limit of resident resources.
Likely fix for T101787 & T102786.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D16713
Issue was the lifetime of GPUVertFormat & GPUVertAttr.
Both need to be static in the function to be persistent here (and
handled appropriately).
Was an error in rB319ee296fd0c.
Maniphest Tasks: T102966
Differential Revision: https://developer.blender.org/D16704
Support Esc / RMB to cancel dolly, move, rotate & zoom.
Previously only roll could be canceled.
This can be useful to temporary orbit away from the camera or an
orthographic view without having to manually set it back.
- Add VIEW_CANCEL event_code.
- De-duplicate operator freeing logic for the roll operator.
- Structure checks so adding cancel is is simplified.
- Split event checks into two blocks, one for model events, another
for all other events.
Migrate (some) of the UDIM offset calculation from inside one
of the packing engines (where it's consumed) to the packing
operator (where it's produced).
This change (and others) will help simplify the future migration
of the packing engine inside editors/uvedit/uvedit_islands.cc
to the Geometry module, so it can eventually replace the other
packing engine in geometry/intern/uv_parametrizer.cc
Store the potentially owned mesh separately from the original/evaluated
mesh which is now stored with a const pointer. Also store mesh spans
separately in the class so they don't have to be retrieved for every
index.
Avoid using an incremented "loop index" variable which makes the whole
data-filling necessarily sequential. No functional changes expected,
this just simplifies some refactors to face corner storage.
Translation from python enum values were incorrect and textures created
in python using those types would result in faulty textures. In
renderdoc those textures would not bind.
Remove most of the old (pre-3.0) pose library:
- Remove The entire `editors/armature/pose_lib.c` file
- Deprecate `Object::poselib` in DNA
- Remove Operators marked as deprecated in T93405
- Remove RNA property `Object.pose_library`
- Add comment to clarify that the call `BLO_read_id_address(reader,
ob->id.lib, &ob->poselib);` handles deprecated data.
Note that this functionality has been documented as deprecated since
Blender 3.2.
What remains of the old pose library: The DNA for action markers
(`bAction::markers`) and the corresponding Python API. This will allow
future versions of Blender to still convert old pose libraries to new
ones (via the Pose Library panel in the Action editor).
Manifest task: T93406
Bugs that caused wrong renders should be fixed now, and tests that showed minor
floating point differences on platforms were tweaked to sidestep the problem.
Ref T77889
Ensure that thumbnails of images with aspect greater than 256:1 have
dimensions of at least one pixel.
See D16707 for more details
Differential Revision: https://developer.blender.org/D16707
Reviewed by Brecht Van Lommel
We need to ensure the mask layer exists before running the operator.
I made the order of function calls here the same as in newer code later
on in this file for consistency.
Differential Revision: https://developer.blender.org/D16696
Ensure that thumbnails of images with aspect greater than 256:1 have
dimensions of at least one pixel.
See D16707 for more details
Differential Revision: https://developer.blender.org/D16707
Reviewed by Brecht Van Lommel
We need to ensure the mask layer exists before running the operator.
I made the order of function calls here the same as in newer code later
on in this file for consistency.
Differential Revision: https://developer.blender.org/D16696
Simplify checks so that one check doesn't influence the following one.
Checks no longer pass the last-visited frame number into the "start frame"
parameter of the next check. This way all test values are hard-coded and
easy to read, without having to understand how all the checks fit together.
No functional changes.
Replace `EXPECT_NE(column, nullptr)` with `ASSERT_NE(column, nullptr)` to
abort the test on failure. With `EXPECT_NE`, the test would continue onto
the next like, which accesses `column->cfra` and would segfault.
No functional changes to the tests. Just better reporting of failures.
rB8b7cd1ed2a17 broke this for the paint slots
rB4669178fc378 broke this for regular attributes
Name filtering in UI Lists works when:
- [one] the items to be filtered have a name property
-- see how `uilist_filter_items_default` gets the `namebuf`
- [two] custom python filter functions (`filter_items`) implement it
themselves
-- if you use `filter_items` and dont do name filtering there, the default
name filtering wont be used
So, two problems with rB8b7cd1ed2a17:
- [1] items to be listed changed from `texture_paint_images` to
`texture_paint_slots`
-- the former has name_property defined, the later lacks this
- [2] the new `ColorAttributesListBase` defined a `filter_items` function,
but did not implement name filtering
And the problem with rB4669178fc378:
- it added `filter_items` functions, but did not implement name filtering.
These are all corrected now.
Fixes T102878
Maniphest Tasks: T102878
Differential Revision: https://developer.blender.org/D16676
This unassign the Alt+D shortcut from the detach operator. Right now the
operator has to be accessed via the menu.
Alt+D is left for duplicate link, following the other editors.
Cursor motion events on windows read the position from GetCursorPos()
which wasn't always the same location stored in `lParam`.
In situations where events were handled immediately this wasn't often a
problem, for heavier scenes or when updates between event handling was
slow - many in-between cursor events would be incorrect.
This behavior dates back to the initial commit, there doesn't seem to be
a good reason not to use the cursor coordinates from the event.
Noticed when investigating T102346.
Make OpenGL errors match formatting used by GCC & clang
(as well as Blender's logging), so utilities that recognize this
convention can be used to quickly access this location.
Detect when the operator adds its own undo step and clear the panel.
An alternative fix for [0] which caused T101743.
Needed to prevent changing values in the last operator panel from
destructively undoing brush steps.
[0]: 11bdc321a2.
Reviewed By: mont29, joeedh
Ref D16523
This reverts commit 11bdc321a2.
This change caused T101743, in general OPTYPE_UNDO should not be used
to control the UI.
This also caused 2x undo pushes to be performed when sculpting,
although sculpt mode doesn't add a step for the second undo push
so it wasn't visible to the user.
An alternative fix will be applied separately as it's too risky this
close to a release.
The following functions only supported back slashes on WIN32,
which can use both forward and back slashes.
- BLI_path_append
- BLI_path_append_dir
- BLI_path_slash_ensure
- BLI_path_slash_rstrip
Follow up to [0] which is a more limited bug-fix.
[0]: a16ef95ff6