Cleanup: Get rid of G.main in BKE_material.

Note that in some cases, this only moves the G.main case to somne other
places - in particular, RNA getters/setters are becoming annoying here...
This commit is contained in:
2018-05-29 15:49:21 +02:00
parent c72a204001
commit f7af08b5fe
17 changed files with 87 additions and 83 deletions

View File

@@ -880,7 +880,7 @@ Mesh *BKE_mesh_from_object(Object *ob)
else return NULL;
}
void BKE_mesh_assign_object(Object *ob, Mesh *me)
void BKE_mesh_assign_object(Main *bmain, Object *ob, Mesh *me)
{
Mesh *old = NULL;
@@ -896,7 +896,7 @@ void BKE_mesh_assign_object(Object *ob, Mesh *me)
id_us_plus((ID *)me);
}
test_object_materials(ob, (ID *)me);
test_object_materials(bmain, ob, (ID *)me);
test_object_modifiers(ob);
}