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:
authorCampbell Barton <ideasman42@gmail.com>2010-01-16 01:40:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-16 01:40:33 +0300
commit5272991e8b91c527fbe3923d75ae2c5148dd7177 (patch)
tree84c871abe7d084a775ff7ffab5033c08d085ed32 /source/blender/editors/mesh
parent2b3a6b38b764717878de39a97feeee186e3694ad (diff)
generic operator menu was searching for "type" and using the first enum property if it wasnt found.
this is too arbitrary and could break if roperty order is changed. store the property in the operator type that is to be used for menu and enum search func's. python function for searching operator enums on invoke. (just need dynamic python enums now) wm.invoke_search_popup(self)
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh.c2
-rw-r--r--source/blender/editors/mesh/editmesh_mods.c1
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c3
3 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c
index a286c0ad8e8..cdd5cee881f 100644
--- a/source/blender/editors/mesh/editmesh.c
+++ b/source/blender/editors/mesh/editmesh.c
@@ -1504,7 +1504,7 @@ void MESH_OT_separate(wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_enum(ot->srna, "type", prop_separate_types, 0, "Type", "");
+ ot->prop= RNA_def_enum(ot->srna, "type", prop_separate_types, 0, "Type", "");
}
diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c
index 412a733dee0..d73ce1a1214 100644
--- a/source/blender/editors/mesh/editmesh_mods.c
+++ b/source/blender/editors/mesh/editmesh_mods.c
@@ -1304,6 +1304,7 @@ void MESH_OT_select_similar(wmOperatorType *ot)
/* properties */
prop= RNA_def_enum(ot->srna, "type", prop_similar_types, SIMVERT_NORMAL, "Type", "");
RNA_def_enum_funcs(prop, select_similar_type_itemf);
+ ot->prop= prop;
}
/* ******************************************* */
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index e41d60783fe..92b4800ccfd 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -5881,6 +5881,7 @@ void MESH_OT_merge(wmOperatorType *ot)
/* properties */
prop= RNA_def_enum(ot->srna, "type", merge_type_items, 3, "Type", "Merge method to use.");
RNA_def_enum_funcs(prop, merge_type_itemf);
+ ot->prop= prop;
RNA_def_boolean(ot->srna, "uvs", 0, "UVs", "Move UVs according to merge.");
}
@@ -6082,7 +6083,7 @@ void MESH_OT_select_vertex_path(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_enum(ot->srna, "type", type_items, PATH_SELECT_EDGE_LENGTH, "Type", "Method to compute distance.");
+ ot->prop= RNA_def_enum(ot->srna, "type", type_items, PATH_SELECT_EDGE_LENGTH, "Type", "Method to compute distance.");
}
/********************** Region/Loop Operators *************************/