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
2018-11-14Fix T57760: Depsgraph 'object_instances' showing incorrect list of objects.Bastien Montagne
It appears that Python gets next item before using current one, which would break our Depsgraph instance iterator (since only current item is valid there, we use the same memory at each iteration). Working around that with an ugly ping-pong game between two sets of iterator data, so that previous one (C RNA-iterator-wise) remains valid memory for Python to access to.
2018-10-02Depsgraph/RNA: add warning that all data from object instances iterator are ↵Bastien Montagne
COW data. It is crucial that scripts do not write, and even more importantly, do not store any references to those. Otherwise, that’s a rather straight path to crash.
2018-09-19Fix own mistake in previous commit.Bastien Montagne
2018-09-19Depsgraph/RNA: Fix broken 'dupliobject' RNA interface.Bastien Montagne
Previous code would crash on whole lot of accessors in case current item was not a real dupli instance. And code was missing access to crucial dupli (world) matrix! Pretty useless without that. Also reordered a bit members in here, let's try to keep a bit of logic...
2018-07-05Merge branch 'master' into blender2.8Campbell Barton
2018-07-05RNA: use is_dirty prefix for checking updatesCampbell Barton
Common convention for read-only update checks
2018-07-01Merge branch 'master' into blender2.8Campbell Barton
2018-06-11Cleanup: remove unused DAG_EVAL_PREVIEW mode.Brecht Van Lommel
2018-06-06Depsgraph: Expose (evaluation) mode in rnaDalai Felinto
2018-06-06Depsgraph iterator: Remove explicit modeDalai Felinto
We can get the mode from the depsgraph itself.
2018-06-06Depsgraph: remove legacy code for dupli group updates.Brecht Van Lommel
This caused crashes in some cases, and should be fully handled by the depsgraph now.
2018-05-30Depsgraph API: renaming, more granular update information.Brecht Van Lommel
* depsgraph.ids: all evaluated datablocks in the depsgraph * depsgraph.objects: all evaluated objects in the depsgraph * depsgraph.object_instances: all object instances to display or render * depsgraph.updates: list of updates to datablocks
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-04-28Cleanup: style, duplicate includesCampbell Barton
2018-04-25Depsgraph: Clarify python APISergey Sharybin
Follow same naming convention as for C: - Original data is named without any extra prefix/suffix. - Evaluated data is named with _eval suffix.
2018-04-04Fix Cycles particle info node not working.Brecht Van Lommel
2018-02-28Depsgraph: Expose query to get view layer to RNADalai Felinto
2018-01-16Merge branch 'master' into blender2.8Sergey Sharybin
2018-01-16Cleanup: Naming of depsgraphSergey Sharybin
2017-12-21Implement duplicator viewport/render visibility optionsDalai Felinto
This allows a duplicator (as known as dupli parent) to be in a visible collection so its duplicated objects are visible, however while being invisible for the final render. An object that is a particle emitter is also considered a duplicator. Many thanks for the reviewers for the extense feedback. Reviewers: sergey, campbellbarton Differential Revision: https://developer.blender.org/D2966
2017-12-21Merge branch 'master' into blender2.8Sergey Sharybin
2017-12-21Depsgraph: Bring timing statistics to the new dependency graphSergey Sharybin
This statistics is only collected when debug_value is different from 0. Stored in depsgraph node itself, so we can always have access to average data and other stats which requires persistent storage. This way we also don't waste time trying to find stats from a separately stored hash map.
2017-12-21Depsgraph: Make it more clear that we dump relations into graphvizSergey Sharybin
We might implement other things to dump into graphviz, so better to start having explicit names.
2017-12-21Merge branch 'master' into blender2.8Sergey Sharybin
2017-12-21Depsgraph: Remove eval priority from debuggerSergey Sharybin
This needs to be redone anyway, to correspond to possibly new priorities calculated for evaluaiton.
2017-12-15Depsgraph: cleanup DEGOIterObjectData > DEGObjectIterDataDalai Felinto
2017-12-15Depsgraph: Make DEG_OBJECT_ITER more granularDalai Felinto
It is not nice to assume we always want visible or directly linked objects. So we make it as granular as we can.
2017-12-01Depsgraph: Cleanup, namingSergey Sharybin
It makes more sense to stick to DEG_iterator_object order in name, since we can have functions to iterate over different entities and we want all of them to have common prefix.
2017-11-07Sanitize use of BLI_iteratorDalai Felinto
We now initialize iter.valid as true as part of the main iterator (and manually when using via Python). And we don't even bother setting iter->current to NULL if it's invalid. Let's stick to using iter->valid only.
2017-10-25Merge branch 'master' into blender2.8Sergey Sharybin
2017-10-25Depsgraph: Rework debug relations update functionSergey Sharybin
Make it a tag for relations update function instead, since we will not be able to easily rebuild relations, and we wouldn't be able to iterate all scenes. This is a part of mowing depsgraph to be per-workspace/layer in 2.8 branch.
2017-10-25Depsgraph: Cleanup, trailing whitespace and bracesSergey Sharybin
2017-10-25Depsgraph: Make depsgraph.debug_stats to return a stringSergey Sharybin
This way we can see result in the python console.
2017-10-24Depsgraph: Begin bringing API to pass explicit graphSergey Sharybin
This is a first step towards an updated API where we pass explicit graph rather than a scene. This is because we can no longer deduct which graph to use since it will depend on a context. Will happen in several steps, so bisecting will not be such a pain.
2017-10-07Cleanup: style, duplicate includesCampbell Barton
2017-07-21Pass EvaluationContext argument everywhereLuca Rood
Note that some little parts of code have been dissabled because eval_ctx was not available there. This should be resolved once DerivedMesh is replaced.
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-08Replace all old DAG calls with direct calls to new DEG and remove ↵Luca Rood
BKE_depsgraph.h This removes BKE_depsgraph.h and depsgraph.c
2017-06-06Cycles: Fix infinite update when using duplisSergey Sharybin
The issue was caused by usage of address of dupli-object (which will vary from iteration process to iteration process) as something denoting whether we've got the data synchronized to Cycles or not. For now solved by using address of original object (the one DupliObject points to) as a pointer for the map. Need to do more thoughts about this.
2017-06-06Cycles: Support rendering objects from dupli-listSergey Sharybin
This commit extends the work from Dalai made around scene iterators to support iterating into objects from dupli-lists. Changes can be summarized as: - Depsgraph iterator will hold pointer to an object which created current duplilist. It is available via `dupli_parent` field of the iterator. It is only set when duplilist is not NULL and guaranteed to be NULL for all other cases. - Introduced new depsgraph.duplis collection which gives a more extended information about depsgraph iterator. It is basically a collection on top of DEGObjectsIteratorData. It is used to provide access to such data as persistent ID, generated space and so on. Things which still needs to be done/finished/clarified: - Need to introduce some sort of `is_instance` boolean property which will indicate Python and C++ RNA that we are inside of dupli-list. - Introduce a way to skip dupli-list for particular objects. So, for example, if we are culling object due to distance we can skip all objects it was duplicating. - Introduce a way to skip particular duplicators. So we can skip iterating into particle system. - Introduce some cleaner API for C side of operators to access all data such as persistent ID and friends. This way we wouldn't need de-reference iterator and could keep access to such data really abstract. Who knows how we'll be storing internal state of the operator in the future. While there is still stuff to do, current state works and moves us in the proper direction.
2017-06-02Cleanup: Trailign whitespaceSergey Sharybin
2017-06-02Fixup for 824bf261f773 so Cycles does not show dupliDalai Felinto
Cycles is using rna_depsgraph, not rna_scene. Duplis are still not working there but now at least it shows it was showing before the commit. To show duplis in Cycles do: - data->flag = DEG_OBJECT_ITER_FLAG_SET; + data->flag = DEG_OBJECT_ITER_FLAG_ALL;
2017-06-02Initial implememtation for dupli objectsDalai Felinto
Now dupli groups, objects, particles, ... are all working. This introduces a flag for the iterator to determine whether we go over Set and dupli objects or not. Important to remember to keep the iteration of DEG_ as readonly. Cycles is not working well for dupli groups, and it's memleaking for dupli particles. So for now we iterate over main objects and set only, not dupli. To change that go in rna_scene.c and: -DEG_OBJECT_ITER(graph, ob, DEG_OBJECT_ITER_FLAG_SET) +DEG_OBJECT_ITER(graph, ob, DEG_OBJECT_ITER_FLAG_ALL) Review and suggestions by Sergey Sharybin
2017-05-26Depsgraph: Rename DAG > DEG functions from depsgraph_query.ccDalai Felinto
2017-05-18Rename Iterator struct to BLI_IteratorDalai Felinto
2017-04-21Unify RNA and core depsgraph.objectsDalai Felinto
Note: Since this is not listbase nor array I'm also expanding RNA_types.h to allow for custom data.
2017-04-20RNA: depsgraph.objectsDalai Felinto
Iterator to return the objects evaluated from depsgraph. The iterator itself will change once CoW is implemented. This reproduces the behaviour of DEG_OBJECT_ITER but for Python.
2016-12-12Fix (unreported) some RNA func definitions setting flags of other func ↵Bastien Montagne
parameters! Both found cases where luckily harmless, though...
2016-12-12Refactor RNA property: split flags in property flags, parameter flags, and ↵Bastien Montagne
internal flags. This gives us 9 flags available again for properties (we had none anymore), and also makes things slightly cleaner. To simplify (and make more clear the differences between mere properties and function parameters), also added RNA_def_parameter_flags function (and its clear counterpart), to be used instead of RNA_def_property_flag for function parameters. This patch is also a big cleanup (some RNA function definitions were still using 'prop' PropertyRNA pointer, etc.). And yes, am aware this will be annoying for all branches, but we really need to get new flags available for properties (will need at least one for override, etc.). Reviewers: sergey, Severin Subscribers: dfelinto, brecht Differential Revision: https://developer.blender.org/D2400
2015-05-12Depsgraph: New dependency graph integration commitSergey Sharybin
This commit integrates the work done so far on the new dependency graph system, where goal was to replace legacy depsgraph with the new one, supporting loads of neat features like: - More granular dependency relation nature, which solves issues with fake cycles in the dependencies. - Move towards all-animatable, by better integration of drivers into the system. - Lay down some basis for upcoming copy-on-write, overrides and so on. The new system is living side-by-side with the previous one and disabled by default, so nothing will become suddenly broken. The way to enable new depsgraph is to pass `--new-depsgraph` command line argument. It's a bit early to consider the system production-ready, there are some TODOs and issues were discovered during the merge period, they'll be addressed ASAP. But it's important to merge, because it's the only way to attract artists to really start testing this system. There are number of assorted documents related on the design of the new system: * http://wiki.blender.org/index.php/User:Aligorith/GSoC2013_Depsgraph#Design_Documents * http://wiki.blender.org/index.php/User:Nazg-gul/DependencyGraph There are also some user-related information online: * http://code.blender.org/2015/02/blender-dependency-graph-branch-for-users/ * http://code.blender.org/2015/03/more-dependency-graph-tricks/ Kudos to everyone who was involved into the project: - Joshua "Aligorith" Leung -- design specification, initial code - Lukas "lukas_t" Toenne -- integrating code into blender, with further fixes - Sergey "Sergey" "Sharybin" -- some mocking around, trying to wrap up the project and so - Bassam "slikdigit" Kurdali -- stressing the new system, reporting all the issues and recording/writing documentation. - Everyone else who i forgot to mention here :)