code cleanup: BKE_ naming, also make bpy.data.images.load() always load a new image...
[blender.git] / source / blender / collada / DocumentImporter.cpp
index 3976d8115c19674007447429b8810bd21472ab84..98a30fbef7483599196c48a4aea39cc82857100f 100644 (file)
@@ -921,7 +921,7 @@ bool DocumentImporter::writeImage( const COLLADAFW::Image* image )
        
        BLI_split_dir_part(filename, dir, sizeof(dir));
        BLI_join_dirfile(full_path, sizeof(full_path), dir, filepath.c_str());
-       Image *ima = BKE_add_image_file(full_path);
+       Image *ima = BKE_image_load_exists(full_path);
        if (!ima) {
                fprintf(stderr, "Cannot create image.\n");
                return true;