[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59433] branches/ soc-2013-meshdata_transfer/source/blender/bmesh/tools/bmesh_data_transfer.c : code rewrite: the interface
Walid Shouman
eng.walidshouman at gmail.com
Fri Aug 23 18:52:25 CEST 2013
Revision: 59433
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59433
Author: walid
Date: 2013-08-23 16:52:24 +0000 (Fri, 23 Aug 2013)
Log Message:
-----------
code rewrite: the interface
Modified Paths:
--------------
branches/soc-2013-meshdata_transfer/source/blender/bmesh/tools/bmesh_data_transfer.c
Modified: branches/soc-2013-meshdata_transfer/source/blender/bmesh/tools/bmesh_data_transfer.c
===================================================================
--- branches/soc-2013-meshdata_transfer/source/blender/bmesh/tools/bmesh_data_transfer.c 2013-08-23 15:55:06 UTC (rev 59432)
+++ branches/soc-2013-meshdata_transfer/source/blender/bmesh/tools/bmesh_data_transfer.c 2013-08-23 16:52:24 UTC (rev 59433)
@@ -3415,3 +3415,133 @@
}
}
+//******************
+//----------------------*
+//---------------------------*
+//Code rewrite starts!------------*
+//---------------------------*
+//----------------------*
+//******************
+bool BM_mesh_data_copy2(bool UNUSED_dummy);
+bool BM_mesh_multi_layer_copy2(bool UNUSED_dummy);
+bool BM_mesh_data_copy2(bool UNUSED(dummy))
+{
+//+-------------+
+//| |
+//| Block 1 | //get a tree for the source (using BKE_bmbvh_new)
+//| |
+//+-------------+
+
+
+
+//+-------------+
+//| |
+//| Block 2 | //make any needed initial allocations
+//| |
+//+-------------+
+
+
+
+
+//+-------------+
+//| |
+//| Block 3 | //loop over each destination face
+//| Big-one |
+//+-------------+
+
+ //transfer by indices (3.0)
+ // |
+ // |
+ // V
+
+ //+-----------------+
+ //| sub_Block 3.0.1 | //get each loop's/vert's value
+ //+-----------------+
+
+ //+-----------------+
+ //| sub_Block 3.0.2 | //Call the respective transfer function for all the layers with the loops/verts values
+ //+-----------------+
+
+
+ //transfer by interpolation (3.1)
+ // |
+ // |
+ // V
+
+
+ //+-----------------+
+ //| sub_Block 3.1 | //get the best matching source face (using BKE_bmbvh_find_face_closest)
+ //+-----------------+
+
+
+ //we got a face (3.1.a)
+ // |
+ // |
+ // V
+
+ //+---------------------+
+ //| sub_Block 3.1.a.1 | //updating the lookup tables
+ //+---------------------+
+
+ //+---------------------+
+ //| sub_Block 3.1.a.2 | //Interpolate and get the weights
+ //+---------------------+
+
+ //+---------------------+
+ //| sub_Block 3.1.a.3 | //Call the respective transfer function for all the layers with the transfer weights and any optional look up tables
+ //+---------------------+
+
+
+ //we didn't get a face (3.1.b)
+ // |
+ // |
+ // V
+
+ //+---------------------+
+ //| sub_Block 3.1.b.0 | //update the lookup tables
+ //+---------------------+
+return true;
+}
+
+bool BM_mesh_multi_layer_copy2(bool UNUSED(dummy))
+{
+
+
+//+-------------+
+//| |
+//| Block 1 | //Switch over the copy method ... either by index or interpolate
+//| |
+//+-------------+
+
+
+ //transfer by indices (1.0)
+ // |
+ // |
+ // V
+
+ //+-----------------+
+ //| sub_Block 1.0.a | //paste into each loop's/vert's value
+ //+-----------------+
+
+
+
+
+ //transfer by interpolation (1.1)
+ // |
+ // |
+ // V
+
+ //+-----------------+
+ //| sub_Block 1.1.a | //loop over each destination face
+ //+-----------------+
+
+ //+---------------------+
+ //| sub_Block 1.1.a.1 | //paste the (weights * source data) into the destination
+ //+---------------------+
+
+ //+---------------------+
+ //| sub_Block 1.1.a.2 | //make any needed post processing that is data type dependent
+ //+---------------------+ //ie: average for the vert values in the shapekeys .. connect faces in the UV transfer
+
+return true;
+}
More information about the Bf-blender-cvs
mailing list