Adds support for Storage buffers, including changes to the resource
binding model to ensure explicit resource bind locations are supported
for all resource types.
Storage buffer support also includes required changes for shader
source generation and SSBO wrapper support for other resource
types such as GPUVertBuf, GPUIndexBuf and GPUUniformBuf.
Authored by Apple: Michael Parkin-White
Pull Request: https://projects.blender.org/blender/blender/pulls/107175
Loading a font in BLF would search a list of directory presets
however these presets were never used.
Remove them as all callers pass in full paths.
Also rename FontBLF::name to mem_name as it's only needed as an ID
for in-memory fonts (to prevent them being loaded multiple times).
Non-unique font loading now compares against the filepath or mem_name
when loading from files or memory (before both used `name` which was
often the filepath, sometimes the full ID-name).
- Rename name/filename/path to filepath when it's used for full paths.
- Rename name/path to dirpath when it refers to a directory.
- Rename file to filepath or path (when it may be a file or dir).
- Rename ImBuf::name & anim::name to filepath.
Rename BLI_make_existing_file to BLI_file_ensure_parent_dir_exists.
The previous name read as if it would make (touch) the file,
where as it ensures the directory component of the path exists.
Move from BLI_path to BLI_fileops as path utilities should only
manipulate paths and not deal with file IO creation
(this has more in common with BLI_file_touch for e.g.).
A NULL defname would early exit (doing nothing) this isn't good behavior
as this function should always make the name unique and a NULL defname
is likely an error in the code which would allow duplicate names.
This is also inconsistent with BLI_uniquename_cb which always
wrote the defname into the name if it was empty.
Mark this argument as never-NULL.
Explicitly list ATTR_NONNULL indices in most cases so it's explicit
that arguments aren't NULL (and adding new arguments that can be NULL
isn't such a hassle).
The helper function `move_key` did exactly the same things as `BKE_fcurve_keyframe_move_value_with_handles`
It was only created because I wasn't aware that such logic already existed
No functional changes
Pull Request: https://projects.blender.org/blender/blender/pulls/107402
The slider operators in the Graph Editor were missing operator flags for the cursor wrapping to work.
I've added it to the operators that allow overshoot, because for those it is really important to have no limits on scrolling.
Pull Request: https://projects.blender.org/blender/blender/pulls/107435
In some cases the Geometry Nodes Volume Cube generates
a Volume grid that doesn't contain any leaf nodes. This can happen
when only tiles are needed to represent the volume.
This PR changes the `empty_grid` check function to also check if
there are any active tiles in the grid before returning `true`.
Pull Request: https://projects.blender.org/blender/blender/pulls/107551
Now, when link drag search is used to create new input value nodes, it
also moves socket values into node storage. This means, by design, that
result of evaluation on node tree will not be changed. For data blocks,
the original value is set to null, thus avoiding the existence of
unused pointers.
Right now a few nodes (in shader in many cases) are implemented without
node storage, but by storing value in socket itself. Float value input
node is unsupported in this way too.
Pull Request: https://projects.blender.org/blender/blender/pulls/107470
Found investigating #107420.
Steps to reproduce were:
- remove all objects from the scene
- add rigid body world
- bake
- crash
BKE_ptcache_bake would assume a cache can always be found, but with an
empty rigid body world this is not the case -- accessing flags would then
crash.
Now just check if we actually have a cache.
Pull Request: https://projects.blender.org/blender/blender/pulls/107537
`ptcache_baker_create` falsely assumed the PointCache owner id is always
an **object**, but when baking rigid body world it is a **scene**. Code
would cast the ID to an object and passed that to `BKE_ptcache_id_find` /
`BKE_ptcache_ids_from_object` (which can get terribly wrong -- reading
_something_ on the scene as something from the assumed object).
Prior to f61ff22967 this was less likely to be a problem, but that
commit introduced a `DrawDataList` into the `struct Scene`. In the file
from the report, this would lead to `foreach_object_particle_ptcache`
now recognizing garbage memory as a particle system, accessing its
`ParticleSettings` `phystype` would then crash (buffer-overflow).
Now pass a NULL object to `BKE_ptcache_id_find` in case we are having a
scene, following code still handles rigid bodies just fine (the scene is
actually passed separately as well).
Pull Request: https://projects.blender.org/blender/blender/pulls/107536
Vulkan spec only wants to have a single aspect bit when a texture
contains both a stencil and a depth part. As for Blender depth
is more used than stencil we standardize to depth aspect.
Pull Request: https://projects.blender.org/blender/blender/pulls/107542
In some cases, some partial resync roots would be missed during the
partial resync process, leading to incomplete resync of all the needed
data.
This was caused by tagging some liboverrides for resync _after_ they had
already be evaluated as part of parenting hierarchy of other
liboverrides. Fix is simply to split both steps apart, such that all IDs
that need it are tagged to resync first, and then hierarchies are
evaluated to find the required partial resync roots whithin a hierarchy.
This commit mainly addresses issues when a part of an override hierarchy
does not match anymore the linked reference data, and gets isolated form
the hierarchy root (there is no parenting chain to the root anymore).
The typical case being an object or sub-collection being moved to
another subcollection in the linked data.
Case identified while working on some Pets production files.
Note that in some cases this isolated chunk of the hierarchy will be
linked back into the appropriate place, in others it should be fully
removed (instead of staying as unused data). The later will be handled
in a another future commit.
This commit mainly detect and use a new tag for such cases, and correct
the checks to take it into account.
It also does a bit of cleanup, and replaces some asserts by `CLOG_ERROR`
reports.
Due to index-only referencing in insertion of new NLA tracks in
liboverride data, it may happen that the source of an inserted track
cannot be found.
This index-only based handling of NLA tracks in liboverrides is very
weak, in the future this will be solved by ensure uniqueness of their
names, then name-based reference can be used instead, as already done with
modifiers, constraints, etc.
Code was exposing apparently internal functions to the public header, so
it could reuse it in other View2D files. Worse even, a struct was
defined twice in different source files and they would have to be kept
in sync, just because there is no shared header file.
Such internal header files are useful and don't really cause any harm.
This fixes a crash where merging vertices by distance leads to a crash since
0652945dbd. The change did not cause
the bug though, it just made the underlying issue visible.
The issue was that `kdtree_order` assumed that the `KDTreeNode.index` didn't
have gaps, i.e. every index in a certain range is used. However, that is not the
case when only a subset of the vertices of a mesh are added to the kdtree.
Pull Request: https://projects.blender.org/blender/blender/pulls/107535
This change is required for 0001485365. File version bump was included
in PR but it was behind the main branch. In main, version was updated
by 5d0595fded.
get_index_dir passed in the wrong size, also remove strange use of
BLI_path_split_dir_file which copied the directory into `file`,
only to overwrite it with the `file` afterwards.
Modifier name is being displayed as label in panel header which has restricted
the editing of it. This PR will allow to change the name of F-curve modifier
by exposing string property "name"
Included versioning code for modifier name. This will add suffix to the name if
multiple instances of same modifier exists in modifier stack.
Differential Revision: https://archive.blender.org/developer/D17142
Pull Request: https://projects.blender.org/blender/blender/pulls/104949