[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16086] branches/harmonic-skeleton/source/ blender/src/autoarmature.c: starting threading code for retarget
Martin Poirier
theeth at yahoo.com
Wed Aug 13 22:33:57 CEST 2008
Revision: 16086
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16086
Author: theeth
Date: 2008-08-13 22:33:57 +0200 (Wed, 13 Aug 2008)
Log Message:
-----------
starting threading code for retarget
nothing working yet, will finish tomorrow at home
Modified Paths:
--------------
branches/harmonic-skeleton/source/blender/src/autoarmature.c
Modified: branches/harmonic-skeleton/source/blender/src/autoarmature.c
===================================================================
--- branches/harmonic-skeleton/source/blender/src/autoarmature.c 2008-08-13 20:18:56 UTC (rev 16085)
+++ branches/harmonic-skeleton/source/blender/src/autoarmature.c 2008-08-13 20:33:57 UTC (rev 16086)
@@ -52,6 +52,7 @@
#include "BLI_ghash.h"
#include "BLI_graph.h"
#include "BLI_rand.h"
+#include "BLI_threads.h"
#include "BDR_editobject.h"
@@ -92,6 +93,7 @@
ReebGraph *link_mesh;
ListBase controls;
+ ListBase threads;
GHash *bones_map;
@@ -149,6 +151,11 @@
int flag;
} RigControl;
+typedef struct RetargetParam {
+ RigGraph *rigg;
+ RigArc *iarc;
+} RetargetParam;
+
typedef enum
{
RETARGET_LENGTH,
@@ -163,6 +170,8 @@
/*******************************************************************************************************/
+void *exec_retargetArctoArc(void *param);
+
static void RIG_calculateEdgeAngle(RigEdge *edge_first, RigEdge *edge_second);
/* two levels */
@@ -249,6 +258,8 @@
rg->free_arc = RIG_freeRigArc;
rg->free_node = NULL;
+ BLI_init_threads(&rg->threads, exec_retargetArctoArc, 2); /* fix number of threads */
+
return rg;
}
@@ -1551,6 +1562,19 @@
}
}
+void *exec_retargetArctoArc(void *param)
+{
+ RetargetParam *p = (RetargetParam*)param;
+ retargetArctoArc(p->rigg, p->iarc);
+ MEM_freeN(param);
+
+ return NULL;
+}
+
+void thread_retargetArctoArc(RigGraph *rigg, RigArc *iarc)
+{
+}
+
static void matchMultiResolutionNode(RigNode *inode, ReebNode *top_node)
{
ReebNode *enode;
More information about the Bf-blender-cvs
mailing list