[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15510] branches/harmonic-skeleton/source/ blender: Multi resolution retargetting.
Martin Poirier
theeth at yahoo.com
Wed Jul 9 21:44:40 CEST 2008
Revision: 15510
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15510
Author: theeth
Date: 2008-07-09 21:44:40 +0200 (Wed, 09 Jul 2008)
Log Message:
-----------
Multi resolution retargetting. Go back to lowest level on shared nodes.
Modified Paths:
--------------
branches/harmonic-skeleton/source/blender/include/reeb.h
branches/harmonic-skeleton/source/blender/src/autoarmature.c
branches/harmonic-skeleton/source/blender/src/reeb.c
Modified: branches/harmonic-skeleton/source/blender/include/reeb.h
===================================================================
--- branches/harmonic-skeleton/source/blender/include/reeb.h 2008-07-09 19:43:09 UTC (rev 15509)
+++ branches/harmonic-skeleton/source/blender/include/reeb.h 2008-07-09 19:44:40 UTC (rev 15510)
@@ -166,8 +166,8 @@
void BIF_GlobalReebFree(void);
ReebNode *BIF_otherNodeFromIndex(ReebArc *arc, ReebNode *node);
+ReebNode *BIF_lowestLevelNode(ReebNode *node);
-
void REEB_freeGraph(ReebGraph *rg);
void REEB_exportGraph(ReebGraph *rg, int count);
void REEB_draw();
Modified: branches/harmonic-skeleton/source/blender/src/autoarmature.c
===================================================================
--- branches/harmonic-skeleton/source/blender/src/autoarmature.c 2008-07-09 19:43:09 UTC (rev 15509)
+++ branches/harmonic-skeleton/source/blender/src/autoarmature.c 2008-07-09 19:44:40 UTC (rev 15510)
@@ -1249,6 +1249,8 @@
while (ishape > eshape && next_earc->link_up)
{
+ next_earc->flag = 1; // mark previous as taken, to prevent backtrack on lower levels
+
next_earc = next_earc->link_up;
enode = next_earc->head;
eshape = BLI_subtreeShape((BNode*)enode, (BArc*)next_earc, 1) % MAGIC_NUMBER;
@@ -1320,7 +1322,10 @@
enode = BIF_otherNodeFromIndex(earc, enode);
inode = (RigNode*)BLI_otherNode((BArc*)iarc, (BNode*)inode);
- inode->link_mesh = enode;
+ /* Link with lowest possible node
+ * Enabling going back to lower levels for each arc
+ * */
+ inode->link_mesh = BIF_lowestLevelNode(enode);
for(i = 0; i < inode->degree; i++)
{
Modified: branches/harmonic-skeleton/source/blender/src/reeb.c
===================================================================
--- branches/harmonic-skeleton/source/blender/src/reeb.c 2008-07-09 19:43:09 UTC (rev 15509)
+++ branches/harmonic-skeleton/source/blender/src/reeb.c 2008-07-09 19:44:40 UTC (rev 15510)
@@ -243,6 +243,16 @@
return (arc->head->index == node->index) ? arc->tail : arc->head;
}
+ReebNode *BIF_lowestLevelNode(ReebNode *node)
+{
+ while (node->link_down)
+ {
+ node = node->link_down;
+ }
+
+ return node;
+}
+
ReebArc * copyArc(ReebGraph *rg, ReebArc *arc)
{
ReebArc *cp_arc;
More information about the Bf-blender-cvs
mailing list