Merge branch 'master' into blender2.8

This commit is contained in:
Bastien Montagne 2018-08-14 14:10:47 +02:00
commit 1b53838548
2 changed files with 9 additions and 0 deletions

View File

@ -1246,6 +1246,12 @@ void BKE_object_copy_data(Main *bmain, Object *ob_dst, const Object *ob_src, con
ob_dst->matbits = MEM_dupallocN(ob_src->matbits);
ob_dst->totcol = ob_src->totcol;
}
else if (ob_dst->mat != NULL || ob_dst->matbits != NULL) {
/* This shall not be needed, but better be safe than sorry. */
BLI_assert(!"Object copy: non-NULL material pointers with zero counter, should not happen.");
ob_dst->mat = NULL;
ob_dst->matbits = NULL;
}
if (ob_src->iuser) ob_dst->iuser = MEM_dupallocN(ob_src->iuser);

View File

@ -2098,6 +2098,9 @@ static int convert_exec(bContext *C, wmOperator *op)
continue;
}
/* Ensure new object has consistent material data with its new obdata. */
test_object_materials(bmain, newob, newob->data);
/* tag obdata if it was been changed */
/* If the original object is active then make this object active */