[Bf-blender-cvs] [882ccd924ba] blender2.8: Fix T55721: crashes with collections panel in object properties.

Brecht Van Lommel noreply at git.blender.org
Tue Jul 24 11:38:56 CEST 2018


Commit: 882ccd924ba9febaec2db53831d95bc4a6c45ef3
Author: Brecht Van Lommel
Date:   Tue Jul 24 11:37:27 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB882ccd924ba9febaec2db53831d95bc4a6c45ef3

Fix T55721: crashes with collections panel in object properties.

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

M	source/blender/editors/object/object_group.c

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

diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c
index 53cabe3759e..72c5fde2955 100644
--- a/source/blender/editors/object/object_group.c
+++ b/source/blender/editors/object/object_group.c
@@ -411,6 +411,9 @@ static int collection_add_exec(bContext *C, wmOperator *UNUSED(op))
 	id_fake_user_set(&collection->id);
 	BKE_collection_object_add(bmain, collection, ob);
 
+	DEG_id_tag_update(&collection->id, DEG_TAG_COPY_ON_WRITE);
+	DEG_relations_tag_update(bmain);
+
 	WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
 
 	return OPERATOR_FINISHED;
@@ -460,6 +463,9 @@ static int collection_link_exec(bContext *C, wmOperator *op)
 
 	BKE_collection_object_add(bmain, collection, ob);
 
+	DEG_id_tag_update(&collection->id, DEG_TAG_COPY_ON_WRITE);
+	DEG_relations_tag_update(bmain);
+
 	WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
 
 	return OPERATOR_FINISHED;
@@ -500,6 +506,9 @@ static int collection_remove_exec(bContext *C, wmOperator *UNUSED(op))
 
 	BKE_collection_object_remove(bmain, collection, ob, false);
 
+	DEG_id_tag_update(&collection->id, DEG_TAG_COPY_ON_WRITE);
+	DEG_relations_tag_update(bmain);
+
 	WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
 
 	return OPERATOR_FINISHED;
@@ -531,6 +540,8 @@ static int collection_unlink_exec(bContext *C, wmOperator *UNUSED(op))
 
 	BKE_libblock_delete(bmain, collection);
 
+	DEG_relations_tag_update(bmain);
+
 	WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, NULL);
 
 	return OPERATOR_FINISHED;



More information about the Bf-blender-cvs mailing list