Fix T74720: bmesh.ops.delete default context argument does nothing

This commit is contained in:
Germano Cavalcante 2020-04-07 23:22:28 +10:00 committed by Campbell Barton
parent 1de5cb6a31
commit 3a5c16f1c9
Notes: blender-bot 2023-06-07 10:31:13 +02:00
Referenced by issue #75487, Crash on loading specific .blend file
Referenced by issue blender/blender-addons#74720, 'bmesh.ops.delete' Default Parameter: 'context='VERTS' not working.
1 changed files with 2 additions and 0 deletions

View File

@ -138,6 +138,8 @@ static void bmo_op_slots_init(const BMOSlotType *slot_types, BMOpSlot *slot_args
BMO_OP_SLOT_SUBTYPE_INT_ENUM,
BMO_OP_SLOT_SUBTYPE_INT_FLAG)) {
slot->data.enum_data.flags = slot_types[i].enum_flags;
/* Set the first value of the enum as the default value. */
slot->data.i = slot->data.enum_data.flags[0].value;
}
default:
break;