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
2022-05-24Depsgraph: Implement backtrace functionalitySergey Sharybin
The goal is to make it easier to track down sources of errors during the dependency graph builder. With this change whenever a relation can not be added a trace to the entity which requested the relation will be printed. For example: ``` Failed to add relation "Copy Location" Could not find op_from: OperationKey(type: BONE, component name: 'MissingBone', operation code: BONE_DONE) Trace: Depth Type Name ----- ---- ---- 1 Object Armature.001 2 Pose Channel Bone 3 Constraint Copy Location ``` On an implementation detail traced places where `checkIsBuiltAndTag` is called, with some additional places to help tracking pose channels, constraints, and modifiers. Further improvements in granularity are possible, but that could happen as a followup development once the core part is proven to work. An example of such improvement would be to have entries in the trace which will indicate NLA and drivers building. Currently it might be a bit confusing to see IDs in the trace referenced from driver. Even with such limitation the current state of the patch brings a very valuable information (some information is much better than no information at all). Differential Revision: https://developer.blender.org/D15017
2022-02-11File headers: SPDX License migrationCampbell Barton
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
2020-11-07Cleanup: Clang-tidy, modernize-concat-nested-namespacesAnkit Meel
2020-09-21Implement ID properties support for TimeMarkerSergey Sharybin
Allows scripters to store additional information in the marker itself instead of using work-around approach based on marker names and such. Differential Revision: https://developer.blender.org/D8944
2020-06-29Depsgraph: introduce blender::deg namespaceJacques Lucke
Reviewers: sergey Differential Revision: https://developer.blender.org/D8150
2020-06-26Cleanup: Depsgraph, remove unused `Base *` parameterSybren A. Stüvel
The `Base *` parameter of `DepsgraphRelationBuilder::build_object()` was made redundant by c7694185c92aa. This commit actually removes it. No functional changes.
2020-04-28Depsgraph: Add IDProperties handling.Bastien Montagne
Fix T75279: BLI_assert failed when deleting object in debug build (only). And all general cases of ID pointer idproperties that would use a data-block not referenced anywhere else in the depsgraph. This includes idproperties from: * All ID types; * Bones and pose bones; * Sequences; * Nodes and sockets. Differential Revision: https://developer.blender.org/D7551
2020-01-28Cleanup: changed NULL to nullptr in depsgraph C++ codeSybren A. Stüvel
No functional changes.
2019-07-08Fix T66556: Noisy drivers relations in certain casesSergey Sharybin
2019-06-17Fix T65817: Video Sequencer doesen't render speakers' soundsSergey Sharybin
Part of the issue was caused by missing speaker objects in the depsgraph used for post-processing. Remaining part was caused by missing scene sound update for this depsgraph.
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-05-24Depsgraph: Fixes for render pipeline buildingSergey Sharybin
- Need to assign current scene in the builder: it is used to route relations for object's customdata. - Tweak relation from scene to object for the customdaat: this didn't work before because the render pipeline scene has no view layer component. Fixes T65044: Crash when Rendering (F12)
2019-05-23Render: Use dependency graph for compositor/sequencerSergey Sharybin
This change makes it so a minimal dependency graph which only includes compositor and sequencer is built for the render pipeline purposes. Tricky part here is that it's only compositor itself and sequencer who to use this dependency graph and IDs from it. Render engines are still to be provided original IDs because: - They will create dependency graph for the given scene, and currently it is not possible to create dependency graph from CoW scene. - IDs from the compositor/sequencer dependency graph are "stripped", as in, they wouldn't have all view layers, collections or objects required for proper final render. This creates annoying mess of mixing evaluated and original scene access in various parts of the pipeline. Fixes T63927: Compositing nodes - drivers don't really work Reviewers: brecht Maniphest Tasks: T63927 Differential Revision: https://developer.blender.org/D4911
2019-05-23Depsgraph: Allow building scene propertiesSergey Sharybin
This is used by driers and this is a first step towards support of scenes used for only compositor or sequencer. Fixes T61014: Assert adding a driver that uses a single property of a scene ID
2017-11-09Depsgraph: Make dependency graph to be built from scene layerSergey Sharybin
This is a final step of having proper ownership. Now selecting different layers in the "top bar" will actually do what this is expected to do. Surely, there are still things to be done under the hood, that will happen in a less intrusive way.
2017-11-09Merge branch 'master' into blender2.8Sergey Sharybin
2017-11-09Depsgraph: Remove chains of scene being passed all over in relations builderSergey Sharybin
2017-11-09Depsgraph: Remove bmain from internal builder APISergey Sharybin
Use the one from state.
2017-11-09Depsgraph: Make bmain part of builder state and remove bmain from public APISergey Sharybin
2017-11-09Depsgraph: Cleanup, use google style for private membersSergey Sharybin
2017-10-25Depsgraph: Remove bmain from graphSergey Sharybin
It really should not care about bmain.
2017-07-19Depsgraph: Ensure scene camera object is always builtSergey Sharybin
2017-07-10Depsgraph: Use explicit bmain pointer passed to layer utilitiesSergey Sharybin
it is not necessarily that depsgraph is built from G.bmain. This will solve issue reported in T51782.
2017-06-19Depsgraph: Initial groundwork for copy-on-write supportSergey Sharybin
< Dependency graph Copy-on-Write > -------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || This is an initial commit of Copy-on-write support added to dependency graph. Main priority for now: get playback (Alt-A) and all operators (selection, transform etc) to work with the new concept of clear separation between evaluated data coming from dependency graph and original data coming from .blend file (and stored in bmain). = How does this work? = The idea is to support Copy-on-Write on the ID level. This means, we duplicate the whole ID before we cann it's evaluaiton function. This is currently done in the following way: - At the depsgraph construction time we create "shallow" copy of the ID datablock, just so we know it's pointer in memory and can use for function bindings. - At the evaluaiton time, the copy of ID get's "expanded" (needs a better name internally, so it does not conflict with expanding datablocks during library linking), which means the content of the datablock is being copied over and all IDs are getting remapped to the copied ones. Currently we do the whole copy, in the future we will support some tricks here to prevent duplicating geometry arrays (verts, edges, loops, faces and polys) when we don't need that. - Evaluation functions are operating on copied datablocks and never touching original datablock. - There are some cases when we need to know non-ID pointers for function bindings. This mainly applies to scene collections and armatures. The idea of dealing with this is to "expand" copy-on-write datablock at the dependency graph build time. This might introduce some slowdown to the dependency graph construction time, but allows us to have minimal changes in the code and avoid any hash look-up from evaluation function (one of the ideas to avoid using pointers as function bindings is to pass name of layer or a bone to the evaluation function and look up actual data based on that name). Currently there is a special function in depsgraph which does such a synchronization, in the future we might want to make it more generic. At some point we need to synchronize copy-on-write version of datablock with the original version. This happens, i.e., when we change active object or change selection. We don't want any actual evaluation of update flush happening for such thins, so now we have a special update tag: DEG_id_tag_update((id, DEG_TAG_COPY_ON_WRITE) - For the render engines we now have special call for the dependency graph to give evaluated datablock for the given original one. This isn't fully ideal but allows to have Cycles viewport render. This is definitely a subject for further investigation / improvement. This call will tag copy-on-write component tagged for update without causing updates to be flushed to any other objects, causing chain reaction of updates. This tag is handy when selection in the scene changes. This basically summarizes ideas underneath this commit. The code should be reasonably documented. Here is a demo of dependency graph with all copy-on-write stuff in it: https://developer.blender.org/F635468 = What to expect to (not) work? = - Only meshes are properly-ish aware of copy-on-write currently, Non-mesh geometry will probably crash or will not work at all. - Armatures will need similar depsgraph built-time expansion of the copied datablock. - There are some extra tags / relations added, to keep things demo-able but which are slowing things down for evaluation. - Edit mode works for until click selection is used (due to the selection code using EditDerivedMesh created ad-hoc). - Lots of tools will lack tagging synchronization of copied datablock for sync with original ID. = How to move forward? = There is some tedious work related on going over all the tools, checking whether they need to work with original or final evaluated object and make the required changes. Additionally, there need synchronization tag done in fair amount of tools and operators as well. For example, currently it's not possible to change render engine without re-opening the file or forcing dependency graph for re-build via python console. There is also now some thoughts required about copying evaluated properties between objects or from collection to a new object. Perhaps easiest way would be to move base flag flush to Object ID node and tag new objects for update instead of doing manual copy. here is some WIP patch which moves such evaluaiton / flush: https://developer.blender.org/F635479 Lots of TODOs in the code, with possible optimization. = How to test? = This is a feature under heavy development, so obviously it is disabled by default. The only reason it goes to 2.8 branch is to avoid possible merge hell. In order to enable this feature use WITH_DEPSGRAPH_COPY_ON_WRITE CMake configuration option.
2017-06-12Depsgraph: Traversing should be consistent for nodes and relationshipDalai Felinto
We need to traverse the same exact objects for both nodes and relationship builder. We were using FOREACH_SCENE_OBJECT for relationships, which would lead to plenty of warnings in multiple situations. In the future we will need to change this to build the depsgraph relations and nodes to one single render_layer. Fix T51780: If an object is in two collections and I do a full copy of scene things go bad
2017-06-06Merge branch 'master' into blender2.8Sergey Sharybin
2017-06-06Depsgraph: Only use extern "C" when really neededSergey Sharybin
2017-04-27Fix wrong scene assigned when using setsCampbell Barton
Depsgraph was left with wrong set-scene.
2017-04-25Depsgraph: Store Scene in depsgraph structDalai Felinto
This way we can retrieve the scene from depsgraph that were not created from a G.main (e.g., when doing material thumbnail preview render).
2017-04-01Blender 2.8: Hook of layer collections evaluation in DEGSergey Sharybin
This moves selectability/visibility flag flush from some hardcoded places in the code to depsgraph. This way it is possible to simply tag depsgraph to update those flags and rest it'll do on its own. Using depsgraph for such flush is an overkill: those flags are fully static and can not be animated, so it doesn't really make sense to hook only those to depsgraph. However, in the future we will have overrides on collections, which ideally would need to be animatable and drivable and easiest way to support this is to do this on depsgraph level, so it ensures proper order of evaluation for animation and drivers. And it seems logical to do both overrides and flags flush from depsgraph from this point of view. This commit also includes the evaluation of IDProperty for collections, which basically are just another form of override. So once we implement the other kind of overrides the flushing and collection evaluation won't change. Patch by Sergey Sharybin and Dalai Felinto
2017-03-16Merge branch 'master' into blender2.8Sergey Sharybin
2017-03-16Depsgraph: Fixed crash with curve bevel indirect dupligroupsSergey Sharybin
Need to expand all object's dupli-groups, not only the dupli-groups of objects directly linked to the scene.
2017-02-14Layer Macros: create the instance as part of the macroDalai Felinto
Instead of pre-initializing an instance prior to the macro, we do it as part of the macro itself now.
2017-02-09Depsgraph fix for scene layersDalai Felinto
Objects can be moved around freely now
2017-02-07Render Layers and Collections (merge from render-layers)Dalai Felinto
Design Documents ---------------- * https://wiki.blender.org/index.php/Dev:2.8/Source/Layers * https://wiki.blender.org/index.php/Dev:2.8/Source/DataDesignRevised User Commit Log --------------- * New Layer and Collection system to replace render layers and viewport layers. * A layer is a set of collections of objects (and their drawing options) required for specific tasks. * A collection is a set of objects, equivalent of the old layers in Blender. A collection can be shared across multiple layers. * All Scenes have a master collection that all other collections are children of. * New collection "context" tab (in Properties Editor) * New temporary viewport "collections" panel to control per-collection visibility Missing User Features --------------------- * Collection "Filter" Option to add objects based on their names * Collection Manager operators The existing buttons are placeholders * Collection Manager drawing The editor main region is empty * Collection Override * Per-Collection engine settings This will come as a separate commit, as part of the clay-engine branch Dev Commit Log -------------- * New DNA file (DNA_layer_types.h) with the new structs We are replacing Base by a new extended Base while keeping it backward compatible with some legacy settings (i.e., lay, flag_legacy). Renamed all Base to BaseLegacy to make it clear the areas of code that still need to be converted Note: manual changes were required on - deg_builder_nodes.h, rna_object.c, KX_Light.cpp * Unittesting for main syncronization requirements - read, write, add/copy/remove objects, copy scene, collection link/unlinking, context) * New Editor: Collection Manager Based on patch by Julian Eisel This is extracted from the layer-manager branch. With the following changes: - Renamed references of layer manager to collections manager - I doesn't include the editors/space_collections/ draw and util files - The drawing code itself will be implemented separately by Julian * Base / Object: A little note about them. Original Blender code would try to keep them in sync through the code, juggling flags back and forth. This will now be handled by Depsgraph, keeping Object and Bases more separated throughout the non-rendering code. Scene.base is being cleared in doversion, and the old viewport drawing code was poorly converted to use the new bases while the new viewport code doesn't get merged and replace the old one. Python API Changes ------------------ ``` - scene.layers + # no longer exists - scene.objects + scene.scene_layers.active.objects - scene.objects.active + scene.render_layers.active.objects.active - bpy.context.scene.objects.link() + bpy.context.scene_collection.objects.link() - bpy_extras.object_utils.object_data_add(context, obdata, operator=None, use_active_layer=True, name=None) + bpy_extras.object_utils.object_data_add(context, obdata, operator=None, name=None) - bpy.context.object.select + bpy.context.object.select = True + bpy.context.object.select = False + bpy.context.object.select_get() + bpy.context.object.select_set(action='SELECT') + bpy.context.object.select_set(action='DESELECT') -AddObjectHelper.layers + # no longer exists ```
2017-01-26Depsgraph: Remove owner argument from relations builder as wellSergey Sharybin
The idea was to link something to a parent, but the point is: we must not pass owner deep and then have any parent-type-related logic implemented in the "children".
2017-01-25Fix T50512: Linked Backround scene with animation not updating with new ↵Sergey Sharybin
depsgraph Was missing relations for the set scenes. Perhaps not ideal solution, but should be good enough for now.
2017-01-25Depsgraph: Do ID tag outside of build_sceneSergey Sharybin
Otherwise it was possible to get ID tags cleared in the middle of DEG construction when there are set scenes used.
2016-11-17Depsgrpah: Fix missing animation update in movie clipsSergey Sharybin
2016-11-17Depsgraph: Move scene builder function to own fileSergey Sharybin
This way it's much easier to grasp what the graph actually contains.