Age | Commit message (Collapse) | Author |
|
This is a continuation of D13462 to clean up source typos.
Differential Revision: https://developer.blender.org/D13471
|
|
|
|
This improves both code finding, for example "color ramp" now has its own file.
And now each node has its own namespace so function names can be simplified
similar to rBfab39440e94
This commit also makes all file names use snake case instead of camel case.
Reviewed By: HooglyBoogly
Differential Revision: https://developer.blender.org/D13482
|
|
Most of our field inputs are currently specific to geometry. This patch introduces
a new `GeometryFieldInput` that reduces the overhead of adding new geometry
field input.
Differential Revision: https://developer.blender.org/D13489
|
|
Creates 4 new nodes which provide topology information
for the mesh. Values are interpolated from the primary
domain in each case using basic attribute interpolation.
Vertex Neighbors
- Vertex Count
- Face Count
Face Neighbors
- Vertex Count
- Neighboring Face Count
Edge Vertices
- Vertex Index 1
- Vertex Index 2
- Position 1
- Position 2
Face Area
- Face Area
Differential Revision: https://developer.blender.org/D13343
|
|
This technique isn't really necessary anymore, because unity builds
avoid instantiating the same template too many times already.
|
|
Earlier code assumed that the active strip was on the active track. This
commit detects when this assumption doesn't hold, and adds a more thorough
search of the active strip.
|
|
No longer needed now that all code uses that new
BKE_blendfile_link_append module, and that instantiation code in
BLO_readfile has been removed.
|
|
`GeometrySet` contains at most one component of each type.
Previously, a map was used to make sure that each component
type only exists once. The overhead of a map (especially with
inline storage) is rather large though. Since all component types
are known at compile time and the number of types is low,
a simple `std::array` works as well.
Some benefits of using `std::array` here:
* Looking up the component of a specific type is a bit faster.
* The size of `GeometrySet` becomes much smaller from 192 to 40 bytes.
* Debugging a `GeometrySet` in many tools becomes simpler because
one can easily see which components exists and which don't
|
|
This helps to tell when a pointer is expected to be null, and avoid
overly verbose code when dereferencing. This commit also includes
a few other cleanups in this area:
- Use const in a few places
- Use `float2` instead of `float[2]`
- Remove some unnecessary includes and old code
The change can be continued further in the future.
|
|
`IMB_transform` is used in VSE. It had a required crop parameter
for cropping the source buffer. This is not always needed.
In the image engine we want to use the use the `IMB_transform`
with wrap repeat. Both options are mutual exclusive and due
to performance reasons the wrap repeat is only available when
performing a nearest interpolation.
|
|
|
|
Without this fix `CustomDataAttributes::create_by_move`
did not work on named attributes.
|
|
|
|
|
|
The asset metadata custom property `["is_single_frame"]` was set
incorrectly. Since this is intended for forward compatibility, including
being covered by the asset metadata indexing, it's important to have it
set correctly from the first release of Blender that includes the asset
browser.
Differential Revision: https://developer.blender.org/D13452
|
|
File paths can be any encoding, so using some UTF-8-specific function is
not the right way to go.
|
|
|
|
Since our design is to always keep data-blocks marked as assets on exit,
and our technical design for this is to do this via fake users, ensure
the fake user is set for an appended asset.
Reviewed by: Bastien Montagne
Differential Revision: https://developer.blender.org/D13443
|
|
Instantiation is now fully handled by BKE_blendfile_link_append module.
Note that this also allows removal of the `BLO_LIBLINK_NEEDS_ID_TAG_DOIT`
flag.
Part of T91414: Unify link/append between WM operators and BPY context
manager API, and cleanup usages of `BKE_library_make_local`.
|
|
|
|
These existing names were unhelpful at best, actively confusing at
worst. This patch renames them to be consistent with the terms
used to refer to the values in the UI.
- `width` -> `offset`
- `ext1` -> `extrude`
- `ext2` -> `bevel_radius`
Differential Revision: https://developer.blender.org/D9627
|
|
No functional change, just more clear this way it comes from src.
|
|
While it is an edge case, it isn't incorrect for the attribute storage
to have a zero size, it will just return an empty span or nothing.
|
|
|
|
This node calculates the dual of the input mesh. This means that faces
get replaced with vertices and vertices with faces. In principle this
only makes sense when the mesh in manifold, but there is an option to
keep the (non-manifold) boundaries of the mesh intact.
Attributes are propagated:
- Point domain goes to face domain and vice versa
- Edge domain and Face corner domain gets mapped to itself
Because of the duality, when the mesh is manifold, the attributes get
mapped to themselves when applying the node twice.
Thanks to Leul Mulugeta (@Leul) for help with the
ascii diagrams in the code comments.
Note that this does not work well with some non-manifold geometry,
like an edge connected to more than 2 faces, or a vertex connected to
only two faces, while not being in the boundary. This is because there
is no good way to define the dual at some of those points. This type
of non-manifold vertices are just removed for this reason.
Differential Revision: https://developer.blender.org/D12949
|
|
Replace compare floats node with a generalized compare node. The node
allows for the comparison of float, int, string, color, and vector.
The datatypes support the following operators:
Float, Int: <, >, <=, >=, ==, !=
String: ==, !=
Color: ==, !=, lighter, darker
(using rgb_to_grayscale value as the brightness value)
Vector Supports 5 comparison modes for: ==, !=, <, >, <=, >=
Average: The average of the components of the vectors are compared.
Dot Product: The dot product of the vectors are compared.
Direction: The angle between the vectors is compared to an angle
Element-wise: The individual components of the vectors are compared.
Length: The lengths of the vectors are compared.
Differential Revision: https://developer.blender.org/D13228
|
|
Now that we can store any dynamic attribute on the instances component,
we don't need the special case for `id`, it can just be handled by the
generic attribute storage. Mostly this just allows removing a bunch
of redundant code.
I had to add a null check for `update_custom_data_pointers` because
the instances component doesn't have any pointers to inside of
custom data.
Differential Revision: https://developer.blender.org/D13430
|
|
When enabling or disabling a Mesh Sequence Cache modifier of an Object
with a hair particle system, the hair would switch positions. This is
caused because original coordinates in Blender are expected to be
normalized, and toggling the modifier would cause the usage of different
orco layers: one that is normalized, and the other which isn't.
This bug exposes a few related issues:
- if the Alembic file did not have orco data,
`MOD_deform_mesh_eval_get`, used by the particle system modifier, would
add an orco layer without normalization
- `MOD_deform_mesh_eval_get` would also ignore the presence of an orco
layer (e.g. one that could have been read from Alembic)
- if the Alembic file did have orco data, the data would be read
unnormalized
To fix those various issues, original coordinates are normalized when
read from Alembic and unnormalized when written to Alembic; and a new
utility function `BKE_mesh_orco_ensure` is added to add a normalized
orco layer if none exists on the mesh already, this function derives
from the code used in the particle system.
Reviewed By: brecht
Maniphest Tasks: T92561
Differential Revision: https://developer.blender.org/D13306
|
|
|
|
No behavioral changes are expected here.
Part of T91414: Unify link/append between WM operators and BPY context
manager API, and cleanup usages of `BKE_library_make_local`.
|
|
given library.
This will be used by the copy/paste code.
Part of T91414: Unify link/append between WM operators and BPY context
manager API, and cleanup usages of `BKE_library_make_local`.
|
|
When appended collections are instantiated in viewlayers, do not add to
viewlayers collections children of other instantiated collections.
This default behavior is required for proper copy/paste behavior. If
previous behavior needs to be brought back for regular append operation,
this can be decided and done, but think this default behavior also makes
sense in normal append case.
part of T91414: Unify link/append between WM operators and BPY context
manager API, and cleanup usages of `BKE_library_make_local`.
|
|
The attributes need to be reallocated when the size changes.
Differential Revision: https://developer.blender.org/D13390
|
|
- Rename the Curve Parameter node to Spline Parameter.
- Add "Index on Spline" to the node. This output is the index of
the current point on it's parent spline rather than the entrire curve.
Differential Revision: https://developer.blender.org/D13275
|
|
Now that those functions are much widely used, just return early in case
there is nothing to link/append, instead of asserting over it.
|
|
This includes adjustment of rBc12d8a72cef5 to the new path traversal code
introduced in rBe5e8db73df86.
|
|
Add flag to `BKE_bpath_traverse_id()` and friends to skip weak
references (see below). This makes a distinction between "this blend
file depends on that file" and "this blend file references that file,
but doesn't directly use its data". This distinction is for the Asset
Bundle install operator, which refuses to copy the blend file when it's
not self-contained.
Weak references are those that are not directly used by the blend file,
but are still present to allow path rewriting. For example, when an
Asset is loaded its originating blend file is saved in
`ID::library_weak_reference`; this reference is purely for deduplication
purposes, and not for actually loading any data.
Reviewed by: mont29, brecht
Differential Revision: https://developer.blender.org/D13412
|
|
|
|
|
|
|
|
|
|
The Domain Size node has a single geometry input and a selection for
the component type. Based on the component chosen, outputs containing
single values for the related domains are shown.
Mesh:
- Point Count
- Edge Count
- Face Count
- Face Corner Count
Curve:
- Point Count
- Spline Count
Point Cloud:
- Point Count
Instances:
- Instance Count
Differential Revision: https://developer.blender.org/D13365
|
|
|
|
Regression since 3.93 caused by 752c6d668bcb.
Follow the code from 2.93 which was always leaving curve modifiers
evaluation with a valid and clean state of the bounding box.
This is also what was proposed and agreed on in the following
design task: T92206: Bounding Box: compute during depsgraph evaluation
Tested with files from T90808 and T93384.
For the 3.0 going with the safest and minimal change. The rest of
the bounding box un-entanglement is to happen outside of the stable
branch.
Thanks The patch is based on the code from Philipp Oeser and
investigation by Germano Cavalcante and Dr. Sybren A. Stüvel,
thanks!
Differential Revision: https://developer.blender.org/D13409
|
|
The main goal of this refactor is to make BPath module use `IDTypeInfo`,
and move each ID-specific part of the `foreach_path` looper into their
own IDTypeInfo struct, using a new `foreach_path` callback.
Additionally, following improvements/cleanups are included:
* Attempt to get better, more consistent namings.
** In particular, move from `path_visitor` to more standard `foreach_path`.
* Update and extend documentation.
** API doc was moved to header, according to recent discussions on this
topic.
* Remove `BKE_bpath_relocate_visitor` from API, this is specific
callback that belongs in `lib_id.c` user code.
NOTE: This commit is expected to be 100% non-behavioral-change. This
implies that several potential further changes were only noted as
comments (like using a more generic solution for
`lib_id_library_local_paths`, addressing inconsistencies like path of
packed libraries always being skipped, regardless of the
`BKE_BPATH_FOREACH_PATH_SKIP_PACKED` `eBPathForeachFlag` flag value,
etc.).
NOTE: basic unittests were added to master already in
rBdcc500e5a265093bc9cc.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D13381
|
|
Follow up to rBdcc500e5a265093bc9cc, rB92daff6ac2adb5bb,
rB61bd5882a20c6f3 and rB08264aaf82da8.
Sorry for the noise, this time should be good.
|
|
Follow up to rBdcc500e5a265093bc9cc, rB92daff6ac2adb5bb and rB61bd5882a20c6f3.
|
|
Follow up to rBdcc500e5a265093bc9cc and rB92daff6ac2adb5bb.
Also shortening a bit the macros names...
|
|
The isect_line_sphere algorithm became very imprecise when the line and
the sphere were reasonably far away from the world origin.
This would lead to no intersections being reported even if there was a
guaranteed intersection (line crossing from inside the sphere to the
outside).
To fix this we now use the secant root finding method to get an
intersection point. This is much more stable and robust it seems.
|