[Bf-blender-cvs] [fbff09bf7ad] blender2.8: Depsgraph: Synchronize selection from original scene to copied-on-write one

Sergey Sharybin noreply at git.blender.org
Mon Jun 19 13:33:17 CEST 2017


Commit: fbff09bf7ad6a907544ab423a9b7952df598c21f
Author: Sergey Sharybin
Date:   Mon Jun 19 12:36:34 2017 +0200
Branches: blender2.8
https://developer.blender.org/rBfbff09bf7ad6a907544ab423a9b7952df598c21f

Depsgraph: Synchronize selection from original scene to copied-on-write one

This makes it possible to select objects in the viewport.

Selection in edit mode is still tricky, mainly because currently such update
would require tagging batch as updated, which is not possible with using just
and original object because it will never have batch.

Possible solution here would be to introduce some "batch" or "render" component
to depsgraph ID node for objects, so we can tag batch for update via depsgraph
tagging API.

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

M	source/blender/editors/space_view3d/space_view3d.c

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

diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 41851d8d358..b3ac62e9885 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -878,10 +878,12 @@ static void view3d_main_region_listener(
 					}
 					ED_region_tag_redraw(ar);
 					break;
-				case ND_FRAME:
-				case ND_TRANSFORM:
 				case ND_OB_ACTIVE:
 				case ND_OB_SELECT:
+					DEG_id_tag_update((ID *)&scene->id, DEG_TAG_COPY_ON_WRITE);
+					ATTR_FALLTHROUGH;
+				case ND_FRAME:
+				case ND_TRANSFORM:
 				case ND_OB_VISIBLE:
 				case ND_RENDER_OPTIONS:
 				case ND_MARKERS:




More information about the Bf-blender-cvs mailing list