Age | Commit message (Collapse) | Author |
|
This is a part of T61296: Crash with animated b-bone segments.
Consider animated/driven bendy bones segments as something what requires
special bendy-bones operation and relation in the dependency graph.
This is because it is more beneficial from a performance point of view
to not build operations if they are not needed. But if the property is
animated it is not possible to make any reliable decision based on just
a property value.
Differential Revision: https://developer.blender.org/D4739
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
Missed when removing contributors.
|
|
Quite often we need to create nodes which defines various
evaluation stages.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
Some summary of changes:
- Don't use DEG prefix for types and enumerator values:
the code is already inside DEG namespace.
- Put code where it locally belongs to: avoid having one
single header file with all sort of definitions in it.
- Take advantage of modern C++11 enabled by default.
|
|
This removes a bunch of animation/driver evaluations and recalc flags that
should be redundant in the new depsgraph, and were incorrectly affecting
the evaluated scene in a permanent way.
Still two cases that could be removed if the depsgraph is improved, in
BKE_object_handle_data_update and BKE_cachefile_update_frame.
For physics subframe interpolation there are also still calls to
BKE_object_where_is_calc that should ideally be removed as well, though
they are not known to cause keyframing bugs.
Differential Revision: https://developer.blender.org/D4274
|
|
Computing the shape of a B-Bone is a quite expensive operation, and
there are multiple constraints that can access this information in
a variety of useful ways. This means computing the shape once per
bone and saving it is good for performance.
Since the shape may depend on the position of up to two other bones,
often in a "cyclic" manner, this computation has to be a separate
node with its own dependencies.
Reviewers: sergey
Differential Revision: https://developer.blender.org/D3975
|
|
Previously each of the objects which has armature modifier will
request deformation matricies from bbones. Thing is, all those
deformations are the same and do not depend on object which is
being modified. What's even worse is that this calculation is
not cheap.
This change makes it so bbones deformation is calculated once
and stored in the armature object. After this armature modifiers
simply use it.
With a rigs we've got here dependency graph evaluation time
goes down from 0.02 sec to 0.012 sec.
Possible further optimization is to make bbone deformation
calculated at the time when bone is calculated. This will avoid
an extra threaded loop over all bones.
|
|
If there was a dependency cycle involved, it was possible that pchan
array will be freed before all bones are evaluated. Now clear is
done in a dedicated node, which is never a part of dependency cycle.
|
|
|
|
Mainly coverts object->parent and pose constraints.
|
|
This way objects which are pulled into dependency graph via modifier
stack from an invisible object will be invisible.
|
|
|
|
update + proxy
Make proxy copy result more atomic operation.
|
|
This solves wrong user counter of custom shape when duplicating bone
few times and then undoing all the duplications.
|
|
`BKE_pose_rebuild()` should (ideally) always trigger a rebuild of the
depsgraph, since it can add or remove posechannels.
This function now takes a Main parameter to ensure that related
depsgraphes are tagged as dirty (kept it optional, for some corner cases).
We should also probably double-check calls to that function, think in
theory it should only be called from depsgraph itself? But for now...
|
|
|
|
After discussion with Sergey and Dalai, we have decided to remove
this option completely. We're getting to the point where it is almost
impossible to really use 2.8 without COW, and keeping the old option
running ends up diverting dev resources away towards tracking down
and fixing problems with a parallel system that will be going away.
|
|
|
|
|
|
For the performance we convert object bases list to an array
during view layer evaluation. This makes it possible to have
very cheap index-based base lookup.
The goal of this change is to get rid of base used for function
binding, and avoid scene datablock expansion at the depsgraph
construction time.
|
|
With index-based pchan evaluation we don't need to go into
a mess of expanding armature at relation construction time.
|
|
|
|
Was missing ID looper for pchan constraint.
|
|
This code should be replaced with evaluation-time ID block expansion,
but before that it will be helpful to get old design to work again.
|
|
|
|
|
|
|
|
This was fixed in 2.8 branch but not in master.
|
|
|
|
This is a part of copy-on-write sanitization, to avoid all the checks
which were attempting to keep sub-data pointers intact.
Point is: ID pointers never change for CoW datablocks, but nested
data pointers might change when updating existing copy.
Solution: Only bind ID data pointers and index of sub-data.
This will make CoW datablock 7update function was easier in 2.8.
In master we were only using pose channel pointers in callbacks,
this is exactly what this commit addresses. A linear lookup array
is created on pose evaluation init and is thrown away afterwards.
One thing we might consider doing is to keep indexed array of
poses, similar to chanhash.
Reviewers: campbellbarton
Reviewed By: campbellbarton
Subscribers: dfelinto
Differential Revision: https://developer.blender.org/D3124
|
|
|
|
|
|
|
|
This allows us to:
- Not mock around with tags stored in a global space,
and not to iterate over all datablocks in the database
to clear the tags.
- Properly deal with datablocks which might not be in main database.
While it sounds crazy, it might be handy when dealing with preview,
or some partial scene updates, such as motion paths.
- Avoids majority of places where depsgraph construction needed bmain.
This is something what could help in blender2.8 branch.
From tests with production file here did not see any measurable slowdown.
Hopefully, there is no functional changes :)
|
|
|
|
This is kind of doesn't matter where macro itself is defined.
We should stick to the following:
- If some macro is actually more an inline function, follow regular
function name conventions.
- If macro is a macro, type it in capitals. Use module prefix if that
helps readability or it if helps avoiding accidents.
|
|
|
|
Original fix only worked when there is one custom property.
|
|
|
|
LinkList's are a different API, no need to confuse things.
|
|
|
|
|
|
This should solve crash on files having proxies, but there will still be
assert failure because proxy_from is expected to come from library, which
is no longer truth for objects which got copied.
|
|
|
|
|