Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2017-06-16 19:12:20 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-06-16 19:12:22 +0300
commit946bc4d3c1da45b11f7da045074bb297d45487cd (patch)
tree36cafeb712f799ddc4d45990d85c08a4a479fb0e /source/blender/blenloader
parent24ec761bb41402214293c68591fdaeed7393b607 (diff)
Fix object selection doversion issue since Workspace
Workspace commit (7f564d74f9edaaa41ce27c6e854869096f70b4da) made selection to not be carried away from 2.7x files into 2.8.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_280.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index e9146ba86dd..97df428ee22 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -172,6 +172,13 @@ void do_versions_after_linking_280(Main *main)
BKE_collection_object_add(scene, collections[i], base->object);
}
}
+
+ if (base->flag & SELECT) {
+ base->object->flag |= SELECT;
+ }
+ else {
+ base->object->flag &= ~SELECT;
+ }
}
scene->active_layer = 0;
@@ -208,6 +215,12 @@ void do_versions_after_linking_280(Main *main)
sl->basact = BKE_scene_layer_base_find(sl, scene->basact->object);
}
+ for (Base *base = sl->object_bases.first; base; base = base->next) {
+ if ((base->flag & BASE_SELECTABLED) && (base->object->flag & SELECT)) {
+ base->flag |= BASE_SELECTED;
+ }
+ }
+
/* TODO: passes, samples, mask_layesr, exclude, ... */
}
@@ -234,18 +247,12 @@ void do_versions_after_linking_280(Main *main)
/* convert selected bases */
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) {
- ob_base->flag |= BASE_SELECTED;
- }
- }
- else {
- ob_base->flag &= ~BASE_SELECTED;
+ if ((base->flag & BASE_SELECTABLED) && (base->object->flag & SELECT)) {
+ base->flag |= BASE_SELECTED;
}
/* keep lay around for forward compatibility (open those files in 2.79) */
- ob_base->lay = base->lay;
+ base->lay = base->object->lay;
}
/* TODO: copy scene render data to layer */