Age | Commit message (Collapse) | Author |
|
Addresses T76082.
Since the DirectX backend does not work for AMD gpus
(wglDXRegisterObjectNV() fails to register the shared OpenGL-DirectX
render buffer, displaying a pink screen to the user), the original
solution was to use SteamVR's OpenGL backend, which, as tested
recently, seems to work without any issues on AMD hardware.
However, the SteamVR OpenGL backend (on Windows) was disabled in
fe492d922d6d since it resulted in crashes with NVIDIA gpus (and still
crashes, as tested recently), so SteamVR would always use the
AMD-incompatible DirectX backend (on Windows).
This patch restores use of the SteamVR OpenGL backend for non-NVIDIA
(AMD, etc.) gpus while maintaining the DirectX workaround for NVIDIA
gpus. In this way, issues are still resolved on the NVIDIA side but
AMD users can once again use the SteamVR runtime, which may be their
only viable option of using Blender in VR.
Reviewed By: Julian Eisel
Differential Revision: https://developer.blender.org/D12409
|
|
Reuse temporary windows when they share the same single area type, not
because they share the same title.
See D12401 for more details.
Differential Revision: https://developer.blender.org/D12401
Reviewed by Campbell Barton
|
|
|
|
Line endings are already added.
|
|
Caused by {rB3e4d720ae483}.
Before above commit, this had a different path handling and
RNA_path_from_ID_to_struct() was always used [which kind of took care of
this]. Now this is only used if ptr represents an ID itself, so we are
"loosing" part of the path.
This patch adds the path back on the member_id in
wm_context_member_from_ptr() for everthing related to space_data, so
WM_context_path_resolve_property_full() can construct a full path even
for these.
Maniphest Tasks: T91225
Differential Revision: https://developer.blender.org/D12418
|
|
|
|
Avoids duplicating the image buffer when saving thumbnails.
|
|
Scaling didn't clamp above zero, see T89868.
|
|
This adds an option to use a capture of the entire main window as the
blend file preview thumbnail.
See D10492 for details and examples.
Differential Revision: https://developer.blender.org/D10492
Reviewed by Campbell Barton
|
|
Increase effective resolution of blend preview images from 128x128 to
256x256 for versions saved in the file system thumbnail cache.
See D10491 for details and examples.
Differential Revision: https://developer.blender.org/D10491
Reviewed by Campbell Barton
|
|
|
|
Use context members instead of not working well or failing due to:
- Missing "path" functions (in the case of edit-bones).
- Paths containing names (in the case of sequence-strips or pose-bones).
While technically correct it's not useful for shortcuts or
menu items to lookup data by name.
|
|
Only append RNA_path_from_ID_to_struct to context attributes if those
paths resolve to ID types.
Also simplify creating RNA paths by adding utility functions:
- WM_context_path_resolve_property_full
- WM_context_path_resolve_full
Part of fix for T90723.
|
|
This function was not working if the window is partially out of screen space.
|
|
This reverts 151eed752b01. Originally thought it was necessary to
initialize selected/active indices to -1 to prevent out-of-bounds
list access, but this is not needed since null checks are already
performed after obtaining list members via BLI_findlink().
In addition, leaving indices zero-initialized facilitates use of the
Python API, for example when displaying action map information in a
UI list.
|
|
|
|
This better matches other functions like `BKE_screen_find_area_xy`.
|
|
|
|
Add null check for runtime data since it could already have been
freed via wm_xr_exit() (called on file read) prior to the session
exit callback.
Also, fix potential memory leak by freeing session data in
wm_xr_runtime_data_free() instead of session exit callback.
|
|
This fixes two memory leaks related to XR action maps.
1. Freeing of action maps needs to be moved from wm_xr_exit() to
wm_xr_runtime_data_free() since the runtime may have already been
freed when calling wm_xr_exit().
2. Action bindings for action map items were not being freed. This
was mistakenly left out of e844e9e8f3bb since the patch needed to be
updated after d3d4be1db3a0.
|
|
This was noted as a TODO as it wraps RNA_property_string_get_alloc
which takes a length return argument.
|
|
Compressing blendfiles can help save a lot of disk space, but the slowdown
while loading and saving is a major annoyance.
Currently Blender uses Zlib (aka gzip aka Deflate) for compression, but there
are now several more modern algorithms that outperform it in every way.
In this patch, I decided for Zstandard aka Zstd for several reasons:
- It is widely supported, both in other programs and libraries as well as in
general-purpose compression utilities on Unix
- It is extremely flexible - spanning several orders of magnitude of
compression speeds depending on the level setting.
- It is pretty much on the Pareto frontier for all of its configurations
(meaning that no other algorithm is both faster and more efficient).
One downside of course is that older versions of Blender will not be able to
read these files, but one can always just re-save them without compression or
decompress the file manually with an external tool.
The implementation here saves additional metadata into the compressed file in
order to allow for efficient seeking when loading. This is standard-compliant
and will be ignored by other tools that support Zstd.
If the metadata is not present (e.g. because you manually compressed a .blend
file with another tool), Blender will fall back to sequential reading.
Saving is multithreaded to improve performance. Loading is currently not
multithreaded since it's not easy to predict the access patterns of the
loading code when seeking is supported.
In the future, we might want to look into making this more predictable or
disabling seeking for the main .blend file, which would then allow for
multiple background threads that decompress data ahead of time.
The compression level was chosen to get sizes comparable to previous versions
at much higher speeds. In the future, this could be exposed as an option.
Reviewed By: campbellbarton, brecht, mont29
Differential Revision: https://developer.blender.org/D5799
|
|
Instead of handling mmap, compression etc. all directly in readfile.c, refactor
the code to use a generic FileReader.
This makes it easier to add new compression methods or similar, and allows to
reuse the logic in other places (e.g. thumbnail reading).
Reviewed By: campbellbarton, brecht, mont29
Differential Revision: https://developer.blender.org/D5799
|
|
Also hyphenate 'mouse-move' use doxy sections in render_update.c &
move function comment from the header to the source.
|
|
|
|
|
|
|
|
This addresses reduced visibility of scenes (as displayed in the VR
headset) that can result from the 8-bit color depth format currently
used for XR swapchain images.
By switching to a swapchain format with higher color depth (RGB10_A2,
RGBA16, RGBA16F) for supported runtimes, visibility in VR should be
noticeably improved.
However, current limitations are lack of support for these higher
color depth formats by some XR runtimes, especially for OpenGL.
Also important to note that GPU_offscreen_create() now explicitly
takes in the texture format (eGPUTextureFormat) instead of a
"high_bitdepth" boolean.
Reviewed By: Julian Eisel, Clément Foucault
Differential Revision: http://developer.blender.org/D9842
|
|
Small error due to wrong variable usage.
Introduced in rBfcd2d63b644e.
|
|
There was already some code for that, but it was broken, and proper
resync was completely missing.
There might still be more resync needed in library linking operators
though.
|
|
Clearing the window was done in wm_file_read_post which was deferred.
This was needed as it left the context in an invalid state
where the window was set but the screen wasn't.
Crashing when setting up keymaps that attempted to access the
scene from the window in the property update function.
Regression in 497bc4d19977abc7b9e2c0f5024a23057e680954
|
|
- Remove old comment for editors with weak syntax highlighting.
- Remove disabled code to initialize Blender with a file path.
- Remove file name references to function names since these
were outdated, modern development environments can look up this info.
|
|
Resolve order of initialization error reading startup file,
support postponing running wm_file_read_post until Blender
has been initialized.
Deferring updates allows duplicate initialization
to be removed from WM_init.
Reviewed By: mont29
Ref D12184
|
|
Also add wm_homefile_read_ex which is only needed for the first
execution at startup.
|
|
|
|
ID data-blocks that could be accessed from Python and weren't freed
using BKE_id_free_ex did not release the Python reference count.
Add BKE_libblock_free_data_py function to clear the Python reference
in this case.
Add asserts to ensure no Python reference is held in situations
when ID's are copied for internal use (not exposed through the RNA API),
to ensure these kinds of leaks don't go by unnoticed again.
|
|
To solve this, the unproject code was redone in order to simplify and optimize.
|
|
|
|
No functional changes.
|
|
Although the relevant structs (wmXrRuntime/XrActionMap/
XrActionMapItem) are zero-allocated, the selected and active action
map indices need to be initialized to -1 to prevent potential
out-of-bounds list access.
|
|
|
|
Addresses the remaining portions of T77137 (Python API for Controller
Interaction), which was partially completed by D10942.
Adds an XR "action maps" system for loading XR action data from a
Python script. Action maps are accessible via the Python API, and are used
to pass default actions to the VR session during the
xr_session_start_pre() callback.
Since action maps are stored only as runtime data, they will be
cleaned up with the rest of the VR runtime data on file read or exit.
Reviewed By: Julian Eisel, Hans Goudey
Differential Revision: https://developer.blender.org/D10943
|
|
Provides two key improvements to runtime controller data.
1. Separates controller poses into two components, "grip" and "aim",
which are both required to accurately represent the controllers
without manual offsets.
Following their OpenXR definitions, the grip pose represents the
user's hand when holding the controller, and the aim pose represents
the controller's aiming source.
2. Runtime controller data is now stored as a dynamic array instead
of a fixed array. This makes the API/functionality more adaptable to
different systems.
Does not bring about any changes for users since only internal
runtime functionality is currently affected.
Reviewed By: Julian Eisel
Differential Revision: http://developer.blender.org/D12073
|
|
Was trying to get asset information even when there was none, i.e. when
the material wasn't an asset or not dragged from the Asset Browser.
|
|
|
|
Provides several important improvements to the runtime action
bindings operation and internal API.
Moves input-specific action data (input thresholds, input regions,
pose offsets/spaces) from actions to more granular action bindings.
This allows a single action to be mapped to a variety of inputs,
without having to share a single input threshold, region, or space.
Also removes the need for action space creation API, as spaces for
pose actions will be automatically created with the bindings.
The correct action data for the current inputs is set by calling
xrGetCurrentInteractionProfile() to get the current profile and then
retrieving the corresponding mapped data.
Does not bring about any changes for users since only internal
runtime functionality is currently affected.
Reviewed By: Julian Eisel
Differential Revision: http://developer.blender.org/D12077
|
|
This patch changes the drop named material tooltip to give feedback to
the user what is going to happen when they invoke the change.
There are 3 states:
* "": Operator will be canceled as not all data is present (dropping on
background.)
* "Drop <named material> on <object name> (slot <slot number>, replacing
<current material in slot>).
* "Drop <named material> on <object name> (slot <slot number).
Reviewed By: Severin
Maniphest Tasks: T90371
Differential Revision: https://developer.blender.org/D12106
|
|
|
|
Extend the 'reading error' container to produce the generic short
message in the popup directly visible by the user, and move all detailed
info the `INFO` reports that only show up in the console and Info
editor.
|
|
|