diff options
author | Martin Poirier <theeth@yahoo.com> | 2008-08-14 00:33:57 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2008-08-14 00:33:57 +0400 |
commit | 715ca7cbf6d4b6b26a3ecf65de24bda64b1f1709 (patch) | |
tree | a2129ff52b0116b649c2648ca08c349588b30fe6 | |
parent | b30a925447f5c0b0256d99e30e4062e7aa19b064 (diff) |
starting threading code for retarget
nothing working yet, will finish tomorrow at home
-rw-r--r-- | source/blender/src/autoarmature.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source/blender/src/autoarmature.c b/source/blender/src/autoarmature.c index e7cd771b1b1..e6bd97f58a5 100644 --- a/source/blender/src/autoarmature.c +++ b/source/blender/src/autoarmature.c @@ -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 @@ typedef struct RigGraph { ReebGraph *link_mesh; ListBase controls; + ListBase threads; GHash *bones_map; @@ -149,6 +151,11 @@ typedef struct RigControl { int flag; } RigControl; +typedef struct RetargetParam { + RigGraph *rigg; + RigArc *iarc; +} RetargetParam; + typedef enum { RETARGET_LENGTH, @@ -163,6 +170,8 @@ typedef enum /*******************************************************************************************************/ +void *exec_retargetArctoArc(void *param); + static void RIG_calculateEdgeAngle(RigEdge *edge_first, RigEdge *edge_second); /* two levels */ @@ -249,6 +258,8 @@ static RigGraph *newRigGraph() 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 @@ static void retargetArctoArc(RigGraph *rigg, RigArc *iarc) } } +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; |