diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-12-15 12:51:16 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-12-15 13:59:04 +0300 |
commit | 90b79176870e56b55f5c72a8943a502bfe78c7b0 (patch) | |
tree | c8863c9a6c1ed87cfe8d9e7ea414a6e3f25a3475 /source/blender/makesrna/intern/rna_depsgraph.c | |
parent | 3a47fb764cdc4731aa3c386cffb08f5146018c4b (diff) |
Depsgraph: Make DEG_OBJECT_ITER more granular
It is not nice to assume we always want visible or directly linked objects.
So we make it as granular as we can.
Diffstat (limited to 'source/blender/makesrna/intern/rna_depsgraph.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_depsgraph.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_depsgraph.c b/source/blender/makesrna/intern/rna_depsgraph.c index 7d520ec6abd..eb32a85afa7 100644 --- a/source/blender/makesrna/intern/rna_depsgraph.c +++ b/source/blender/makesrna/intern/rna_depsgraph.c @@ -152,7 +152,9 @@ static void rna_Depsgraph_objects_begin(CollectionPropertyIterator *iter, Pointe DEGOIterObjectData *data = MEM_callocN(sizeof(DEGOIterObjectData), __func__); data->graph = (Depsgraph *)ptr->data; - data->flag = DEG_ITER_OBJECT_FLAG_SET; + data->flag = DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY | + DEG_ITER_OBJECT_FLAG_VISIBLE | + DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET; ((BLI_Iterator *)iter->internal.custom)->valid = true; DEG_iterator_objects_begin(iter->internal.custom, data); @@ -189,7 +191,10 @@ static void rna_Depsgraph_duplis_begin(CollectionPropertyIterator *iter, Pointer DEGOIterObjectData *data = MEM_callocN(sizeof(DEGOIterObjectData), __func__); data->graph = (Depsgraph *)ptr->data; - data->flag = DEG_ITER_OBJECT_FLAG_ALL; + data->flag = DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY | + DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET | + DEG_ITER_OBJECT_FLAG_VISIBLE | + DEG_ITER_OBJECT_FLAG_DUPLI; ((BLI_Iterator *)iter->internal.custom)->valid = true; DEG_iterator_objects_begin(iter->internal.custom, data); |