Age | Commit message (Collapse) | Author |
|
Adds `rna_path.cc` and `RNA_path.h`.
`rna_access.c` is a quite big file, which makes it rather hard and
inconvenient to navigate. RNA path functions form a nicely coherent unit
that can stand well on it's own, so it makes sense to split them off to
mitigate the problem. Moreover, I was looking into refactoring the quite
convoluted/overloaded `rna_path_parse()`, and found that some C++
features may help greatly with that. So having that code compile in C++
would be helpful to attempt that.
Differential Revision: https://developer.blender.org/D15540
Reviewed by: Brecht Van Lommel, Campbell Barton, Bastien Montagne
|
|
|
|
While this was not a critical issue (that lib pointer is only used for
some kind of sanity check that no linked data uses local ID pointers),
better to keep `IDP_BlendReadLib` in sync with all other lib-linking
code.
|
|
There was already a utility to retrieve the correct node group idname
from the context, `node_group_idname`, but often it's clearer to
use lower-level arguments, or the context isn't accessible.
Storing the group idname in the tree type makes it accessible
without rewriting it elsewhere.
|
|
It relied on uint, which is defined in a separate header.
|
|
|
|
Use the API from 36068487d076bfd8 instead
of the uglier `IDPropertyTemplate` API.
|
|
|
|
This was removed in cacdea7f4a5b49d to fix a bug, but copying point
and curve attributes should be fine as long as the attribute arrays are
retrieved before-hand.
Differential Revision: https://developer.blender.org/D15541
|
|
The problem was that zero-sized and non-existant attributes were
handled the same in some parts of the attribute API, which led to
unexpected behavior.
The solution is to properly differentiate the case when an attribute
does not exist and when it is just empty (because the geometry
is empty).
Differential Revision: https://developer.blender.org/D15557
|
|
This reverts commit 32a9aac3b84f4742937dd8fd2afc14a443cb0248.
|
|
|
|
* BLENDER_VERSION_CYCLE set to beta
* Update pipeline_config.yaml to point to 3.2 branches and svn tags
* Update and uncomment BLENDER_VERSION in download.cmake
|
|
|
|
|
|
This name doesn't require understanding of fields, and
is phrased as an action which is consistent with other nodes.
Discussed in the latest geometry nodes sub-module meeting.
|
|
This adds three new nodes:
* `Shortest Edge Paths`: Actually finds the shortest paths.
* `Edge Paths to Curves`: Converts the paths to separate curves.
This may generate a quadratic amount of data, making it slow
for large meshes.
* `Edge Paths to Selection`: Generates an edge selection that
contains all edges that are part of a path. This can be used
with the Separate Geometry node to only keep the edges that
are part of a path. For large meshes, this approach can be
much faster than the `Edge Paths to Curves` node, because
less data is created.
Differential Revision: https://developer.blender.org/D15274
|
|
Add a version of #BKE_main_namemap_validate that also fixes the issues,
and call it in a do_version to fix recent .blend files saved after the
regression introduced in rB7f8d05131a77.
This is mandatory to fix some production files here at the studio, among
other things.
|
|
Follow-up to rB13e17507c069, forgot to handle shapekeys...
|
|
Fix tests, and some issue when making an ID local.
There are probably a few more issues still though.
|
|
Massively use the new consistency check in namemap regression tests, and
fix an issue with library data tests revealed by those checks.
|
|
Add a util function to check that content of a given Main and the
namemaps in it are consistent.
Add some asserts calling this check after file read, and after some
override operations.
|
|
Liboverrides are doing some very low-level manipulation of IDs in apply
code, to reduce over-head of name and sorting handling.
This requires specific care to ensure thatr the new namemap runtime data
remains up-to-date and valid. Otherwise, names of existing IDs would be
missing from the map, which would later lead to having several different
IDs with the same name. Critical corruption in Blender ID management.
Reported by animators at the Blender studio.
Regression from rB7f8d05131a77.
|
|
|
|
|
|
|
|
`parallel_invoke` allows executing functions on separate threads.
However, creating tasks in tbb has a measurable amount of overhead.
Therefore, it can be benefitial to disable parallelization when
the amount of work done per function is small.
See D15539 for some benchmark results.
Differential Revision: https://developer.blender.org/D15539
|
|
|
|
|
|
|
|
The recent multires winding fix missed a code branch.
|
|
This fixes two issues:
* There was a crash when the new attribute name was empty.
* The attribute name was incremented (e.g. "Attribute.001") when
the old and new name were the same.
|
|
Cyclic curves don't need the tangent correction based on the first
and last handle position.
|
|
It looked up the vertex group index based on the object instead of the
actual mesh that is currently used. Since geometry nodes, the number
and order of attributes can change in arbitrary ways during evaluation.
Therefore, this index has to be looked up on the mesh which contains
the most up-to-date information.
There are probably similar issues in other modifiers. That has to be
fixed step by step. Ideally by using the attribute api directly eventually.
|
|
Calling two non-const methods on a `MutableAttributeAccessor`
at the same time in multiple threads is not safe.
While I don't know what caused the crash here exactly, I do know
that it happens while looking up the attribute for writing, which
may modify the unterlying geometry. I couldn't reproduce the
bug with a debug build or without threading.
|
|
renamed
As discussed, this only updates objects in and the world of the scene to which the view layer belongs, which also avoids the problem of not having a BMain available.
Differential Revision: https://developer.blender.org/D14740
|
|
Use the C++ API to implement more of the existing C functions.
This corrects the cases where one tries to add a builtin attribute
with the wrong domain or type on curves, though a better warning
message would be helpful in the future, and also reduces duplication
of the internal logic. Not much more is possible without changing
the interface.
|
|
|
|
Use the new attribute API to implement the attribute remove function
used by RNA, except for BMesh attributes. Currently, removing curve
attributes from the panel in the property editor does not mark the
relevant caches dirty (for example, the cache of curve type counts),
because that behavior is implemented with the new attribute API.
Also, eventually we want to merge the two APIs, and removing an
attribute is the first function that can be partially implemented
with the new API.
Differential Revision: https://developer.blender.org/D15495
|
|
Geometry nodes has added the ability to modify mesh vertex groups
during evaluation (see 3b6ee8cee7080af2). However, the armature
modifier always uses the vertex groups from the original object.
This is wrong for the modifier stack, where each modifier is meant
to use the output of the previous.
This commit makes the armature modifier use the evaluated vertex groups
if they are available. Otherwise it uses the originals like before.
Differential Revision: https://developer.blender.org/D15515
|
|
Previously, curves sculpt tools only worked on original data. This was
very limiting, because one could effectively only sculpt the curves when
all procedural effects were turned off. This patch adds support for curves
sculpting while looking the result of procedural effects (like deformation
based on the surface mesh). This functionality is also known as "crazy space"
support in Blender.
For more details see D15407.
Differential Revision: https://developer.blender.org/D15407
|
|
Doing this in preparation for D15407.
|
|
Every caller BKE_image_find_nearest_tile was calculating the tile offset
so add a version of this function that returns the offset too.
|
|
|
|
The conversion from Curves to CurveEval used an incorrect type
for one of the builtin attributes. Also, an incorrect default was used
for reading the nurbs_weight attribute.
|
|
Use const pointers, remove unused data member for parallel callback,
use listbase macro.
|
|
Creating the attributes was done inside a parallel loop. Also correct a
typo for the parallel grain size, which was meant to be a power of two.
|
|
Actualy 'safe' building of the base has in view layers (as part of
`BKE_main_collection_sync_remap`) would only happen when there was
already an existing one, otherwise it was skipped, and rebuilt later
(without the support for doublons) in collection sync code.
Very odd that that error was never spotted before, issue in code has
been there for a long time already. Probably only happens in rare cases
(specific conjuction of factors during remapping of old ID into itelf
new id)?
Reported by @hjalti from Blender studio. Reproducing case:
`heist/pro/shots/050_alarm/050_0160/050_0160.anim.blend`, r1407
|
|
read/write.
Code handling read/write of libraries is still particular... but trying
to call `library_runtime_reset` on a random address at readtime was an
obvious mistake I should have caught during review :(
Regression from rB7f8d05131a77.
|
|
Calling `finish` after writing to generic attributes is currently necessary for
correctness. Previously, this was easy to forget. Now there is a check for this
in debug builds.
|