`AssetHandle` is meant as temporary design and should be replaced by
`AssetRepresentation`. This moves us another step closer to that.
There's now an iterator for the asset-list that provides an asset
representation instead of an asset handle. Use that whenever the
representation provides all necessary data (i.e. when no preview image
access is required).
The current `Snap Base` was available and displayed to allow snapping
to `Edge Perpendicular`.
However, the usefulness of perpendicular snapping in `Set Snap Base`
mode is questionable and can sometimes cause inconvenience.
Also, removing the current `Snap Base` indicator (the `X` drawing)
makes the intention of the operation more apparent.
Therefore, this commit removes both the indicator and the effect of the
current `Snap Base` in `Set Snap Base` mode.
Pull Request: https://projects.blender.org/blender/blender/pulls/108776
Face maps were added as a prototype of a new rigging solution during
2.8 development. Their storage is redundant with the newer generic
attribute system (specifically with integer face attributes), and
they were never used much. This commit removes the face map list
and converts the storage to an attribute with the name `face_maps`.
There is nowhere to store the face map names anymore, so those
are not kept.
It probably still makes sense to have a feature like mesh face gizmo
selection for rigging. But the design and implementation woulds likely
have to change significantly, including possibly changing the storage
type, and making use of the generic attribute system instead of a
special type.
See #105317 for more discussion.
Is probably harmless in practice, but the ASAN was generating an
error about it:
draw_manager_data.cc:187:59: runtime error: member access within null pointer of type 'struct DRWUniformChunk'
Pull Request: https://projects.blender.org/blender/blender/pulls/108798
Was only happening for the tiled compositor implementation.
This is likely to be the source of flackey tests on the
buildbot.
Also, the reference image was empty because of this, so
it needs to be re-generated.
Pull Request: https://projects.blender.org/blender/blender/pulls/108800
The RNA function `FCurve.update()` now also deduplicates keys. This is done
in a way that is independent of key selection; simply the last key in the
list of keyframes 'wins' and overwrites earlier ones. It is exactly the
same as `FCurve.keyframe_points.deduplicate()`.
Workbench normals where inverted resulting to drawing artifacts like:
- Black pixels during matcaps (normals contained NAN values)
- Studio light inverted
The root cause for this was that Vulkan default to determine if a
primitive is facing the camera should be switched. The default was still
incorrect.
Although this fixes it, a better solution is to determine the front
facing based on if the viewport should be switched. As all rendering
occurs when the viewport is inverted it doesn't matter at this moment.
Pull Request: https://projects.blender.org/blender/blender/pulls/108797
Compiling files in `makesrna` as C code is often a bit annoying when converting
other files to C++ (#103343). That's because one often had to introduce additional
C wrappers.
The goal of this patch is to support compiling rna files as C++ code. This mostly
required changes in `makesrna.c` to make the generated code compatible with C
and C++. The cmake code had to change a bit as well because we need to pass
different compiler options for C++ code to avoid some warnings.
This commit also converts a few rna files to C++ already, although that is mostly
just for testing. The rest of the files are expected to be converted after this patch
is merged.
It's possible, even likely, that `makesrna.c` has to change a little bit more to
support C++, but that is hard to know without converting all files first.
Co-authored-by: Lukas Tönne <lukas@blender.org>
Co-authored-by: Ray Molenkamp <github@lazydodo.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/108290
Hopefully now the behavior is fully consistent with before the refactor,
current implemented one by this commit:
- When loading factory settings file on startup, go full-screen.
- In all other startup cases, use size as stored in the startup .blend
file.
Regression from ebb5643e59 and 32bbfbb06e.
When unlinking IDs like GN tree, materials, etc. undo step is not created.
To fix this, assign `undo_push_label` a string value for registering an
undo-step (with the help of `ED_undo_push`)
Pull Request: https://projects.blender.org/blender/blender/pulls/108452
Pinning information was accidentally skipped inside of the
UV packing engine because of their ordering.
This was most noticeable when using the "Bounding Box" shape
method, causing some pinned islands to be moved when they
should have been locked in place.
The quaternion header depended on the old C header where it doesn't
need to with a better alternative in the newer C++ types. Also remove an
unused function in another header.
This increases the framerate in a production file from about 2.3 to 2.5
FPS, and reduces gaps in a profile where the CPU was waiting for just
a few threads to finish the BVH tree lookups. If BVH lookups become
faster in the future, this grain size could be increased.
No user visible changes expected.
This brings us another step closer to replacing the temporary asset
handle design with the proper asset representation design. I held off
with this a bit because we eventually want to support non-ID assets, but
for now it is fine to consider all assets to be IDs. In future the asset
system can make the necessary distinctions still.
Now only the preview is handled via asset handle still.
`SCE_SNAP_MODE_FACE_NEAREST` is actually not supported as one of the
geometry snap modes.
It is not used for either the snap cursor or the `Set Snap Base` mode.
Fixes#108730
The call to `CustomData_interp` also interpolated the face corner
topology attributes, which broke the mesh completely. To fix this,
avoid relying on the CustomData API and move the attribute
interpolation to use the attribute API instead. This change also
makes it trivial to support all attribute types in the future.
Also, only retrieve the closest vertex once, instead of doing it
again for every attribute. Combined with building the topology
maps in parallel this approximately doubled the performance
of color attribute propagation in a test with 2 million vertices
and 8 color attributes on both domains (63 to 34 ms).
Pull Request: https://projects.blender.org/blender/blender/pulls/108773
No user visible changes expected.
This is needed in #104831 but makes sense to expose publicly in the
asset system APIs either way. So committing this to the main branch
already.
Ensure buffer read operations wait for pending GPU work to
complete. This is only required for unit tests, but required to
ensure correct results in all cases. Also adds support for staging
buffer if GPU memory type is private.
Buffer clearing routine added to support values above 1 byte.
The previous buffer clearing functionality using fillBuffer writes
values to each byte, rather than the full 32 bit uint used by the
GPU API.
Authored by Apple: Michael Parkin-White
Pull Request: https://projects.blender.org/blender/blender/pulls/108757
No user visible change expected.
It wasn't clear that the caller of `UI_textbutton_activate_rna()` would
have to override the context region for it to work correctly. This is
only the case because UI internals happen to require it.
Instead of implicitly requiring the caller to do the context override so
UI internals work, do the override inside of the API function in
question.