Merge remote-tracking branch 'origin/master' into blender2.8
This commit is contained in:
commit
a9e3ac906e
|
@ -1159,7 +1159,6 @@ bool material_in_material(Material *parmat, Material *mat)
|
|||
bool BKE_object_material_slot_remove(Object *ob)
|
||||
{
|
||||
Material *mao, ***matarar;
|
||||
Object *obt;
|
||||
short *totcolp;
|
||||
short a, actcol;
|
||||
|
||||
|
@ -1207,11 +1206,13 @@ bool BKE_object_material_slot_remove(Object *ob)
|
|||
}
|
||||
|
||||
actcol = ob->actcol;
|
||||
obt = G.main->object.first;
|
||||
while (obt) {
|
||||
|
||||
|
||||
for (Object *obt = G.main->object.first; obt; obt = obt->id.next) {
|
||||
if (obt->data == ob->data) {
|
||||
|
||||
/* Can happen when object material lists are used, see: T52953 */
|
||||
if (actcol > obt->totcol) {
|
||||
continue;
|
||||
}
|
||||
/* WATCH IT: do not use actcol from ob or from obt (can become zero) */
|
||||
mao = obt->mat[actcol - 1];
|
||||
if (mao)
|
||||
|
@ -1231,7 +1232,6 @@ bool BKE_object_material_slot_remove(Object *ob)
|
|||
obt->matbits = NULL;
|
||||
}
|
||||
}
|
||||
obt = obt->id.next;
|
||||
}
|
||||
|
||||
/* check indices from mesh */
|
||||
|
|
|
@ -1485,9 +1485,6 @@ static RenderView *duplicate_render_view(RenderView *rview)
|
|||
if (new_rview->rectf != NULL) {
|
||||
new_rview->rectf = MEM_dupallocN(new_rview->rectf);
|
||||
}
|
||||
if (new_rview->rectf != NULL) {
|
||||
new_rview->rectf = MEM_dupallocN(new_rview->rectf);
|
||||
}
|
||||
if (new_rview->rectz != NULL) {
|
||||
new_rview->rectz = MEM_dupallocN(new_rview->rectz);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue