For historic reasons buttons don't use the full button size as draggable
area by default, only a small part of it that is assumed to contain the
icon (e.g. of a label button). This isn't what we want for the big
preview buttons used here, their entire surface should be draggable.
We already have a workaround in place for this historic behavior, so we
can just enable that.
In 3.6 the names of node group sockets were using char arrays, but now
use allocated strings. The RNA system assigns nullptr to such strings
when assigning an empty string through python (UI assignment appears to
always generate a valid string). This creates issues with many STL
functions, in particular assigning nullptr to `std::string` will crash.
We have to check for valid pointers before using them in places that
don't handle nullptrs.
Pull Request: https://projects.blender.org/blender/blender/pulls/113924
The longer term plan is to allow using the same node groups in different
node tree types anyway. Also, the implicit field inputs is something that
shader nodes could benefit from soonish already.
This also fixes a bug where the geometry nodes specific declare function
was not used anymore since 38813a7441.
Depending on compiler and bitness, size_t and uint64_t can be different
types. Since uint64_t format is used explicitly cast size_t to uint64_t
to solve compiler warning.
Happens with Clang 15 on macOS.
Restore lost performance from removing `reserve` in ff4d5b6f04
in a better way. First build offsets so we know where in the result the
source data should go, then copy the data in parallel.
Joining geometries containing 1 million instances each took 194 ms
before the change and only 15.6 ms afterwards.
Pull Request: https://projects.blender.org/blender/blender/pulls/113886
Tested with IBUS on GNOME 45.
Added a capabilities flag to GHOST since support for IME works on
Wayland but not on X11, so runtime detection is needed.
With the shift to GPU-driven rendering pipeline,
the SSBO vertex fetch paradigm used to
implement workbench shadows on Metal
instead of utilising the geometry shader
path no longer worked correctly.
This is because the draw submission
required vertex amplification up-front,
based on the expected output geometry
amount for a given input geometry.
This patch aims to resolve this
issue through addition of API to
enable the features within the
GPU driven pipeline.
Co-authored-by: Michael Parkin-White <mparkinwhite@apple.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/113498
Conversion from timeline frame to frame index was done by casting to
integer, which followed logic of ffmpeg seeking. However this is not
best approach in some cases - for example when FPS of scene and movie
differs by a very small amount. In this case the first frame could be
duplicated and all other frames will appear as offset by one frame.
In particular this may happen scene is set to 29.97 fps and movie is
encoded at 30000/1001 fps. A frame will still have to be duplicated, but
it should be frame where decimal of frame index crosses 0.5 to keep
audio and video in sync as best as possible.
Pull Request: https://projects.blender.org/blender/blender/pulls/113870
When retiming key is added to frame before strip starts, this causes
crash on null dereference. After adding null check, this creates
retiming data, even though operation is not valid. To prevent creating
empty retiming data, `SEQ_retiming_data_ensure()` is only executed, when
operator actually adds a keyframe.
- Decouple the compressing and non-compressing wrappers.
- Turn the open(), close() and write() callbacks into proper virtual methods.
- Change the write() interface to take a void pointer and return
a bool to simplify its use.
- Eliminate the need for explicit initialization of the wrappers' fields.
Co-authored-by: Ivan Kosarev <mail@ivankosarev.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/113071
Face Corner is not supported.
In case prefer domain is used, face corner shouldn't be proposed.
This will make the viewer node preview the values on the point
domain instead in the viewport.
Pull Request: https://projects.blender.org/blender/blender/pulls/113905
Changes to ensure all supported texture tests are passing with the
Metal backend and add additional tests to cover texture_3d and
texture 1d test cases.
Authored by Apple: Michael Parkin-White
Co-authored-by: Michael Parkin-White <mparkinwhite@apple.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/113889
Check for multiple faces that use the same vertices. The implementation
uses a a Map with a Set of vertex pointers, so is not necessarily fast,
but this is just a debug check anyway.
Pull Request: https://projects.blender.org/blender/blender/pulls/113899
When renaming a layer to a (long) name that was already taken
by another layer, Blender would crash.
This was because the memory for the unique string was held by
`std::string` which cannot grow.
The solution is to use `char unique_name[MAX_NAME]`.
Note: Initially committed as 7705e49bcd, but got reverted with
1f0520034a. Note includes fixes for unit tests.
If an asset library was pointing to the same path as the current file is saved
in, the assets from this library wouldn't be loaded. This is because the asset
library service assumed the absolute library root path is a way to uniquely
identify an asset library.
Instead, identify the asset library using both the root path and the library
type.
Blender was writing out color attributes on USDPreviewSurface as
float3 instead of the more accurate color3f. While this is somewhat
technically okay, since color3f is a role alias for float3, it does cause
issues in applications that are correctly expecting color3f.
The material writer code actually expects color3f in other
sections, but was using float3 in this section erroneously.
Co-authored-by: Dhruv Govil <dgovil2@apple.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/113695
Of the two overloaded functions clang chose the non-span version with
only a single item in the initializer list. Resolve that by not using an
intializer list in that case.