[Bf-blender-cvs] [d79e11f] master: Fix image.save() - incorrect relative lib path

Campbell Barton noreply at git.blender.org
Mon Sep 22 04:39:22 CEST 2014


Commit: d79e11fcc86ba045c4ba7ec4ea3ac658fcb8378a
Author: Campbell Barton
Date:   Mon Sep 22 12:38:40 2014 +1000
Branches: master
https://developer.blender.org/rBd79e11fcc86ba045c4ba7ec4ea3ac658fcb8378a

Fix image.save() - incorrect relative lib path

===================================================================

M	source/blender/makesrna/intern/rna_image_api.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index 1fb46c0..d9a59c4 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -115,7 +115,7 @@ static void rna_Image_save(Image *image, bContext *C, ReportList *reports)
 	if (ibuf) {
 		char filename[FILE_MAX];
 		BLI_strncpy(filename, image->name, sizeof(filename));
-		BLI_path_abs(filename, G.main->name);
+		BLI_path_abs(filename, ID_BLEND_PATH(G.main, &image->id));
 
 		if (image->packedfile) {
 			if (writePackedFile(reports, image->name, image->packedfile, 0) != RET_OK) {




More information about the Bf-blender-cvs mailing list