diff options
author | Martin Poirier <theeth@yahoo.com> | 2008-07-30 00:20:24 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2008-07-30 00:20:24 +0400 |
commit | 2efd74138c832a2cf8b356ee03f707930068f013 (patch) | |
tree | 39ddc6be32cb12a2bde1c8c65986e6dbb8606391 /source/blender/blenlib | |
parent | c566867de91c66f889c0146ebe24fbbffb21e356 (diff) |
Bug fixes:
Retag subgraphs when merging, to prevent loops
Mark missing up link in multi resolution as NULL
Ignore hidden vertices when propagating weight between islands
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_graph.h | 1 | ||||
-rw-r--r-- | source/blender/blenlib/intern/graph.c | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_graph.h b/source/blender/blenlib/BLI_graph.h index be5d1f5d10c..66cf2a22842 100644 --- a/source/blender/blenlib/BLI_graph.h +++ b/source/blender/blenlib/BLI_graph.h @@ -80,6 +80,7 @@ void BLI_rebuildAdjacencyListForNode(BGraph* rg, BNode *node); void BLI_freeAdjacencyList(BGraph *rg); int BLI_FlagSubgraphs(BGraph *graph); +void BLI_ReflagSubgraph(BGraph *graph, int old_subgraph, int new_subgraph); #define SHAPE_RADIX 10 /* each shape level is encoded this base */ diff --git a/source/blender/blenlib/intern/graph.c b/source/blender/blenlib/intern/graph.c index abdf2969e49..aa899042a58 100644 --- a/source/blender/blenlib/intern/graph.c +++ b/source/blender/blenlib/intern/graph.c @@ -275,6 +275,19 @@ int BLI_FlagSubgraphs(BGraph *graph) return subgraph; } +void BLI_ReflagSubgraph(BGraph *graph, int old_subgraph, int new_subgraph) +{ + BNode *node; + + for (node = graph->nodes.first; node; node = node->next) + { + if (node->flag == old_subgraph) + { + node->flag = new_subgraph; + } + } +} + /*************************************** CYCLE DETECTION ***********************************************/ int detectCycle(BNode *node, BArc *src_arc) |