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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user