[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27763] trunk/blender/source/blender/ editors/mesh/editmesh_tools.c: Fix [#20829] "Select Vertex Path" EDGE LENGTH not selecting the proper

Matt Ebb matt at mke3.net
Fri Mar 26 08:17:54 CET 2010


Revision: 27763
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27763
Author:   broken
Date:     2010-03-26 08:17:54 +0100 (Fri, 26 Mar 2010)

Log Message:
-----------
Fix [#20829] "Select Vertex Path" EDGE LENGTH not selecting the proper 
vertices (as it did in 2.49b)

Removed popup and fixed code to actually use the operator properties.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/mesh/editmesh_tools.c

Modified: trunk/blender/source/blender/editors/mesh/editmesh_tools.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_tools.c	2010-03-26 06:10:21 UTC (rev 27762)
+++ trunk/blender/source/blender/editors/mesh/editmesh_tools.c	2010-03-26 07:17:54 UTC (rev 27763)
@@ -86,7 +86,6 @@
 
 /* XXX */
 static void waitcursor(int val) {}
-static int pupmenu() {return 0;}
 #define add_numbut(a, b, c, d, e, f, g) {}
 
 /* XXX */
@@ -5961,17 +5960,15 @@
 	PathNode *currpn;
 	PathNode *Q;
 	int v, *previous, pathvert, pnindex; /*pnindex redundant?*/
-	 int unbalanced, totnodes;
-	short physical;
+	int unbalanced, totnodes;
 	float *cost;
+	int type= RNA_enum_get(op->ptr, "type");
 	Heap *heap; /*binary heap for sorting pointers to PathNodes based upon a 'cost'*/
 
 	s = t = NULL;
 
 	ese = ((EditSelection*)em->selected.last);
-	if(ese && ese->type == EDITVERT && ese->prev && ese->prev->type == EDITVERT){
-		physical= pupmenu("Distance Method? %t|Edge Length%x1|Topological%x0");
-
+	if(ese && ese->type == EDITVERT && ese->prev && ese->prev->type == EDITVERT) {
 		t = (EditVert*)ese->data;
 		s = (EditVert*)ese->prev->data;
 
@@ -6024,7 +6021,7 @@
 
 						newpe = MEM_mallocN(sizeof(PathEdge), "Path Edge");
 						newpe->v = ((PathNode*)eed->v2->tmp.p)->u;
-						if(physical){
+						if (type == PATH_SELECT_EDGE_LENGTH) {
 								newpe->w = len_v3v3(eed->v1->co, eed->v2->co);
 						}
 						else newpe->w = 1;
@@ -6036,7 +6033,7 @@
 						currpn = ((PathNode*)eed->v2->tmp.p);
 						newpe = MEM_mallocN(sizeof(PathEdge), "Path Edge");
 						newpe->v = ((PathNode*)eed->v1->tmp.p)->u;
-						if(physical){
+						if (type == PATH_SELECT_EDGE_LENGTH) {
 								newpe->w = len_v3v3(eed->v1->co, eed->v2->co);
 						}
 						else newpe->w = 1;
@@ -6124,7 +6121,6 @@
 
 	/* api callbacks */
 	ot->exec= select_vertex_path_exec;
-	ot->invoke= WM_menu_invoke;
 	ot->poll= ED_operator_editmesh;
 
 	/* flags */





More information about the Bf-blender-cvs mailing list