[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15061] branches/harmonic-skeleton/source/ blender: More and less debug prints

Martin Poirier theeth at yahoo.com
Fri May 30 20:13:43 CEST 2008


Revision: 15061
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15061
Author:   theeth
Date:     2008-05-30 20:13:43 +0200 (Fri, 30 May 2008)

Log Message:
-----------
More and less debug prints

Also, setting the merge limit to be non-zero for armature graphs (since very small yet non-zero differences would prevent merges and correct graph creation)

Modified Paths:
--------------
    branches/harmonic-skeleton/source/blender/blenlib/intern/graph.c
    branches/harmonic-skeleton/source/blender/src/autoarmature.c
    branches/harmonic-skeleton/source/blender/src/reeb.c

Modified: branches/harmonic-skeleton/source/blender/blenlib/intern/graph.c
===================================================================
--- branches/harmonic-skeleton/source/blender/blenlib/intern/graph.c	2008-05-30 17:52:08 UTC (rev 15060)
+++ branches/harmonic-skeleton/source/blender/blenlib/intern/graph.c	2008-05-30 18:13:43 UTC (rev 15061)
@@ -444,6 +444,7 @@
 			{
 				/* swap with smaller */
 				RadialArc tmp;
+				
 				tmp = ring[j + 1];
 				ring[j + 1] = ring[j];
 				ring[j] = tmp;
@@ -454,6 +455,11 @@
 			}
 		}
 	}
+	
+	for (i = 0; i < total; i++)
+	{
+		printf("length %f\n", ring[i].arc->length);
+	}
 
 	/* Dispatch to specific symmetry tests */
 	first = 0;
@@ -588,6 +594,10 @@
 			graph->axial_symmetry(root_node, node1, node2, arc1, arc2);
 		}
 	}
+	else
+	{
+		printf("not symmetric\n");
+	}
 }
 
 static void handleAxialSymmetry(BGraph *graph, BNode *root_node, int depth, float axis[3], float limit)

Modified: branches/harmonic-skeleton/source/blender/src/autoarmature.c
===================================================================
--- branches/harmonic-skeleton/source/blender/src/autoarmature.c	2008-05-30 17:52:08 UTC (rev 15060)
+++ branches/harmonic-skeleton/source/blender/src/autoarmature.c	2008-05-30 18:13:43 UTC (rev 15061)
@@ -470,7 +470,7 @@
 		}
 	}
 	
-	BLI_removeDoubleNodes((BGraph*)rg, 0);
+	BLI_removeDoubleNodes((BGraph*)rg, 0.001);
 	
 	BLI_buildAdjacencyList((BGraph*)rg);
 	
@@ -967,19 +967,19 @@
 			next_earc->symmetry_group == symmetry_group &&
 			next_earc->symmetry_level == symmetry_level)
 		{
-/*
+
 			printf("-----------------------\n");
 			printf("CORRESPONDING ARC FOUND\n");
 			RIG_printArcBones(next_iarc);
 			printf("flag %i -- symmetry level %i -- symmetry flag %i\n", next_earc->flag, next_earc->symmetry_level, next_earc->symmetry_flag);
-*/
+
 			next_earc->flag = 1; // mark as taken
 			next_iarc->link = next_earc;
 			break;
 		}
 	}
 	
-/*
+
 	if (next_iarc->link == NULL)
 	{
 		printf("--------------------------\n");
@@ -996,7 +996,7 @@
 			printf("flag %i -- symmetry level %i -- symmetry flag %i\n", next_earc->flag, next_earc->symmetry_level, next_earc->symmetry_flag);
 		}
 	}
-*/
+
 }
 
 static void retargetSubgraph(RigGraph *rigg, RigArc *start_arc, RigNode *start_node)
@@ -1090,10 +1090,10 @@
 			
 				rigg = armatureToGraph(&list);
 				
+				BLI_markdownSymmetry((BGraph*)rigg, (BNode*)rigg->head, G.scene->toolsettings->skgen_symmetry_limit);
+				
 				printf("Armature graph created\n");
 		
-				BLI_markdownSymmetry((BGraph*)rigg, (BNode*)rigg->head, G.scene->toolsettings->skgen_symmetry_limit);
-				
 				RIG_printGraph(rigg);
 				
 				rigg->link = reebg;

Modified: branches/harmonic-skeleton/source/blender/src/reeb.c
===================================================================
--- branches/harmonic-skeleton/source/blender/src/reeb.c	2008-05-30 17:52:08 UTC (rev 15060)
+++ branches/harmonic-skeleton/source/blender/src/reeb.c	2008-05-30 18:13:43 UTC (rev 15061)
@@ -1082,10 +1082,6 @@
 			
 			arc->angle = avg_angle;
 			
-#ifdef DEBUG_REEB
-			printf("angle %f total %i\n", avg_angle, total);
-#endif
-			
 			if (avg_angle > threshold)
 				merging = 1;
 			





More information about the Bf-blender-cvs mailing list