[Bf-blender-cvs] [d31c4c56668] blender2.8: Layer/Depsgraph: Fix selectability issues

Dalai Felinto noreply at git.blender.org
Mon Apr 3 18:06:16 CEST 2017


Commit: d31c4c56668fe16096637f5f3697f1573096ebeb
Author: Dalai Felinto
Date:   Mon Apr 3 18:05:06 2017 +0200
Branches: blender2.8
https://developer.blender.org/rBd31c4c56668fe16096637f5f3697f1573096ebeb

Layer/Depsgraph: Fix selectability issues

===================================================================

M	source/blender/blenkernel/intern/layer.c
M	source/blender/makesrna/intern/rna_scene.c

===================================================================

diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index fd3ca547c2a..caa60450133 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -784,16 +784,6 @@ static void layer_collection_object_add(SceneLayer *sl, LayerCollection *lc, Obj
 	}
 
 	BLI_addtail(&lc->object_bases, BLI_genericNodeN(base));
-
-	if ((lc->flag_evaluated & COLLECTION_VISIBLE) != 0) {
-		base->flag |= BASE_VISIBLED;
-
-		if ((lc->flag_evaluated & COLLECTION_SELECTABLE) != 0) {
-			base->flag |= BASE_SELECTABLED;
-		}
-
-		IDP_SyncGroupValues(base->collection_properties, lc->properties_evaluated);
-	}
 }
 
 static void layer_collection_object_remove(SceneLayer *sl, LayerCollection *lc, Object *ob)
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 5a97d4d9c64..29bc5baab69 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -2386,6 +2386,10 @@ void rna_SceneCollection_object_link(
 
 	/* TODO(sergey): Only update relations for the current scene. */
 	DAG_relations_tag_update(bmain);
+
+	/* TODO(sergey): Use proper flag for tagging here. */
+	DAG_id_tag_update(&scene->id, 0);
+
 	DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
 
 	WM_main_add_notifier(NC_SCENE | ND_LAYER | ND_OB_ACTIVE, scene);
@@ -2634,6 +2638,8 @@ LayerCollection * rna_SceneLayer_collection_link(
 	LayerCollection *lc = BKE_collection_link(sl, sc);
 
 	DAG_relations_tag_update(bmain);
+	/* TODO(sergey): Use proper flag for tagging here. */
+	DAG_id_tag_update(id, 0);
 	WM_main_add_notifier(NC_SCENE | ND_LAYER, scene);
 
 	return lc;
@@ -2652,6 +2658,8 @@ static void rna_SceneLayer_collection_unlink(
 	BKE_collection_unlink(sl, lc);
 
 	DAG_relations_tag_update(bmain);
+	/* TODO(sergey): Use proper flag for tagging here. */
+	DAG_id_tag_update(id, 0);
 	WM_main_add_notifier(NC_SCENE | ND_LAYER | ND_OB_ACTIVE, scene);
 }




More information about the Bf-blender-cvs mailing list