diff options
author | Martin Poirier <theeth@yahoo.com> | 2008-07-06 02:01:46 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2008-07-06 02:01:46 +0400 |
commit | de286af3f1f8fa42aaaaed6c0214531ed3cc6114 (patch) | |
tree | 1cd69374dc9e5c177854de79965ca82397c737b6 /source/blender/blenlib/intern/graph.c | |
parent | 44e13eb8d556796df7380c3eb5b5b7f850e87287 (diff) |
Filter according to arc length, not weight different (more logic physical filtering)
Diffstat (limited to 'source/blender/blenlib/intern/graph.c')
-rw-r--r-- | source/blender/blenlib/intern/graph.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/graph.c b/source/blender/blenlib/intern/graph.c index 8c7e8ce8cd6..1371e59a77a 100644 --- a/source/blender/blenlib/intern/graph.c +++ b/source/blender/blenlib/intern/graph.c @@ -53,6 +53,12 @@ void BLI_freeNode(BGraph *graph, BNode *node) } } +void BLI_removeNode(BGraph *graph, BNode *node) +{ + BLI_freeNode(graph, node); + BLI_freelinkN(&graph->nodes, node); +} + BNode *BLI_otherNode(BArc *arc, BNode *node) { return (arc->head == node) ? arc->tail : arc->head; @@ -194,8 +200,7 @@ void BLI_removeDoubleNodes(BGraph *graph, float limit) { BLI_replaceNode(graph, node_src, node_replaced); - BLI_freeNode(graph, node_replaced); - BLI_freelinkN(&graph->nodes, node_replaced); + BLI_removeNode(graph, node_replaced); } } } |