PROP_ENUM_NO_CONTEXT flag for rna properties, forcing enum item functions to be passed a null context (to return non-contextual items).

This is set on keymap item operator properties and macro definition operator properties to make them non-contextual (since the context at definition time is most likely not the same then at execution time, it's better to have all options visible).

This removes some more errors in keymap export and import.

This commit also sanitize some enum item function, making sure they can cope with null context and have usable defaults in that case.
This commit is contained in:
2010-01-27 21:19:39 +00:00
parent 86a65890c4
commit fb7878a2c2
11 changed files with 75 additions and 24 deletions

View File

@@ -5835,6 +5835,10 @@ static EnumPropertyItem *merge_type_itemf(bContext *C, PointerRNA *ptr, int *fre
EnumPropertyItem *item= NULL;
int totitem= 0;
if (C==NULL) {
return merge_type_items;
}
if(obedit && obedit->type == OB_MESH) {
EditMesh *em= BKE_mesh_get_editmesh(obedit->data);