diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-29 16:49:21 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-29 16:49:21 +0300 |
commit | f7af08b5feecd89ea32c8905de1e61d575ff4bf1 (patch) | |
tree | b23f8e58157285ce3c6287f664f66bfcba85a69d /source/blender/collada | |
parent | c72a204001ae32ab082af66b373ce19b64e28e2d (diff) |
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...
Diffstat (limited to 'source/blender/collada')
-rw-r--r-- | source/blender/collada/MeshImporter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp index da85038bf90..cd73742a2d6 100644 --- a/source/blender/collada/MeshImporter.cpp +++ b/source/blender/collada/MeshImporter.cpp @@ -1077,7 +1077,7 @@ MTFace *MeshImporter::assign_material_to_geom(COLLADAFW::MaterialBinding cmateri // Attention! This temporaly assigns material to object on purpose! // See note above. ob->actcol=0; - assign_material(ob, ma, mat_index + 1, BKE_MAT_ASSIGN_OBJECT); + assign_material(G.main, ob, ma, mat_index + 1, BKE_MAT_ASSIGN_OBJECT); COLLADAFW::TextureCoordinateBindingArray& tex_array = cmaterial.getTextureCoordinateBindingArray(); @@ -1172,7 +1172,7 @@ Object *MeshImporter::create_mesh_object(COLLADAFW::Node *node, COLLADAFW::Insta Mesh *old_mesh = (Mesh *)ob->data; Mesh *new_mesh = uid_mesh_map[*geom_uid]; - BKE_mesh_assign_object(ob, new_mesh); + BKE_mesh_assign_object(G.main, ob, new_mesh); BKE_mesh_calc_normals(new_mesh); id_us_plus(&old_mesh->id); /* Because BKE_mesh_assign_object would have already decreased it... */ |