diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-11-09 20:41:54 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-11-09 20:43:08 +0300 |
commit | 6cbb6db98713b4b4259b9ad2f9f44742aedba8b3 (patch) | |
tree | 12ce9720a9fc0109df440464ba258d897252bd15 /source/blender/blenkernel | |
parent | 615e383ec2233affc0e18d2e0005a3d3ea730bed (diff) |
Cleanup: fix layer_collection_sync() using int's for short values.
Collection flag and runtime_flag are shorts, not ints...
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/layer.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c index f27a199097f..fbfa47c8939 100644 --- a/source/blender/blenkernel/intern/layer.c +++ b/source/blender/blenkernel/intern/layer.c @@ -607,10 +607,10 @@ int BKE_layer_collection_findindex(ViewLayer *view_layer, const LayerCollection * in at least one layer collection. That list is also synchronized here, and * stores state like selection. */ -static int layer_collection_sync( +static short layer_collection_sync( ViewLayer *view_layer, const ListBase *lb_scene, ListBase *lb_layer, ListBase *new_object_bases, - int parent_exclude, int parent_restrict) + short parent_exclude, short parent_restrict) { /* TODO: support recovery after removal of intermediate collections, reordering, .. * For local edits we can make editing operating do the appropriate thing, but for @@ -638,7 +638,7 @@ static int layer_collection_sync( /* Add layer collections for any new scene collections, and ensure order is the same. */ ListBase new_lb_layer = {NULL, NULL}; - int runtime_flag = 0; + short runtime_flag = 0; for (const CollectionChild *child = lb_scene->first; child; child = child->next) { Collection *collection = child->collection; @@ -654,13 +654,13 @@ static int layer_collection_sync( } /* Collection restrict is inherited. */ - int child_restrict = parent_restrict; + short child_restrict = parent_restrict; if (!(collection->flag & COLLECTION_IS_MASTER)) { child_restrict |= collection->flag; } /* Sync child collections. */ - int child_runtime_flag = layer_collection_sync( + short child_runtime_flag = layer_collection_sync( view_layer, &collection->children, &lc->layer_collections, new_object_bases, lc->flag, child_restrict); @@ -790,7 +790,7 @@ void BKE_layer_collection_sync(const Scene *scene, ViewLayer *view_layer) const ListBase collections = {&child, &child}; ListBase new_object_bases = {NULL, NULL}; - const int parent_exclude = 0, parent_restrict = 0; + const short parent_exclude = 0, parent_restrict = 0; layer_collection_sync( view_layer, &collections, &view_layer->layer_collections, &new_object_bases, |