Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-08-20Depsgraph: refactor tagging after time changesJacques Lucke
This reverts {rB1693a5efe91999b60b3dc0bdff727473b3bd00bb} and implements an alternative solution. The old patch had the problem that the depsgraph would always evaluate at the current frame of the original scene (even when `DEG_evaluate_on_framechange` was used). Now it is possible to evaluate the depsgraph at a specific frame without having to change the original scene. Reviewers: sergey, sybren Differential Revision: https://developer.blender.org/D8616
2020-08-07Cleanup: Depsgraph, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/depsgraph` module. No functional changes.
2020-08-07Clang-Tidy: Address readability-redundant-string-initSergey Sharybin
2020-08-04Refactor: rename SpaceType->new to SpaceType->createJacques Lucke
The data member `new` was conflicting with the `new` keyword when `BKE_screen.h` was included in C++ files. Reviewers: sergey Differential Revision: https://developer.blender.org/D8459
2020-07-22Simulation: improve depsgraph integrationJacques Lucke
A simulation data block has an embedded node tree, which requires special handling in a couple of places. Some of those places were missing beforehand. This also adds a relation to make sure that the simulation is evaluated after animations on the embedded node tree are evaluated.
2020-07-03Clang-Tidy: Enable redundant static qualifier warningSergey Sharybin
This change enables readability-static-definition-in-anonymous-namespace warning in .clang-tidy configuration.
2020-06-29Depsgraph: introduce blender::deg namespaceJacques Lucke
Reviewers: sergey Differential Revision: https://developer.blender.org/D8150
2020-06-26Fix T78071: Drivers reading object visibility not updating automaticallySybren A. Stüvel
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
2020-06-15Fix unhandled RECALC options in depsgraph code after recent change.Bastien Montagne
Spotted by @LazyDodo on IRC, thanks.
2020-05-08Cleanup: take includes out of 'extern "C"' blocksJacques Lucke
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
2020-04-28Depsgraph: Use BLI::Map in more placesJacques Lucke
Reviewers: sergey Differential Revision: https://developer.blender.org/D7519
2020-04-14Fix T75542: toggling modifier visibility not working correct with undo speedupBrecht Van Lommel
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
2020-04-08Fix missed depsgraph update after undo in some casesBrecht Van Lommel
Forgot to take into account legacy DEG_id_tag_update with zero flag.
2020-04-07Undo: change depsgraph recalc flags handling to improve performanceBrecht Van Lommel
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
2020-04-03Cleanup: Animation, move AnimData API to `anim_data.c`/`BKE_anim_data.h`Sybren A. Stüvel
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.
2020-03-19Cleanup/refactor: remove BKE_idcode, in favour of BKE_idtype.Bastien Montagne
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`...
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-18Objects: add Volume object type, and prototypes for Hair and PointCloudBrecht Van Lommel
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
2020-03-17Add accumulated recalc flags to IDs.Bastien Montagne
Those accumulated flags get cleared every time an undo step is written to memfile. Preliminary work for undo-speedup. Part of T60695/D6580.
2020-01-28Cleanup: changed NULL to nullptr in depsgraph C++ codeSybren A. Stüvel
No functional changes.
2019-10-15Fix T70771: Texture nodes in Compositor causes infinite updateSergey Sharybin
2019-10-11Depsgraph: Inform when update or tag happens during evaluationSergey Sharybin
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
2019-10-10Fix T65134: Duplicated proxies in several scenes don't workSergey Sharybin
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
2019-10-09Fix missing clear of ID types tagsSergey Sharybin
Got lost in previous optimization commit.
2019-10-08Depsgraph: Avoid threading for trivial operationsSergey Sharybin
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
2019-10-08Depsgraph: Don't force time update when legacy flag 0 is usedSergey Sharybin
2019-09-11Depsgraph: Introduce depsgraph registrySergey Sharybin
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
2019-09-11Depsgraph: Pass bmain to depsgraph object creationSergey Sharybin
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.
2019-09-05Depsgraph: Free user code from worry about updates flushSergey Sharybin
2019-09-03Fix T68868: Assert in depsgraph debugging logsSergey Sharybin
Was happening when tagging for LEGACY_0 was used.
2019-08-16Cleanup: spellingCampbell Barton
2019-07-31Fix several undefined-behaviour-sanitizer warningsLukas Stockner
Reviewers: brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D4222
2019-07-30BLI_task: Cleanup: rename some structs to make them more generic.Bastien Montagne
TLS and Settings can be used by other types of parallel 'for loops', so removing 'Range' from their names. No functional changes expected here.
2019-07-28Depsgraph: Fix changes in tracking invalidating movie cacheSergey Sharybin
Added special exception in legacy tag with 0 flag.
2019-07-28Depsgraph: Fix missing cases of SOURCE ID recalc tagSergey Sharybin
2019-07-26Fix T66325: Animation Keyframe Undo/Redo BugSergey Sharybin
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
2019-07-26Fix T66378: Missing animation update when switching view layerSergey Sharybin
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
2019-06-17Fix T65662: Drivers on custom properties doesn't properly updateSergey Sharybin
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.
2019-06-17Fix T65651: Crash when changing audio strip source fileSergey Sharybin
2019-06-06Fix T63035: Undoing in pose mode destroys the entire poseSergey Sharybin
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
2019-06-05Sound: Port to a copy-on-write conceptSergey Sharybin
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.
2019-06-05Depsgraph: Store recalc tag in ID->recalcSergey Sharybin
Allows to have more granularity in checks compared to a node-factory based tagging in a generic tag/flush code.
2019-06-04Depsgraph: Only run editors ID update on manual editsSergey Sharybin
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
2019-05-23Depsgraph: Don't tag original IDs for recalcSergey Sharybin
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.
2019-05-23Masks: Properly port to Copy-on-Write conceptSergey Sharybin
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
2019-05-13Fix T64387: Crash with driver copy/pasteSergey Sharybin
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.
2019-05-07Sound: Revert all the recent changes to soundSergey Sharybin
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
2019-05-06Sound: Port more cases to be a part of dependency graphSergey Sharybin
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
2019-05-03Sound: Make sound handles only be in evaluated datablocksSergey Sharybin
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
2019-05-03Depsgraph: Add scene audio componentSergey Sharybin
The idea is to make that responsible for dealing with things like audio update on frame jump and such.