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
2021-06-10Cleanup: spelling in commentsCampbell Barton
2020-12-07Cleanup: partial Clang-Tidy modernize-loop-convertSybren A. Stüvel
Modernize loops by using the `for(type variable : container)` syntax. Some loops were trivial to fix, whereas others required more attention to avoid semantic changes. I couldn't address all old-style loops, so this commit doesn't enable the `modernize-loop-convert` rule. Although Clang-Tidy's auto-fixer prefers to use `auto` for the loop variable declaration, I made as many declarations as possible explicit. To me this increases local readability, as you don't need to fully understand the container in order to understand the loop variable type. No functional changes.
2020-12-04Cleanup: Clang-Tidy, modernize-deprecated-headersSybren A. Stüvel
No functional changes.
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-08-18Cleanup: remove bmain argument from BKE_scene_graph_update_for_newframeJacques Lucke
Reviewers: sergey Differential Revision: https://developer.blender.org/D8613
2020-06-29Depsgraph: introduce blender::deg namespaceJacques Lucke
Reviewers: sergey Differential Revision: https://developer.blender.org/D8150
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-29Cleanup: use const args for depsgraph functionsCampbell Barton
2020-04-28Cleanup: remove unnecessary includesJacques Lucke
2020-04-28Depsgraph: use BLI::Set for entry_tagsJacques Lucke
Reviewers: sergey Differential Revision: https://developer.blender.org/D7555
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-01-28Cleanup: changed NULL to nullptr in depsgraph C++ codeSybren A. Stüvel
No functional changes.
2019-11-27Cleanup: spelling, clang-formatCampbell Barton
2019-08-23RNA: Cleanup PointerRNA structJacques Lucke
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
2019-07-07Cleanup: spellingCampbell Barton
2019-06-20Cleanup: Remove unused depsgraph functionSergey Sharybin
2019-06-12Cleanup: spelling in commentsCampbell Barton
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-29DrawManager: Cycles+GPencilJeroen Bakker
Fix for GPencil and Cycles Render draw type. GPencil objects were only shown when overlays were turned on. The cause of this is an optimization we did to not populate any draw engine when an external renderer was used with overlays turned off. This will check if there is any visible GPencil object in the scene. if so it will still perform the loop. `DEG_id_type_any_exists` can check if any object of a certain type_id is in the result. This check is also being used to check if there are any visible grease pencil objects as a precheck in `DRW_render_check_grease_pencil`. Reviewed By: brecht, fclem, antoniov Maniphest Tasks: T65191 Differential Revision: https://developer.blender.org/D4962
2019-05-28Depsgraph: Add query for whether graph is up to dateSergey Sharybin
2019-05-16Depsgraph: Add queries whether ID is original/evaluatedSergey Sharybin
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-06Fix T64161: Crashing using undo and multiple windowsSergey Sharybin
It is possible that dependency graph was not yet initialized, so need to do NULL pointer check.
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-07Refactor CDData masks, to have one mask per mesh elem type.Bastien Montagne
We already have different storages for cddata of verts, edges etc., 'simply' do the same for the mask flags we use all around Blender code to request some data, or limit some operation to some layers, etc. Reason we need this is that some cddata types (like Normals) are actually shared between verts/polys/loops, and we don’t want to generate clnors everytime we request vnors! As a side note, this also does final fix to T59338, which was the trigger for this patch (need to request computed loop normals for another mesh than evaluated one). Reviewers: brecht, campbellbarton, sergey Differential Revision: https://developer.blender.org/D4407
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-03Depsgraph: completely move customdata_mask to the ID node.Alexander Gavrilov
Move all mask-related fields from Object and OperationDepsNode to Object_Runtime and IDDepsNode. Auto-apply DEG_TAG_GEOMETRY if the mask changes after DEG rebuild. Update DEG API and all code that uses it. This fixes "source mesh data is not ready" errors from Data Transfer modifier when parameters are changed in the UI after the recent mesh_get_eval_final fix. Reviewers: sergey Differential Revision: https://developer.blender.org/D4025
2018-10-24Depsgraph: fixes for the eval_flags API behavior.Alexander Gavrilov
- Use the original ID pointer for lookup in DEG_get_eval_flags_for_id. - When the flags change after a DEG rebuild, tag the object for update. - Instead of mixing int and short in different places, use uint32_t. This fixes text not updating when a Follow Curve reference is set.
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-02Depsgraph: fix some DEG queries crashing with new, empty graph.Bastien Montagne
Calling code is responsible to check on NULL pointers here, or ensure is does have a fully built and evaluated depsgraph, but this should never crash in DEG queries themselves.
2018-06-04Fix crash when making objects to share same meshSergey Sharybin
Make it more reliable and predictable way of getting pointer to an original mesh which came from copy-on-write engine. Related change: made it (hopefully) more clear name for flags.
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-19Add back temporary exception for pose bones in DEG_get_evaluated_rna_pointer()Joshua Leung
Without the exception, adding new poses to pose libraries took several seconds with only <= 4 bones selected. While we may still need this for other cases too, since bones are such a common use case, it makes sense to provide some level of optimisation for them.
2018-05-19Cleanup: Remove temporary debugging codeJoshua Leung
2018-05-19WIP: Improved implementation of DEG_get_evaluated_rna_pointer()Joshua Leung
This now works by getting the RNA Path from the given PointerRNA to go from the ID block to the data it points to, then uses this path to find the new data relative to the COW ID. Note: This currently still has all the debug prints left in - As can be seen, I was testing this against the earlier PoseBone hack/special case. We may still need to bring such special cases back in future, since looking up RNA Paths like this can be slow.
2018-05-19WIP COW Fix: Insert keyframe operators/api now queries depsgraph for ↵Joshua Leung
evaluated data When using copy on write, insert keyframe operators were reading from old bmain data instead of COW data. This meant that inserting keyframes would often read old/stale data, resulting in invalid keyframes getting created (e.g. from last transform operation, instead of actual current state). This commit makes it so that keyframing operators will ask depsgraph for the evaluated copy of the data, so that it can read values from that. It introduces a new function - `DEG_get_evaluated_rna_pointer()`, which when working correctly/fully, should work just like the other `DEG_get_evaluated_*()` functions, except it lets you pass in an RNA Pointer. However, currently, this is only done for Pose Bones (as a dirty hack, since this is an important/pivotal requirement for production) and/or datablock properties directly (since we can just use the DEG_get_evaluated_id() directly). on the datablock. Committing to a branch for now as this all needs more testing. More work to come later at a more sane time of day!
2018-04-25Depsgraph: Ensure we only expand scene datablock on evaluationSergey Sharybin
Previously it could have happened on every request to evaluated scene or view layer. This commit also removes expansion of view layer and scene from iterator. Iterator is not to be used before depsgraph is evaluated.
2018-04-25Depsgraph: Avoid hash lookup for every evaluated scene querySergey Sharybin
Cache pointer to evaluated scene datablock on relations build time, that pointer never changes after that.
2018-04-20Depsgraph: Add utility functions to go from evaluated to original datablockSergey Sharybin
2018-04-17Depsgraph: Allow querying NULL IDs for evaluated versionSergey Sharybin
Saves us from extra checks for NULL pointers when using datablocks for read.
2018-04-13Depsgraph: store mode and time in depsgraph, add view layer / scene accessors.Brecht Van Lommel
Scene, view layer and mode are now set in the constructor and never changed. Time is updated on frame changes to indicate which frame is being or has been evaluated last. This is a step towards making EvaluationContext obsolete. Differential Revision: https://developer.blender.org/D3144
2018-04-12Depsgraph: Avoid relations build time scene datablock expansionSergey Sharybin
Quite straightforward implementation, allows us to remove all the cherry-picking update of specified scene/view layer/collection fields. Makes it possible to use generic function to update scene. The tricky part is that we need to know view layer pointer before the whole evaluation starts. So we actually expand scene at initialization of evaluation. context. This is still a bit of an exceptional case, but at least we still avoid dangerous cherry-picking update.
2018-01-17Depsgraph: Use more const qualifiersSergey Sharybin
2017-12-20Merge branch 'master' into blender2.8Sergey Sharybin
2017-12-20Depsgraph: Move ID node to own fileSergey Sharybin