code cleanup: BKE_ naming, also make bpy.data.images.load() always load a new image...
[blender.git] / source / blender / editors / space_node / node_edit.c
index 746fa9e34d725deffbf9977e8f1ea8fd8ba26cb3..d47a1d557ab7f7ad605b0b86c38ee6a428a3145f 100644 (file)
@@ -3408,7 +3408,7 @@ static int node_add_file_exec(bContext *C, wmOperator *op)
 
                errno= 0;
 
-               ima= BKE_add_image_file(path);
+               ima= BKE_image_load_exists(path);
 
                if (!ima) {
                        BKE_reportf(op->reports, RPT_ERROR, "Can't read: \"%s\", %s", path, errno ? strerror(errno) : "Unsupported image format");