Best way to get a list of modifiers in Python? How can I get a list of modifiers for Blender in Python? I know about bpy.types.SomeModifier(), but isn't there something to use to get a list of all of the possible modifiers?


I know the list isn't too long to make by hand, but I really don't want to hardcode it if I don't have to.


Is this possible to list out with bpy.types.Modifier()?
bpy.types.Modifier.bl_rna.properties['type'].enum_items contains a list of all modifier types. 

To get a list of their Python identifiers you can do:

modifiers = []

for modifier in bpy.types.Modifier.bl_rna.properties['type'].enum_items:

    modifiers.append(modifier.identifier)


Or, more Pythonically:

modifiers = [modifier.identifier for modifier in bpy.types.Modifier.bl_rna.properties['type'].enum_items]