Fix T62927: Assert when opening default 2.79 startup file in 2.80.

Not sure why that was asserted on instead of handling the flag properly,
if base is not selectable, then just do not select it...

Have the feeling this code handling sync of flags between bases and
objects could use some cleanup, but that will be for another day.
This commit is contained in:
Bastien Montagne 2019-03-25 21:08:27 +01:00
parent e59a2fcc35
commit 82de58b318
Notes: blender-bot 2023-02-14 08:07:50 +01:00
Referenced by issue #62965, Blender 2.80 Close when try weigth paint a simple cube
Referenced by issue #62927, Assert when opening default 2.79 startup file in 2.80
1 changed files with 1 additions and 2 deletions

View File

@ -1735,9 +1735,8 @@ void BKE_scene_object_base_flag_sync_from_object(Base *base)
Object *ob = base->object;
base->flag = ob->flag;
if ((ob->flag & SELECT) != 0) {
if ((ob->flag & SELECT) != 0 && (base->flag & BASE_SELECTABLE) != 0) {
base->flag |= BASE_SELECTED;
BLI_assert((base->flag & BASE_SELECTABLE) != 0);
}
else {
base->flag &= ~BASE_SELECTED;