Age | Commit message (Collapse) | Author |
|
When assigning a new catalog ID to an asset, also refresh the "catalog
simple name". This "simple name" is stored on the asset metadata next to
the catalog UUID, to allow some emergency data recovery when the catalog
definition file is somehow lost.
|
|
Since `AssetCatalogPath` isn't default constructible (unlike the
previous `CatalogPath`, alias `std::string`), `AssetCatalog` isn't
default constructible either. But its default constructor is declared
with `= default` which Apple Clang was warning about.
Differential Revision: https://developer.blender.org/D12714
Reviewed by: Sybren Stüvel
|
|
Using `std::move()` on temporary objects prevents copy elision done by
compilers. Apple Clang warns about this.
Generally `std::move()` should be used sparingly:
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines
|
|
Ensure that catalog operations create an undo snapshot, and show
undo/redo operators in the asset browser.
A hidden operator `ASSET_OT_catalog_undo_push` is also added such that
add-ons can also set undo snapshots if they need.
|
|
Rename `bke::AssetCatalogService::store_undo_snapshot` to `undo_push`.
This makes the function named the same way as the global Blender "undo
push" function.
No functional changes.
|
|
Add an undo stack for catalog edits. This only implements the backend,
no operators or UI yet.
A bunch of `this->xxx` has been replaced by `catalog_collection_->xxx`.
Things are getting a bit long, and the class is turning into a god
object; refactoring the class is tracked in T92114.
Reviewed By: Severin
Maniphest Tasks: T92047
Differential Revision: https://developer.blender.org/D12825
|
|
Recursively delete asset catalogs with `AssetCatalogService:prune_...`
functions. This deletes the catalog and all of its children.
The old `delete_catalog` function has been renamed to
`delete_catalog_by_id()`, and is now a lower-level function (no deletion
of children, no rebuilding of the tree). The `prune_catalogs_by_path()`
and `prune_catalogs_by_id()` do delete children and do rebuild the
catalog tree.
Manifest task: T91634
|
|
Simplify the testing code that verifies the asset catalog tree. It now
prints clearer error messages when things go wrong, and it gets simpler
data to test (instead of having to explicitly pass the parent count, it
just counts the number of separators in the expected path).
No functional changes to Blender.
|
|
|
|
|
|
|
|
Introduces `BKE_appdir_folder_caches` to get the folder that
can be used to store caches. On different OS's different folders
are used.
- Linux: `~/.cache/blender/`.
- MacOS: `Library/Caches/Blender/`.
- Windows: `(%USERPROFILE%\AppData\Local)\Blender Foundation\Blender\Cache\`.
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D12822
|
|
Adds a color input node with picker.
Differential Revision: https://developer.blender.org/D12793
|
|
Use depsgraph's objects iterator to find sources of dupliobjects,
instead of looping over bases of a viewlayer.
|
|
This commit implements T91780, adding nodes to get and set builtin
attributes. Individual set nodes are used so that the values can be
exposed for direct editing, which is useful for attributes like shade
smooth and spline resolution. Individual input nodes are used to allow
reusing nodes for multiple components, and to allow grouping multiple
outputs conceptually in the same node in the future.
Input Nodes
- Radius
- Curve Tilt
- Curve Handle Positions
- Is Shade Smooth
- Spline Resolution
- Is Spline Cyclic
'Set' Nodes
- Curve Radius
- Point Radius
- Curve Tilt
- Curve Handle Positions
- Is Shade Smooth
- Spline Resolution
- Is Spline Cyclic
Using hardcoded categories is necessary to add separators to the node
menu.
Differential Revision: https://developer.blender.org/D12687
|
|
No functional changes.
|
|
Add alias for `Map<CatalogID, std::unique_ptr<AssetCatalog>>` to make the
rest of the code a bit simpler.
No functional changes.
|
|
Delete Geometry:
This adds a copy of the old node in the legacy folder and updates the
node to work with fields. The invert option is removed, because it is
something that should be very easy with fields, and to be consistent
with other nodes which have a selection. There is also a dropdown to
select the domain, because the domain can't be determined from the
field input. When the domain does not belong on any of the components
an info message is displayed.
Separate Geometry:
A more general version of the old Point Separate node. The "inverted"
output is the same as using the delete geometry node.
Differential Revision: https://developer.blender.org/D12574
|
|
|
|
This commit introduces the Align Euler to Vector function node which
rotates to a body into a given direction. The node replaces the legacy
"Align Rotation to Vector" node, which only worked on an attribute
named `rotation` internally. The "Euler" in the name is meant to make
it clearer that the rotation isn't interchangeable with a regular
vector.
Addresses T91374.
Differential Revision: https://developer.blender.org/D12726
|
|
This bug was introduced in D12190 because the list of types that support materials did not include GPencil and this caused all materials to be removed after they were created during conversion.
|
|
This bump subversion.
|
|
No functional changes.
|
|
Moved function definitions around so that all members of a class are
next to each other. Previously some functions of one class were sitting
between functions of another class.
No functional changes.
|
|
Force native slashes before comparing paths; on Windows mixing
separators caused a unit test to fail.
No functional changes.
|
|
Change the rules for determining where to save a new catalog definition
file (CDF).
Old situation (T91681): if a `blender_assets.cats.txt` file already
exists in the same directory as the blend file, write to that. If not,
see if the blend file is contained in an asset library, and write to its
top-level CDF.
The new situation swaps the rules: first see if the blend file is
contained in an asset library, and if so write to its top-level CDF. If
not, write a CDF next to the blend file.
As before, any pre-existing CDF is not just bluntly overwritten, but
merged with the in-memory catalogs.
|
|
Move `AssetCatalogTest::TearDown` close to the corresponding `SetUp`
function, so that it's easier to find.
No functional changes.
|
|
|
|
Mostly intended for debug code (asserts).
|
|
Liboverride references need a special handling during append, since
those pointers should never be made local, nor reampped to newly
localized data. And liboverride references should never be directly made
local either, to ensure their liboverride usages remain pointing to
linked data and not local one.
Issue was reported by the studio, and also probably as part of T91892.
|
|
|
|
|
|
Match API naming prefix (BKE_vfont_*) and DNA_vfont_types.h.
|
|
|
|
This didn't belong on blenlib since it uses DNA data types
and included a bad-level call to BKE_curve.h.
It also meant linking in blenlib would depend on the freetype library,
noticeable for thumbnail extraction (see D6408).
|
|
|
|
The long term goal is completely removing DerivedMesh, and these
functions are making some refactoring of mesh normals (T91186) more
complicated. They are not used anywhere.
|
|
Also includes minor improvements to
`BKE_lib_override_library_make_local` itself.
This is a complement to rB37458798fa02c.
|
|
This was simply never handled apparently.
Also fixes a regression from recent append refactor that prevented RB
objects to to properly handled too (since we instantiate loose objects
in append step now, we need to handle RigidBody ones after that
instantiation stage, otherwise nothing will happen since loose objects
won't be in any scene).
|
|
|
|
Also use more meaningful variable name.
|
|
|
|
|
|
Blender English should use 'American' variants, not 'British' variants.
|
|
|
|
Somehow, the file from T71329 has an empty curve profile. While that may
be a problem in itself, it's reasonable to avoid asserts or crashes when
loading or drawing such a CurveProfile. This commit just makes sure the
table always has a single vertex, and adds some checks in drawing code.
|
|
This simplifies the surface of the API for a CurveProfile.
|
|
|
|
|
|
|