Age | Commit message (Collapse) | Author |
|
|
|
Solves long-standing issue when dependencies of disabled modifiers are
evaluated.
Simple test case: no drivers or animation. Manually enabling modifier
is expected to bring FPS up, enabling modifier will bring FPS (sine
evaluation can not be avoided)
F13336690
More complex test case: modifier visibility is driven by an animated
property. In am ideal world FPS during property being zero is fast
and when property is 1 the FPS is low.
F13336691.
Differential Revision: https://developer.blender.org/D15625
|
|
Even if the driver is not dependent on time the modifiers were always
re-evaluated during playback. This is due to the legacy nature of the
check whether modifier depends on time or not: it was simply checking
for sub-string match for modifier in the F-Curve and drivers RNA paths.
Nowadays such dependencies are created by the dependency graph builder,
which allows to have more granular control over what depends on what.
The code is now simplified to only check for "static" dependency of the
modifier form time: for example, Wave modifier which always depends on
time (even without explicit animation involved).
This change also fixes missing relation from the animation component to
the shader_fx modifiers, fixing race condition.
Additional files used to verify relations:
- Geometry: F13257368
- Grease Pencil: F13257369
- Shader FX: F13257370
In these files different types of modifiers have an animated property,
and the purpose of the test is to verify that the modifiers do react
to the animation and that there is a relation between animation and
geometry components of the object. The latter one can only be checked
using the dependency graph relation visualization.
The drivers are not tested by these files. Those are not typically
depend on time, and if there were missing relation from driver to
the modifier we'd receive a bug report already. As well as if there
was a bug in missing time relation to a driver we'd also receive a
report.
Differential Revision: https://developer.blender.org/D15358
|
|
Mostly duplicate includes, also use nullptr, and using default
member initializers.
|
|
So far it was needed to declare a new RNA struct to `RNA_access.h` manually.
Since 9b298cf3dbec we generate a `RNA_prototypes.h` for RNA property
declarations. Now this also includes the RNA struct declarations, so they don't
have to be added manually anymore.
Differential Revision: https://developer.blender.org/D13862
Reviewed by: brecht, campbellbarton
|
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
If multiple bones have a custom property with the same name,
depsgraph didn't distinguish between them, potentially leading
to spurious cycles.
This patch moves ID_PROPERTY operation nodes for bone custom
properties from the parameters component to individual bone
components, thus decoupling them.
Differential Revision: https://developer.blender.org/D13729
|
|
Goals of this refactor:
* More unified approach to updating everything that needs to be updated
after a change in a node tree.
* The updates should happen in the correct order and quadratic or worse
algorithms should be avoided.
* Improve detection of changes to the output to avoid tagging the depsgraph
when it's not necessary.
* Move towards a more declarative style of defining nodes by having a
more centralized update procedure.
The refactor consists of two main parts:
* Node tree tagging and update refactor.
* Generally, when changes are done to a node tree, it is tagged dirty
until a global update function is called that updates everything in
the correct order.
* The tagging is more fine-grained compared to before, to allow for more
precise depsgraph update tagging.
* Depsgraph changes.
* The shading specific depsgraph node for node trees as been removed.
* Instead, there is a new `NTREE_OUTPUT` depsgrap node, which is only
tagged when the output of the node tree changed (e.g. the Group Output
or Material Output node).
* The copy-on-write relation from node trees to the data block they are
embedded in is now non-flushing. This avoids e.g. triggering a material
update after the shader node tree changed in unrelated ways. Instead
the material has a flushing relation to the new `NTREE_OUTPUT` node now.
* The depsgraph no longer reports data block changes through to cycles
through `Depsgraph.updates` when only the node tree changed in ways
that do not affect the output.
Avoiding unnecessary updates seems to work well for geometry nodes and cycles.
The situation is a bit worse when there are drivers on the node tree, but that
could potentially be improved separately in the future.
Avoiding updates in eevee and the compositor is more tricky, but also less urgent.
* Eevee updates are triggered by calling `DRW_notify_view_update` in
`ED_render_view3d_update` indirectly from `DEG_editors_update`.
* Compositor updates are triggered by `ED_node_composite_job` in `node_area_refresh`.
This is triggered by calling `ED_area_tag_refresh` in `node_area_listener`.
Removing updates always has the risk of breaking some dependency that no
one was aware of. It's not unlikely that this will happen here as well. Adding
back missing updates should be quite a bit easier than getting rid of
unnecessary updates though.
Differential Revision: https://developer.blender.org/D13246
|
|
|
|
Use C comments for plain text.
|
|
Differential Revision: https://developer.blender.org/D11851
|
|
The geometry nodes modifier uses id properties for the inputs to node groups.
That is because the set of properties changes depending on which geometry
node group is selected.
The animation was not updated correctly because the `ANIMATION_EVAL`
depsgraph node was not evaluated, because nothing depended on it in the
depsgraph. This patch makes sure that the proper link to the geometry
component is inserted.
Differential Revision: https://developer.blender.org/D11831
|
|
This removes a lot of unnecessary code that is generated by
the compiler automatically.
In very few cases, a defaulted destructor in a .cc file is
still necessary, because of forward declarations in the header.
I removed some defaulted virtual destructors, because they are not
necessary, when the parent class has a virtual destructor already.
Defaulted constructors are only necessary when there is another
constructor, but the class should still be default constructible.
Differential Revision: https://developer.blender.org/D10911
|
|
|
|
|
|
The object "delta_" rna variables were not added to the depsgraph search
and thus it would not trigger updates of the object during animation
playback.
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/depsgraph` module.
No functional changes.
|
|
This makes `RNANodeQuery::construct_node_identifier()` more strict in
its matching of certain property names.
The downside of this approach is that it's not possible any more to use
`"rotation"` and expect a match for `"rotation_euler"` and friends, so
the list of strings to test against is now 3x as long.
Reviewed By: sergey
Maniphest Tasks: T79121
Differential Revision: https://developer.blender.org/D8375
|
|
Reviewers: sergey
Differential Revision: https://developer.blender.org/D8150
|
|
This is possible, because we use C++17 now.
|
|
Previously, this function would expect a callback function as parameter.
This behavior is now in Map.lookup_or_add_cb. The new version just
takes the key and value directly.
|
|
We plan to use the "blender" namespace in other modules as well.
|
|
Surrounding includes with an 'extern "C"' block is not necessary anymore.
Also that made it harder to add any C++ code to some headers, or include headers
that have "optional" C++ code like `MEM_guardedalloc.h`.
I tested compilation on linux and windows (and got help from @LazyDodo).
If this still breaks compilation due to some linker error, the header containing
the symbol in question is probably missing an 'extern "C"' block.
Differential Revision: https://developer.blender.org/D7653
|
|
|
|
Reviewers: sergey
Differential Revision: https://developer.blender.org/D7553
|
|
Reviewers: sergey
Differential Revision: https://developer.blender.org/D7512
|
|
|
|
This fixes an issue where drivers using `object.dimension` only add a dependency on `GEOMETRY` to the depsgraph, whereas they should also depend on `TRANSFORM`.
This patch adds a new no-op operation that depends on the geometry and transform components to the Parameters component.
An alternative implementation would be to have `RNANodeQuery::construct_node_identifier` return multiple node identifiers. However, this would spread throughout the depsgraph code and unnecessarily force many other functions to either return or handle multiple nodes where in 99.999% of the time a single node would suffice.
The new `DIMENSIONS` node is added for each object. An upcoming patch will go over all no-op operation nodes and remove them from the depsgraph. Since this is a more dangerous operation, it'll be reviewed separately.
Differential Revision: https://developer.blender.org/D7031
|
|
Image animation should not be an depsgraph node of type ANIMATION, there is
no need for it to be affected by the special casing for that.
|
|
No functional changes.
|
|
When there are ID properties on an object, and these are animated and
used by a driver, the depsgraph has proper connections between ACTION →
ID PROPERTY → DRIVER.
When these properties are defined on a mesh, however, the depsgraph
relations are incorrectly created between GEOMETRY → PROPERTIES_EXIT →
DRIVER (because it's assumed that 'source = ENTRY' implies 'geometry').
This patch solves this by first checking whether the targeted property
is an ID property and handling it accordingly. This also made it
possible to remove some special cases from pose bone relations.
Maniphest Tasks: T73001
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D6571
|
|
time change
followup to 815ca2310fb4, this one fixes the RNA_MeshLoopColor case, adds
RNA_VertexGroupElement and RNA_LatticePoint.
coop with @sergey, thx.
Fixes T68666
|
|
change
|
|
This allows accessing it from drivers and using it in UI, as
demonstrated by adding it to the transform panel of 3D View.
As an aside, properly mark transform-related properties of Bone
read-only, as they can only be changed correctly in edit mode.
|
|
The old layout of `PointerRNA` was confusing for historic reasons:
```
typedef struct PointerRNA {
struct {
void *data;
} id;
struct StructRNA *type;
void *data;
} PointerRNA;
```
This patch updates it to:
```
typedef struct PointerRNA {
struct ID *owner_id;
struct StructRNA *type;
void *data;
} PointerRNA;
```
Throughout the code base `id.data` was replaced with `owner_id`.
Furthermore, many explicit pointer type casts were added which
were implicit before. Some type casts to `ID *` were removed.
Reviewers: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D5558
|
|
|
|
Would be nice to find a more proper and generic solution instead of name
based comparison, but can not really think a nice way to go currently.
|
|
|
|
|
|
Consists of few simple steps.
Don't tag object data's bounding box as dirty before re-evaluaiton
Most of the time this actually tags evaluated mesh which will be tossed
away few lines below anyway. And this causes issues if the evaluated
mesh is actually owned by the mesh datablock.
The bounding box now has clear separation between original object data
and object data after modifiers, so this should not be causing any
issues.
Free evaluated mesh when owner mesh changes
Ensures that evaluated mesh shares the same settings as its owner when
updates related on animation system happens.
Depsgraph: Update mesh when its geometry settings changes
Allows to have options like autosmooth animated.
Reviewers: brecht, mont29
Differential Revision: https://developer.blender.org/D5030
|
|
Currently only obvious setting which can be animated is Smooth.
The rest requires more proper support from animation update on
the Curve datablock.
But at least with this change it's not a "dependency graph fault"
|
|
This change makes it so sound handles are created for evaluated scene,
sequencer and speakers. This allows to have properly evaluated animation
on them.
For the viewport playback sound uses regular dependency graph.
For the final render sound uses dependency graph created for render pipeline,
which now also contains sequencer and sound datablocks.
All the direct sound update calls are replaced with corresponding dependency
graph recalc tag.
|
|
|
|
Most properties aren't altered by the evaluation of the bone,
and can be read immediately from its input operation. B-Bone
properties can be evaluated at the last possible moment.
This provides more freedom in using drivers to connect bone
properties: for example, it is now possible to read raw local
transform values via drivers from a bone that depends on the
reader bone via constraints.
|
|
This happened to be a bigger rabbit hole to hell than it originally seemed,
and there are higher priority design tasks to be handled (at this point high
priority design task is more important than high priority bug fix).
After talking to Brecht the decision was made to revert to the known isolated
issue, which will allow everyone in the studio work same as prior to last
Friday.
The remaining bits will be worked on after all the design tasks are out of
the way.
This commit reverts:
4cdb4b9532c Fix T64161: Crashing using undo and multiple windows
064273a4ae7 Sound: Port more cases to be a part of dependency graph
2e582f8ab53 Sound: Fix access wrong dependency graph
5fc49d9c915 Sound: add stubs to build without audaspace
c68c81a870b Sound: Make sure spin lock is initialized for new sound datablocks
c02534469ac Sound: Delay creating sound scene handle for until is needed
9f681bea68f Fix T64144: Crash when displaying audio waveforms in VSE
2f79286453e Cleanup: unused vars
bed8ad6f95a Fix crash in background rendering after recent sound changes
773691310f9 Fix T64143: Crash when scrubbing in the graph editor
888852055c1 Sound: Fix for being unable to jump to a frame during playback with A/V sync
6ab7b384645 Sound: More fixes for access of original scene
35db1195455 Sound: Fix access original scene during playback
211c4fd2e9a Depsgraph: Make comment about evaluation more obvious
c5fe16e121e Sound: Make sound handles only be in evaluated datablocks
b4e1e0946bf Depsgraph: Preserve sound and audio pointers through copy-on-write
4eedf784b04 Depsgraph: Store original sequencer strip pointer
6990ef151c1 Sound: Move evaluation to dependency graph
d02da8de23b Sound: Delay opening handlers for until really needed
3369b828916 Depsgraph: Add scene audio component
e8f10d64757 Depsgraph: Tag sequencer for update on changes
6e4b7a6e4d9 Depsgraph: Initial work to cover sequencer
17447ac5a6b Depsgraph: Make sound ID part of the graph
|
|
Mainly covers RNA callbacks which were still doing direct scene update,
which was causing crashes. Now corresponding ID_RECALC flags are used,
so all scenes can update accordingly.
Also tested animated volume/pitch on strips, which now works as well.
Fixes T64133: Assert after changing FPS
Fixes T64154: Immediate crash when changing the current frame on the timeline
Fixes T64185: Client Crashes when the frame position value is changed
Fixes T64190: Blender Crash using Timeline Editor
Fixes T64128: Click to close bug type on timeline
Fixes T64147: Crash when setting current frame from Python
Fixes T64152: Blender Auto-Close on timeline change
|
|
This can easily happen if adding drivers through Python via
pose.bones[...].bone.driver_add(), e.g. in Rigify code: the
bone field doesn't change id_data, so the driver is associated
with the object ID.
To handle this it's necessary to skip from Object to data in
RNA_Bone-specific code both for generic RNA and in the custom
code for drivers. The latter also had to be changed to use the
proper parsed RNA pointer instead of string matching on paths.
|
|
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
|
|
Allows to speed up lookups like "is property FOO of data BAR animated".
Can be used to optimize object's visibility check, but also allows to
check animation on bones without too much of time penalty.
The cache is shared between both nodes and relations builder.
Currently is not used, just a boilerplate for an upcoming changes in
an actual logic.
|
|
The driver code was almost there, but didn't work because ID nodes
have no outlinks - and using links won't be safe anyway because of
ordering issues. Instead, just loop over all IDNodes.
Animation is fixed simply by referring to ARMATURE_EVAL instead of
BONE in construct_node_identifier - the bArmature ID doesn't have
BONE components in any case, so the old identifier can't work.
|