Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2010-03-26 10:17:54 +0300
committerMatt Ebb <matt@mke3.net>2010-03-26 10:17:54 +0300
commited035bca5a80f5088766947cb87c404df453e449 (patch)
treebd953f2d145a430ae52ef2ca5965bb7c86225e74 /source/blender/editors/mesh/editmesh_tools.c
parent38141895e959739b5a0100ebba3b4fd451da01bb (diff)
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.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_tools.c')
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index a4a25a6ad52..2a20c86744d 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -86,7 +86,6 @@ editmesh_tool.c: UI called tools for editmesh, geometry changes here, otherwise
/* 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 @@ static int select_vertex_path_exec(bContext *C, wmOperator *op)
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 @@ static int select_vertex_path_exec(bContext *C, wmOperator *op)
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 @@ static int select_vertex_path_exec(bContext *C, wmOperator *op)
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 @@ void MESH_OT_select_vertex_path(wmOperatorType *ot)
/* api callbacks */
ot->exec= select_vertex_path_exec;
- ot->invoke= WM_menu_invoke;
ot->poll= ED_operator_editmesh;
/* flags */