Get enum property items

Is there a way to get the items of an enum property that doesn’t have them in prop.enum_items?

I need to get the enum values of an operator property:

bpy.ops.wm.open_url_preset(type="")
I need the items of type but they are empty when accessed through the rna type -> enum_items. I guess they are added when the operator is run but I’m not sure about that.

Is there any way to get the enum items without doing something insane like running the operator with the property set to "" and taking apart the error message?

I need this to work for any enum property btw so not just for this operator but for any enum property in any operator.

1 Like