In Blender a context should not be shared between threads. In Vulkan a
command pool must not be shared between threads. In the current
implementation the command pool are stored on device level and could
therefore be shared between multiple context which made the implementation
not matching these rules.
This PR moves the command pool from device to command buffers where it
would not conflict between other contexts. This PR doesn't make the Vulkan
backend fully multithreaded. The access to the queue is still missing.
Pull Request: https://projects.blender.org/blender/blender/pulls/114977
This patch allows access to the depth pass in the Viewport Compositor.
Since the depth information require full precision, making use of the
pass requires the full precision option for now. In the future, this
pass will always be stored using full precision regardless of the
precision option.
In 89e3ba4e25, the preprocess step was removed because the
normals are lazily calculated. But now we need to fetch the source normals
from the correct placed-- they still were looked for in `CD_NORMAL`.
When using `SCOPED_TIMER` or `SCOPED_TIMER_AVERAGED`
the display would switch from ns to ms
once the value is over 0.1 ms with a precision of 1.
So when the timer value is hovering in the range of 0.1 - 0.2 ms it is
not giving any useful information.
Fix this by adding another digit to the precision of ms.
Pull Request: https://projects.blender.org/blender/blender/pulls/114724
Caused by bfe6128748.
The split frame logic actually became inverted in the update:
when the cursor position is true, then the frame is supposed
to be initialized in the invoke().
The menu does not use cursor position, so the code path where
the frame is retrieved from the RNA properties was used, and
the frame was never initialized in that case.
Pull Request: https://projects.blender.org/blender/blender/pulls/114973
Seems that the ExponentWithLinearTransform with offset=0 does not render
properly on GPU on Apply Silicon GPUs. Likely, it is possible to use plain
ExponentTransform in this case, which should also be faster.
Candidate for 4.0.1 corrective release.
Pull Request: https://projects.blender.org/blender/blender/pulls/114853
Exposed by 16e4eeb9c0.
In (rare) occasions, a Curve's `CharInfo` can be NULL.
This also crashed going into editmode on affected text objects in
previous versions, however opening and rendering these files was still
fine.
In 4.0, opening those kind of files crashed.
It is not entirely clear how this can happen (there are comments in code
dating back to 97df61a7e5 mentioning "old file", there might be other
reasons, too), still, avoiding the crash on file open seems like good
practice.
Pull Request: https://projects.blender.org/blender/blender/pulls/114916
Mostly just the result of running `blender_icons_update.py` without adding or changing any icon source files. Removal of three unused icons and adding three others to the project to resolve conflicts between them.
Pull Request: https://projects.blender.org/blender/blender/pulls/114874
Convert the vector socket from four nodes to a rotation socket, adding
versioning to insert the conversion nodes and change the default values
where necessary.
- Distribute Points on Faces
- Instance on Points
- Rotate Instances
- Transform Geometry
Implicit conversions from vectors and floats, and to vectors have been
added, though using rotation sockets directly can be faster, since converting
to and from Euler rotations is slow. Conversion nodes are not inserted
by versioning if the implicit conversions can be used.
This change is not forward compatible with 3.6, and socket values
are lost when opening 4.1 files in 4.0. The correct socket types are
added back in old versions, though newly added conversion nodes
may have to be removed.
Pull Request: https://projects.blender.org/blender/blender/pulls/111482
Move object runtime data to a separate header and allocate it separately
as `blender::bke::ObjectRuntime`. This is how node, mesh, curves, and
point cloud runtime data is stored.
Benefits:
- Allow using C++ types in object runtime data
- Reduce space required for Object struct in files
- Increase conceptual separation between DNA and runtime data
- Remove the need to add manual padding in runtime data
- Include runtime struct definition only in files that require it
Pull Request: https://projects.blender.org/blender/blender/pulls/113957
Extend node tools to display tool assets in object mode as well
as edit and sculpt modes. For consistency with existing Blender
design, selection cannot be set and is just "true" in object mode
because it can't be visualized. The visibility of tools can be
customized per object type in object mode as well.
See #101778
Pull Request: https://projects.blender.org/blender/blender/pulls/114819
Different from most layouts. The Turkish keyboard layout treats the `i` as the lowercase `İ` and the `ı` as the lowercase `I`.
So we have 2 different types of i: `ı` and `İ`. And two different I key positions on the keyboard.
This key with a different position is mapped as special and returns the corresponding `event->type` of the US keyboard `"` (`EVT_QUOTEKEY`).
The apparently most appropriate event for this key would be `EVT_IKEY`.
This type of change needs to be treated with care, as it may alter other shortcuts that are already common to Turkish users.
Pull Request: https://projects.blender.org/blender/blender/pulls/114917
For improving performance in the triangulate node (#112264), it's
helpful to know whether the mesh has edges or faces that overlap
each other. If that is known to be false, the node can skip edge de-
duplication.This might apply to the future "Replace Faces" node too.
This information is stored as a flag on the mesh and set in various
places that create "clean" new meshes. It isn't calculated lazily unlike
other other areas, because the point is to improve performance, and
the calculation probably isn't faster than the duplication check it's
meant to replace.
Pull Request: https://projects.blender.org/blender/blender/pulls/113205
Adds a python test script for the field inferencing mechanism in geometry nodes.
Tests various combinations of field-to-value and value-to-field combinations as well as unconnected base nodes. Zones are tested because they can require multiple passes to resolve, especially when nesting.
Testing is based on socket display shapes as a proxy for field type, since the field type is not exposed in RNA yet. Likewise, testing for red links caused by field dependencies can only be done indirectly currently, because such links are not actually made invalid by the inferencing code, and just drawn red by the editor.
Pull Request: https://projects.blender.org/blender/blender/pulls/114903
Caused by 0e01667e25 .
Above commit changed it so that operator properties (set from python)
were ignored for `split_frame` & `split_channel` in case
`use_cursor_position` is False.
Should be the other way around.
Pull Request: https://projects.blender.org/blender/blender/pulls/114905
Refactoring of object bounds to make evaluated to original syncing
more explicit wasn't accounted for yet. This was a mistake in the most
recent refactor 1cbd0f5a85.
To fix this, add separate functions to account for `runtime.bb` which
is the data synced from the evalauted object to the original. In future
refactors, `runtime.bb` will be changed more, including a more helpful
name that reflects this purpose.
Pull Request: https://projects.blender.org/blender/blender/pulls/114897
The motion tracking always operates with horizontal sensor mapping, but
conversion code form tracking camera to Blender camera was not setting
the sensor fitting to Horizontal (Python code was leaving sensor fitting
unchanged, C code was setting it to Auto).
Additionally, the Python code was not handling camera shift, making it
so non-centered optical center was not handled correctly.
The reason why the code is written in two places is because C code is
used when conversion from tracking camera to Blender happens after solving
the motion, and the Python code is used for the "Setup Tracking Scene".
It is possible to unify some code, but it is not that much of an importance
at this time.
Pull Request: https://projects.blender.org/blender/blender/pulls/114253
When parsing PLY files it was possible that the buffer would contain
leading newline characters which were not being accounted for.
Ensure we skip past them each time we refill the buffer. Also properly
return an error string when handling such lines in the future.
Pull Request: https://projects.blender.org/blender/blender/pulls/114878
Replace use of macro FAILED with explicit checks for S_OK returns. Some
of these functions can return S_FALSE, which indicates a negative
condition that is not failure. It is not caught by the FAILED macro.
Therefore this function will fail in circumstances where the quick
access folder is not found or perhaps empty.
Pull Request: https://projects.blender.org/blender/blender/pulls/114866
This is never define and has no use in current blender.
If we want to keep this functionality, we should
at the very least rename it to `GHOST_WINDOW_ALPHA`.
Pull Request: https://projects.blender.org/blender/blender/pulls/114815
No functional changes.
Clean up the code by
* returning early where possible
* removing comments that just repeat what the code does
* Make sure comments follow the style guidelines
Pull Request: https://projects.blender.org/blender/blender/pulls/114851
The GPU buffer type was replaced with `float` in 4151691552,
but the "no mask" case wasn't changed. We still assigned a `uchar` value
to a `float` pointer, which made the drawing look random. Instead do the
same fill we use for other PBVH types.
Pull Request: https://projects.blender.org/blender/blender/pulls/114846
Anisotropy samplers are optional in Vulkan. This change will disable
anisotropy samplers when the feature isn't available on the device.
The support for anisotropy samplers is around 90% so would not expect
any compatibility issues.
Pull Request: https://projects.blender.org/blender/blender/pulls/114833
This adds a "Group ID" input to the Fill Curve node, per #102285.
The curve filling operation is performed separately for each group,
so curves associated with different Group IDs do not intersect.
This implementation also supports Grease Pencil 3 curves.
Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/114048