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-11-09Fix T101906: Modifier apply not working if target object is in excluded ↵Sergey Sharybin
collection The issue was introduced by the optimization of hidden objects and modifiers in the f12f7800c296. The solution here detects that either an object is hidden or the modifier is disabled and does special tricks to ensure the dependencies are evaluated. This is done by constructing a separate minimal dependency graph needed for the object on which the modifier is being applied on. This minimal dependency graph will not perform visibility optimization, making it so modifier dependencies are ensured to be evaluated. The downside of such approach is that some dependencies which are not needed for the modifier are still evaluated. There is no currently an easy way to avoid this. At least not without introducing possible race conditions with other dependency graphs. If the performance of applying modifiers in such cases becomes a problem the possible solution would be to create a temporary object with a single modifier so that only minimal set of dependencies is pulled in the minimal dependency graph. Differential Revision: https://developer.blender.org/D16421
2022-08-02Depsgraph: Make naming and recalc flag sign consistentSergey Sharybin
Always use unsigned int for the recalc flags. This allows to use all 32 bit of integer for the flags without worrying about the sign. Use full notation of `unsigned int` instead of short `uint` to avoid pulling more headers in. Whenever depsgraph API allows passing combined recalc flags call the variable `flags` and use `unsigned int` type for it. For a single flag use `IDRecalcFlag` flag. No functional changes expected.
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
2022-01-07Cleanup: remove redundant const qualifiers for POD typesCampbell Barton
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
2021-12-10Cleanup: move public doc-strings into headers for 'depsgraph'Campbell Barton
- Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. Ref T92709
2021-08-26Cleanup: use C style comments for descriptive textCampbell Barton
2021-08-04Cleanup: use C comments for descriptive textCampbell Barton
2021-07-12Fix T89040: dependency graph not handling time remapping correctlyBrecht Van Lommel
In this bug report it resulted in rendering animations stopping too early, but this affected more areas. After the previous cleanup commit, it becomes clear that frame and ctime values were mixed up.
2021-06-22Fix T89196: Depsgraph use-after-free after scene switching undoSergey Sharybin
Delay depsgraph visibility update tagging until it is known that graph relations are up to date, and until it is known that the graph is actually needed to be evaluated. Differential Revision: https://developer.blender.org/D11660
2021-06-22Cleanup: Use more clear visibility tag function nameSergey Sharybin
No functional changes. Just makes it clear this is not an immediate update, and will make an upcoming change more localized.
2021-04-19Fix crash with Alembic export after recent persistent data bugfixBrecht Van Lommel
We weren't clearing the recalc flags for that case.
2021-04-19Fix T87535, T87295: issues with new persistent data optionBrecht Van Lommel
Some persistent data code was disable due to a deeper design issue, which meant some updates were not communicated to renderers. Dependency graph updates work in two passes, once where Blender scene animation updates are done, then app handler scripts can run to make further scene modifications, and then the depsgraph is updated again to take those into account. Previously the viewport would update renderers twice when such app handler scripts were present. Now both viewport and persistent data rendering update the renderers only once, accumulating updates from both passes.
2021-04-05Render: faster animation and re-rendering with Persistent DataBrecht Van Lommel
For Cycles, when enabling the Persistent Data option, the full render data will be preserved from frame-to-frame in animation renders and between re-renders of the scene. This means that any modifier evaluation, BVH building, OpenGL vertex buffer uploads, etc, can be done only once for unchanged objects. This comes at an increased memory cost. Previously there option was named Persistent Images and had a more limited impact on render time and memory. When using multiple view layers, only data from a single view layer is preserved to keep memory usage somewhat under control. However objects shared between view layers are preserved, and so this can speedup such renders as well, even single frame renders. For Eevee and Workbench this option is not available, however these engines will now always reuse the depsgraph for animation and multiple view layers. This can significantly speed up rendering. These engines do not support sharing the depsgraph between re-renders, due to technical issues regarding OpenGL contexts. Support for this could be added if those are solved, see the code comments for details.
2021-01-29Fix T84717: missing 3D viewport updates when changing shading settingsBrecht Van Lommel
Previously this relied on the dependency graph to detect changes in the screen datablock, which would then notify the renderers. This was rather indirect an not even really by design. Instead use notifiers to tag specific 3D viewports to be updated. Includes changes to BKE_scene_get_depsgraph to accept a const Scene pointer. Testing if this works correctly requires adding back commits 81d444c and 088904d, since those have been temporarily reverted. Differential Revision: https://developer.blender.org/D10235
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-18Depsgraph: simplify DEG_evaluate_* APIJacques Lucke
This mainly removes the bmain argument, which can be retrieved from the graph itself. Also, I removed some outdated/unnecessary comments. Reviewers: sergey, sybren Differential Revision: https://developer.blender.org/D8614
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-04-29Cleanup: use const args for depsgraph functionsCampbell Barton
2020-03-17Depsgraph: Adds helpers to extract/restore despgraphs in a given Main.Bastien Montagne
Extract will steal all depsgraphs currently stored in given bmain, and restore will put them back in place, using scene and viewlayers as keys. Preliminary work for undo-speedup. Part of T60695/D6580.
2019-10-11Depsgraph: Cleanup, promote is_evaluating querySergey Sharybin
This way it might be used for sanity checks in RNA API as well.
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-05Depsgraph: Pass bmain to evaluation functionSergey Sharybin
Currently unused, makes code ready for an upcoming change.
2019-09-03Fix T68868: Assert in depsgraph debugging logsSergey Sharybin
Was happening when tagging for LEGACY_0 was used.
2019-08-25Cleanup: redundant struct declarationsCampbell Barton
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-04-17ClangFormat: apply to source, most of internCampbell Barton
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
2019-03-01Fix T62087: Crash when rendering in CyclesSergey Sharybin
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().
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove original authorCampbell Barton
Missed when removing contributors.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
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.
2019-01-31Depsgraph: Comb code to a better state all overSergey Sharybin
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.
2018-12-07Depsgraph: Remove duplicated sets of recalc/update flagsSergey Sharybin
There were at least three copies of those: - OB_RECALC* family of flags, which are rudiment of an old dependency graph system. - PSYS_RECALC* which were used by old dependency graph system as a separate set since the graph itself did not handle particle systems. - DEG_TAG_* which was used to tag IDs. Now there is a single set, which defines what can be tagged and queried for an update. It also has some aggregate flags to make queries simpler. Lets once and for all solve the madness of those flags, stick to a single set, which will not overlap with anything or require any extra conversion. Technically, shouldn't be measurable user difference, but some of the agregate flags for few dependency graph components did change. Fixes T58632: Particle don't update rotation settings
2018-12-03Depsgraph: assert that mesh_get_eval_final/deform aren't used in eval.Alexander Gavrilov
Using those functions during multithreaded evaluation is a sure way to have a race condition and crash.
2018-11-14Depsgraph: Remove meaningless evaluation modeSergey Sharybin
With the current implementation it only confuses logic around checks like vewport/render subdivision levels. If this mode is really needed for any decision making, implement this properly.
2018-11-14Depsgraph: Fix missing point cache reset when physics changesSergey Sharybin
Among all the lines moved around, the general idea is quite simple. Actually, there are two ideas implemented there. First one, is when object itself is tagged for update, we tag its point cache component for evaluation, which makes it so point cache is properly reset. We do it implicitly because otherwise we'll need to go everywhere and add explicit tag in almost all the properties. Second thing is, we link all collider and force fields to a point cache component using special type of link. This type of link only allows flush if change is caused by a user update. This way reset does not happen when change is caused due to animation, but will properly happen when user causes indirect change to the objects which are part of physics simulation.
2018-11-06Shrinkwrap: new mode that projects along the target normal.Alexander Gavrilov
The Nearest Surface Point shrink method, while fast, is neither smooth nor continuous: as the source point moves, the projected point can both stop and jump. This causes distortions in the deformation of the shrinkwrap modifier, and the motion of an animated object with a shrinkwrap constraint. This patch implements a new mode, which, instead of using the simple nearest point search, iteratively solves an equation for each triangle to find a point which has its interpolated normal point to or from the original vertex. Non-manifold boundary edges are treated as infinitely thin cylinders that cast normals in all perpendicular directions. Since this is useful for the constraint, and having multiple objects with constraints targeting the same guide mesh is a quite reasonable use case, rather than calculating the mesh boundary edge data over and over again, it is precomputed and cached in the mesh. Reviewers: mont29 Differential Revision: https://developer.blender.org/D3836
2018-08-23Depsgraph: First draft of graph filtering API implementationJoshua Leung
When this works correctly, we should be able to feed in an existing depsgraph instance, and get out a "filtered" copy of it that contains only the subset of nodes needed to evaluate what we're interested in. The current implementation only filters on ID blocks/nodes, and starts by building a full new depsgraph instance first. I'd originally intended to do it per operation instead, copying over individual nodes as appropriate to have the smallest and least memory intensive graph possible. However, I ended up running into into problems with function binding + COW arguments, hence the current slow solution.
2018-08-13Depsgraph: Remove obscure code which was only needed for old OSD implementationSergey Sharybin
2018-07-31Cleanup: style, duplicate includesCampbell Barton
2018-07-19Cleanup: styleCampbell Barton
2018-07-10Added comment for DEG_TAG_PSYS_xxx and PSYS_RECALC_xxx relationSybren A. Stüvel
2018-06-11Cleanup: remove unused DAG_EVAL_PREVIEW mode.Brecht Van Lommel
2018-06-01Merge branch 'master' into blender2.8Campbell Barton
2018-06-01Cleanup: trailing whitespace (comment blocks)Campbell Barton
Strip unindented comment blocks - mainly headers to avoid conflicts.
2018-05-31Depsgraph: Begin concept of active dependency graphSergey Sharybin
When active dependency graph is evaluated, it will apply animation, drivers and scalar evaluation data (such as object matrix) to an original datablock. This way operators and tools can easily read data from original datablock. This will simplify porting them to copy-on-write, and solve issues when some operator will allocate new datablock based on original one, and will want to read data from it.
2018-05-31Depsgraph: Remove the "disable-copy-on-write" option completelyJoshua Leung
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.
2018-05-30Fix missing Cycles 3D viewport updates when editing materials, lamps.Brecht Van Lommel
This introduces a new depsgraph API for getting updated datablocks, rather than getting it from bpy.data. * depsgraph.ids_updated gives a list of all datablocks in the depsgraph which have been updated. * depsgraph.id_type_updated('TYPE') is true if any datablock of the given type has been added, removed or modified. More API updates are coming to properly handle multiple depsgraphs and finer update granularity, but this should make Cycles work again.
2018-05-22Depsgraph: Enable copy on write by defaultJoshua Leung
As was decided at today's dev kickoff, we're now moving to having Copy-on-Write enabled by default, as 2.8 is barely functional with it off. To run Blender *without* COW (e.g. for testing), use: --disable-copy-on-write