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)
This commit is contained in:
Martin Poirier
2008-05-30 18:13:43 +00:00
parent 08750f66a4
commit 42740a1442
3 changed files with 17 additions and 11 deletions

View File

@@ -444,6 +444,7 @@ static void handleRadialSymmetry(BGraph *graph, BNode *root_node, int depth, flo
{
/* swap with smaller */
RadialArc tmp;
tmp = ring[j + 1];
ring[j + 1] = ring[j];
ring[j] = tmp;
@@ -454,6 +455,11 @@ static void handleRadialSymmetry(BGraph *graph, BNode *root_node, int depth, flo
}
}
}
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 @@ static void testAxialSymmetry(BGraph *graph, BNode* root_node, BNode* node1, BNo
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)

View File

@@ -470,7 +470,7 @@ static RigGraph *armatureToGraph(ListBase *list)
}
}
BLI_removeDoubleNodes((BGraph*)rg, 0);
BLI_removeDoubleNodes((BGraph*)rg, 0.001);
BLI_buildAdjacencyList((BGraph*)rg);
@@ -967,19 +967,19 @@ static void findCorrespondingArc(RigArc *start_arc, RigNode *start_node, RigArc
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 @@ static void findCorrespondingArc(RigArc *start_arc, RigNode *start_node, RigArc
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 @@ void BIF_retargetArmature()
rigg = armatureToGraph(&list);
printf("Armature graph created\n");
BLI_markdownSymmetry((BGraph*)rigg, (BNode*)rigg->head, G.scene->toolsettings->skgen_symmetry_limit);
printf("Armature graph created\n");
RIG_printGraph(rigg);
rigg->link = reebg;

View File

@@ -1082,10 +1082,6 @@ int filterSmartReebGraph(ReebGraph *rg, float threshold)
arc->angle = avg_angle;
#ifdef DEBUG_REEB
printf("angle %f total %i\n", avg_angle, total);
#endif
if (avg_angle > threshold)
merging = 1;