[Bf-blender-cvs] [cb490561d3] blender2.8: Layers: set active object in doversion for all render layers

Dalai Felinto noreply at git.blender.org
Thu Feb 9 15:57:19 CET 2017


Commit: cb490561d3a7db02d612800a1610c79f2e4eccaa
Author: Dalai Felinto
Date:   Thu Feb 9 15:57:06 2017 +0100
Branches: blender2.8
https://developer.blender.org/rBcb490561d3a7db02d612800a1610c79f2e4eccaa

Layers: set active object in doversion for all render layers

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

M	source/blender/blenloader/intern/versioning_280.c

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

diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 72859b0b94..432d8be0a6 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -69,7 +69,7 @@ void do_versions_after_linking_280(Main *main)
 					is_visible[i] = (scene->lay & (1 << i));
 				}
 
-				for (BaseLegacy *base = scene->base.first; base; base = base->next) {
+				for (Base *base = scene->base.first; base; base = base->next) {
 					lay_used |= base->lay & ((1 << 20) - 1); /* ignore localview */
 
 					for (int i = 0; i < 20; i++) {
@@ -108,6 +108,11 @@ void do_versions_after_linking_280(Main *main)
 							}
 						}
 
+						/* for convenience set the same active object in all the layers */
+						if (scene->basact) {
+							sl->basact = BKE_scene_layer_base_find(sl, scene->basact->object);
+						}
+
 						/* TODO: passes, samples, mask_layesr, exclude, ... */
 					}
 
@@ -136,7 +141,7 @@ void do_versions_after_linking_280(Main *main)
 				}
 
 				/* convert selected bases */
-				for (BaseLegacy *base = scene->base.first; base; base = base->next) {
+				for (Base *base = scene->base.first; base; base = base->next) {
 					Base *ob_base = BKE_scene_layer_base_find(sl, base->object);
 					if ((base->flag & SELECT) != 0) {
 						if ((ob_base->flag & BASE_SELECTABLED) != 0) {
@@ -158,7 +163,7 @@ void do_versions_after_linking_280(Main *main)
 				}
 
 				/* remove bases once and for all */
-				for (BaseLegacy *base = scene->base.first; base; base = base->next) {
+				for (Base *base = scene->base.first; base; base = base->next) {
 					id_us_min(&base->object->id);
 				}
 				BLI_freelistN(&scene->base);




More information about the Bf-blender-cvs mailing list