Revision: 39542
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39542
Author:   dan_w
Date:     2011-08-19 08:06:36 +0000 (Fri, 19 Aug 2011)
Log Message:
-----------
commit to retopo build tool, added more framework and starting point for screen 
point projection

Modified Paths:
--------------
    
branches/soc-2011-avocado/blender/source/blender/editors/mesh/editbmesh_add.c

Modified: 
branches/soc-2011-avocado/blender/source/blender/editors/mesh/editbmesh_add.c
===================================================================
--- 
branches/soc-2011-avocado/blender/source/blender/editors/mesh/editbmesh_add.c   
    2011-08-19 00:03:39 UTC (rev 39541)
+++ 
branches/soc-2011-avocado/blender/source/blender/editors/mesh/editbmesh_add.c   
    2011-08-19 08:06:36 UTC (rev 39542)
@@ -645,18 +645,45 @@
        ED_object_add_generic_props(ot, TRUE);
 }
 
+struct retopo_vertex
+{
+       float x, y, z;
+}g_retopo_build_verticies[128];
+int g_retopo_build_verticies_count;
 
 int ED_object_retopo_build_invoke(bContext *C, wmOperator *op, wmEvent 
*UNUSED(event))
 {
+       /*
+       for(int i = 0; i < 128; i++)
+       {
+               g_retopo_build_verticies[i].x = 0;
+               g_retopo_build_verticies[i].y = 0;
+               g_retopo_build_verticies[i].z = 0;
+       }
+       g_retopo_build_verticies_count;
+*/
        WM_event_add_modal_handler(C, op);
        return OPERATOR_RUNNING_MODAL;
 }
 
 static int ED_object_retopo_build_modal (bContext *C, wmOperator *op, wmEvent 
*event)
 {
+       ViewContext vc;
+       float nor[3]= {0.0, 0.0, 0.0};
+       em_setup_viewcontext(C, &vc);
        if(event->type==LEFTMOUSE && event->val==KM_PRESS)
        {
-               //
+               nor[0] = (float)event->x;
+               nor[1] = (float)event->y;
+
+               // get world space coords of mouseclick
+               mul_mat3_m4_v3(vc.rv3d->viewinv, nor);
+
+               // on condition of clicking on first vertex or right clicking
+               {
+                       // build bmesh
+                       // call bmesh op, supplying coordinate data
+               }
        }
        return 0;
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to