Age | Commit message (Collapse) | Author |
|
Reviewers: sergey
Differential Revision: https://developer.blender.org/D8150
|
|
A driver reading `Object.hide_viewport` would break when that object was
hidden. Hidden objects don't have the `OBJECT_BASE_FLAGS` node in the
depsgraph, but that node was required for the driver to work.
Now the `OBJECT_FROM_LAYER` component (which optionally contains the
`OBJECT_FROM_LAYER` node) has explicit `ENTRY` and `EXIT` nodes, which
are used for relations with other components. These relations now remain
valid, even when the `OBJECT_FROM_LAYER` node is absent.
Differential Revision: https://developer.blender.org/D8124
Reviewed By: sergey
|
|
Spotted by @LazyDodo on IRC, thanks.
|
|
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/D7519
|
|
The problem was that in direct_link_id_restore_recalc, recalc_undo_accumulated
should contain the changes from the target state to the current state. However
it had already been cleared at that point, to start accumulating changes up to
the next undo push.
Delaying the clear of this flag seems like the obvious solution, but it's hard
to find the right place for that (if there is one). Instead this splits up the
flag into two separate variables.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D7402
|
|
Forgot to take into account legacy DEG_id_tag_update with zero flag.
|
|
These changes only have an effect when the experimental Undo Speedup preference
is enabled.
* For DEG_id_tag_update, accumulate recalc flags immediately before the undo
push happens instead of afterwards. Otherwise the undo state does not
contain enough flags, and the current state may contain too many flags.
This also means we call DEG_id_tag_update after undo with the accumulated
flags to ensure they are flushed to other datablocks.
* For undo, accumulate recalc flags in id->recalc and clear accumulated flags
immediately. Not clearing would cause circular behavior where accumulated
flags may never end up being cleared.
This matches what happens after an undo push where these are also cleared,
indicating that the undo state and current in-memory state match exactly.
* Don't change id->recalc of identical datablocks, it should not be needed.
There is one exception for armatures where pointers across datablocks
exist which otherwise would cause problems. There may be a better solution
to this but it seems to work in agent 327 production files.
* This contains a change in undofile.c to avoid detecting all datablocks as
changed for the first of the two undo steps, where we restore to the state
of the last undo push before going to the one before.
Without this the whole system is much less efficient. However this is unsafe
in the sense that if an app handler or operators edits a datablock after an
undo push, that change will not be undone.
It can be argued that this is acceptable behavior, since a following undo push
will include that change and this may already have unexpected side effects.
Ref T60695
Differential Revision: https://developer.blender.org/D7339
|
|
The `BKE_animsys.h` and `anim_sys.c` files already had a an "AnimData
API" section. The code in that section has now been split off, and
placed into `BKE_anim_data.h` and `anim_data.c`.
All files that used to include `BKE_animsys.h` have been adjusted to
only include the animation headers they need (sometimes none).
No functional changes.
|
|
Mpving utils from idcode to idtype proved to be somewhat painful for
some reasons, but now all looks good.
Had to add a fake/empty shell for the special snowflake too,
`ID_LINK_PLACEHOLDER/INDEX_ID_NULL`...
|
|
|
|
Only the volume object is exposed in the user interface. It is based on OpenVDB
internally. Drawing and rendering code will follow in another commit.
https://wiki.blender.org/wiki/Source/Objects/Volume
https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Volumes
Hair and PointCloud object types are hidden behind a WITH_NEW_OBJECT_TYPES
build option. These are unfinished, and included only to make it easier to
cooperate on development in the future and avoid tricky merges.
https://wiki.blender.org/wiki/Source/Objects/New_Object_Types
Ref T73201, T68981
Differential Revision: https://developer.blender.org/D6945
|
|
Those accumulated flags get cleared every time an undo step is written
to memfile.
Preliminary work for undo-speedup.
Part of T60695/D6580.
|
|
No functional changes.
|
|
|
|
It is not allowed to do tagging or updates while dependency graph is
in the middle of evaluation.
This is something what is simple to violate from python code. This
change adds some sanity checks.
The request to update view layer or dependency graph will raise an
exception in Python now, so it's easy for scripters to notice.
Tagging for update will do silent return unless running with debug
command line argument. This is because it's a bit tricky to know
which exact dependency graph corresponds to a context from which
an update tag was triggered.
Differential Revision: https://developer.blender.org/D6035
|
|
This is something which worked in Blender 2.79.
Need to do special trickery to ensure peoxy_from points to a
proper object.
Differential Revision: https://developer.blender.org/D6040
|
|
Got lost in previous optimization commit.
|
|
Found this while looking into T70463, solves the high spinning times
mentioned in T70463#791026.
Sounds logical that iterating over an array to modify a single property
is faster than doing it in threads. But strangely, doing it for both
nodes and its components is still faster in threads here.
Gives extra speedup with a file mentioned in the report.
Reviewed By: brecht, mont29
Differential Revision: https://developer.blender.org/D6017
|
|
|
|
Allows to access dependency graphs created for render engines
to inform them about changes in .blend file structure from the
Python handlers.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5724
|
|
Currently unused, but will allow to keep of an owner of the depsgraph.
Could also simplify other APIs in the future by avoiding to pass bmain
explicitly to relation update functions and things like that.
|
|
|
|
Was happening when tagging for LEGACY_0 was used.
|
|
|
|
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D4222
|
|
TLS and Settings can be used by other types of parallel 'for loops', so
removing 'Range' from their names.
No functional changes expected here.
|
|
Added special exception in legacy tag with 0 flag.
|
|
|
|
The issue was caused by dependency graph always ignoring animation
update when it is first time constructed. This was a way to make it
preserve unkeyed changes on undo/redo. This, however, made it so
changes of animation data itself (such as deleting/moving keyframes)
did not trigger animation update by the dependency graph.
This worked prior to copy-on-write because animation recalc flags
were stored in the DNA and never re-set on file/undo load. This was
giving dependency graph a clue that animation is to be re-evaluated
when operator explicitly asked to (more precisely, when such operator
was undone/redone).
This change makes it so original ID's recalc flags are storing
recalc flags when ID is tagged for update as an response to user
input. This way re-building dependency graph can force animation
to be updated on redo.
Tricky part here is that ID's recalc flag is no longer to be zeroed
when loading undo step (which is the same as reading .blend file).
This is something what works differently comparing to legacy
dependency graph, which was zeroing object's recalc flags there but
not animation data's recalc flags.
Shouldn't be causing issues, since unkeyed changes are not preserved
upon opening a file anyway, at least to my knowledge.
Related reports which are to be taken into account and verified
they are not re-introduced when making changes in the area:
- T63111: Auto-Bake stuck at constant re-rendering
- T54296: Cycles viewport render stuck on constant re-render
Reviewers: campbellbarton, brecht
Reviewed By: campbellbarton, brecht
Maniphest Tasks: T66325
Differential Revision: https://developer.blender.org/D5316
|
|
Current frame is stored in a scene, and scene might have multiple view
layers. The inactive view layers were not informed about scene's frame
being changed, so when user switched back to view after changing scene
frame it was in an inconsistent state between current scene frame and
animation.
Now we tag scene for time changes, so dependency graph can catch up
and do proper update.
Currently tagging is from quite generic place. Probably better approach
would be to tag from where frame is actually being assigned. Downside
of this is that it's easy to miss some places.
Reviewers: brecht, mont29
Reviewed By: brecht
Maniphest Tasks: T66378
Differential Revision: https://developer.blender.org/D5332
|
|
Happens if custom property is on object data data-block, which doesn't
have translation or geometry components. Not for lights and cameras at
least.
|
|
|
|
Respect do_time flag in on_visible_update, matching behavior of old
dependency graph and avoids unwanted animation updates.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5026
|
|
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.
|
|
Allows to have more granularity in checks compared to a node-factory
based tagging in a generic tag/flush code.
|
|
This is how it worked in 2.79 and it is how it is expected to be working.
Avoids unintended icons update during animation playback.
Fixes T64318: Update of material icons during animation 2x performance penalty
|
|
Tagging original ID introduces a conflict of interest when a separate
graph is created and is tagging objects to be re-evaluated with its
context.
This is part of the problem in T63111: tags within a temporary dependency
graph affects viewport and vice versa, which makes logic to wrongly
consider that something did change in the scene and that baking is to
be redone.
This effectively reverts db3bfd0, but this time everything seems to
be updating fine in the viewport.
|
|
Masks were not really covered by Copy-on-Write due to mistake
in the dependency graph. After correcting that mistake a lot
of tools became broken, so majority of the patch is related
on making it so access to evaluated/tessellated masks is done.
When accessing evaluated mask state make sure access to an
evaluated dependency graph is done. This solves possible
access to NULL data on redo.
Fixes T64899: Re-doing new point addition causes crash
Reviewers: brecht
Reviewed By: brecht
Maniphest Tasks: T64899
Differential Revision: https://developer.blender.org/D4918
|
|
Was missing copy-on-write tag since lamp itself has no geometry or
transform.
Now tagging for animation, and taking care of special case in the
dependency graph.
|
|
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
|
|
Quite straightforward change, which makes it so audio handles are
only created inside of evaluated datablocks.
Exception is adding sound strip to the sequencer, which needs an
audio handle to query length and number of channels. This is done
by temporarily loading sound file into an original datablock, and
then tossing it away.
There is an assert in sound.c which verifies that audio system is
used from an evaluated domain, which should help porting all the
cases which are likely missed by this commit.
Some annoying parts:
- `BKE_sound_update_scene()` is iterating over all bases, and does
special ID tags to see whether sound has been handled or not
already. This can not be done the old fashion now.
Ideally, this will be done as a speaker datablock evaluation,
but seems that would require a lock since audio API is not safe
for threading. So this is not a desired way i'd say.
Possible solution here would be to iterate over ID datablocks
using dependency graph query API.
- Frame jump needs to call `BKE_sound_seek_scene()` directly
because there might be some flags assigned to the scene which
could be clear after operator execution is over.
Need to verify if that's the case though. This is a bit hairy
code, so sticking to a safest and known to work approach for
now.
- Removed check for format when opening new sound file.
Maybe we can have some utility function which queries channel
and duration information, leaving the caller's code clean and
tidy.
Tested following cases:
- Adding/removing/moving sequencer's sound strips.
- Adding/moving speakers in viewport.
- Rendering audio.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4779
|
|
The idea is to make that responsible for dealing with
things like audio update on frame jump and such.
|
|
Currently only adding, removing and transforming strips. Most likely more
tags is needed.
|
|
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
|
|
|
|
Modifier stack was forced to be re-evaluated when it was not
supposed to. Should also improve sculpt performance.
|
|
Convention was not to but after discussion on 918941483f7e we agree its
best to change the convention.
Names now mostly follow RNA.
Some exceptions:
- Use 'nodetrees' instead of 'nodegroups'
since the struct is called NodeTree.
- Use 'gpencils' instead of 'grease_pencil'
since 'gpencil' is a common abbreviation in the C code.
Other exceptions:
- Leave 'wm' as it's a list of one.
- Leave 'ipo' as is for versioning.
|
|
The issue was discovered only after recent changes, but roots back
to much older changes.
What was happening is scene's ID recalc flags where never cleared,
which caused ensure_view_layer() to always run copy-on-write on the
scene. This resulted in certain runtime data being cleared, without
proper flag stored in the dependency graph.
This was caused by ID recalc clear function checking whether any ID
was tagged for recalc in that graph or not. This was happening due
to all areas using DEG_id_type_tag() which can only set flags on the
graph from viewport scenes, and could not inform render dependency
graph.
Now ID tyoe tagging is happening on per-graph level, which avoids
possibility of flags running out of sync.
In a bit longer term we also need to get rid of two functions which
are clearing flags: DEG_id_type_tag() and deg_graph_clear_tags().
|