difference between filepath adn filepath_raw

I want to make a script that changes the images’ path, but I noticed that every image has two filepath. I read here but I don’t understand the difference between them. What do I have to change with the script? the _raw or the not _raw?
http://www.blender.org/documentation/blender_python_api_2_65_release/bpy.types.Image.html#bpy.types.Image.filepath

Thankyou

I didn’t find the difference but I discovered that you have to change the filepath_raw to effectivelly change the image path.

I wrote this litle script to change the drive letter of the images that were on a different drive.
import bpy

for i in bpy.data.images:
    path = i.filepath    
    path_first = path[0]
    
    if path_first == "M":
        new_path = "J" + path[1 : len(path)]
        i.filepath_raw = new_path
        print(path)

Now, to add another function, I want to check what images are missing the file. How could I check this?

here’s the reason for the two filepath props



	prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
	RNA_def_property_string_sdna(prop, NULL, "name");
	RNA_def_property_ui_text(prop, "File Name", "Image/Movie file name");
	RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_reload_update");


	/* eek. this is horrible but needed so we can save to a new name without blanking the data :( */
	prop = RNA_def_property(srna, "filepath_raw", PROP_STRING, PROP_FILEPATH);
	RNA_def_property_string_sdna(prop, NULL, "name");
	RNA_def_property_ui_text(prop, "File Name", "Image/Movie file name (without data refreshing)");



1 Like