code cleanup: BKE_ naming, also make bpy.data.images.load() always load a new image...
[blender.git] / source / blender / editors / space_view3d / view3d_edit.c
index b5354ac5e031a79212eb45b1bda6b25f13474a17..de17f0af1e8964891f7919cc03d97b61724c509f 100644 (file)
@@ -3094,7 +3094,7 @@ static int background_image_add_invoke(bContext *C, wmOperator *op, wmEvent *UNU
                char path[FILE_MAX];
                
                RNA_string_get(op->ptr, "filepath", path);
-               ima = BKE_add_image_file(path);
+               ima = BKE_image_load_exists(path);
        }
        else if (RNA_struct_property_is_set(op->ptr, "name")) {
                RNA_string_get(op->ptr, "name", name);