[Bf-blender-cvs] [e810e8b] bake-cycles: Cycles-Bake: remove the spurious prints from Cycles

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


Commit: e810e8b99c5472df8c1ddee6a0e1469177a7ad20
Author: Dalai Felinto
Date:   Tue Jan 14 10:35:26 2014 -0200
https://developer.blender.org/rBe810e8b99c5472df8c1ddee6a0e1469177a7ad20

Cycles-Bake: remove the spurious prints from Cycles

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

M	intern/cycles/blender/blender_session.cpp

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

diff --git a/intern/cycles/blender/blender_session.cpp b/intern/cycles/blender/blender_session.cpp
index c08661d..ea0af5e 100644
--- a/intern/cycles/blender/blender_session.cpp
+++ b/intern/cycles/blender/blender_session.cpp
@@ -438,41 +438,12 @@ void BlenderSession::render()
 
 void BlenderSession::bake(BL::Object b_object, const string& pass_type, BakePixel *pixel_array, int num_pixels, int depth, float result[])
 {
-
-	printf("Baking inside Cycles\n");
-	printf("passes: %s\n", pass_type.c_str());
-	printf("num_pixels: %d\ndepth: %d\n", num_pixels, depth);
-
-#if 1
-	{
-		/* so far so good, although in the real implementation result will be zero'ed */
-		int i = 0;
-		printf("\n<bakepixel>\n\n");
-		for (i=0;i < num_pixels; i++) {
-			if (pixel_array[i].primitive_id == -1)
-				continue;
-
-			printf("\nprimitive_id: %d\n", pixel_array[i].primitive_id);
-			printf("u: %4.2f\n", pixel_array[i].u);
-			printf("v: %4.2f\n", pixel_array[i].v);
-
-			result[i] = pixel_array[i].u + pixel_array[i].v;
-		}
-		printf("\n</bakepixel>\n\n");
-	}
-#endif
-
-#if 0
-	{
-		/* so far so good, although in the real implementation result will be zero'ed */
-		int i = 0;
-		printf("\n<result>\n\n");
-		for (i=0;i < num_pixels; i++) {
-			printf("%4.2f\n", result[i]);
-		}
-		printf("\n</result>\n\n");
+	/* just plots the internal uv back to the results for now */
+	for (int i=0; i < num_pixels; i++) {
+		int offset = i * depth;
+		result[offset] = pixel_array[i].u;
+		result[offset + 1] = pixel_array[i].v;
 	}
-#endif
 }
 
 void BlenderSession::do_write_update_render_result(BL::RenderResult b_rr, BL::RenderLayer b_rlay, RenderTile& rtile, bool do_update_only)




More information about the Bf-blender-cvs mailing list