[Bf-blender-cvs] [e60ca39] bake-cycles: Cycles-Bake: report back successful baking and free mem

Dalai Felinto noreply at git.blender.org
Wed Apr 23 02:46:34 CEST 2014


Commit: e60ca392e1df0443a9c0aca004d0d633c7b6f5a2
Author: Dalai Felinto
Date:   Tue Jan 14 21:00:34 2014 -0200
https://developer.blender.org/rBe60ca392e1df0443a9c0aca004d0d633c7b6f5a2

Cycles-Bake: report back successful baking and free mem

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

M	source/blender/editors/object/object_bake_new.c

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

diff --git a/source/blender/editors/object/object_bake_new.c b/source/blender/editors/object/object_bake_new.c
index df2e514..5fde4a5 100644
--- a/source/blender/editors/object/object_bake_new.c
+++ b/source/blender/editors/object/object_bake_new.c
@@ -156,7 +156,7 @@ static bool write_external_bake_pixels(const char *filepath, float *buffer, cons
 #ifndef WIN32
 		chmod(filepath, S_IRUSR | S_IWUSR);
 #endif
-		printf("%s saving bake map: '%s'\n", __func__, filepath);
+		//printf("%s saving bake map: '%s'\n", __func__, filepath);
 	}
 
 	/* garbage collection */
@@ -254,9 +254,15 @@ static int bake_exec(bContext *C, wmOperator *op)
 				error = BLI_sprintfN("Problem saving baked map in \"%s\".", filepath);
 
 				BKE_report(op->reports, RPT_ERROR, error);
+				MEM_freeN(error);
 				op_result = OPERATOR_CANCELLED;
 			}
 			else {
+				char *msg = NULL;
+				msg = BLI_sprintfN("Baking map written to \"%s\".", filepath);
+
+				BKE_report(op->reports, RPT_INFO, msg);
+				MEM_freeN(msg);
 				op_result = OPERATOR_FINISHED;
 			}
 		}




More information about the Bf-blender-cvs mailing list