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:
authorBastien Montagne <montagne29@wanadoo.fr>2012-05-17 14:42:24 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2012-05-17 14:42:24 +0400
commiteb57856a19127f8867974470dfbfb7524740cd70 (patch)
treeb0813cc9baba32f458c36fb0480f7a585e02b362
parentdde529e97757d3cf7bab2e6dce20b7fddbd968cf (diff)
Fix select_similar_type_itemf() enum-item-generator func to return the whole prop_similar_types when context is NULL (needed at least by i18n tools!).
-rw-r--r--source/blender/editors/mesh/editmesh_select.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index f1393e4def1..2df89a3df6c 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -834,7 +834,12 @@ static int edbm_select_similar_exec(bContext *C, wmOperator *op)
static EnumPropertyItem *select_similar_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop),
int *free)
{
- Object *obedit = CTX_data_edit_object(C);
+ Object *obedit;
+
+ if (!C) /* needed for docs and i18n tools */
+ return prop_similar_types;
+
+ obedit = CTX_data_edit_object(C);
if (obedit && obedit->type == OB_MESH) {
EnumPropertyItem *item = NULL;
@@ -862,7 +867,7 @@ static EnumPropertyItem *select_similar_type_itemf(bContext *C, PointerRNA *UNUS
return item;
}
-
+
return NULL;
}