Skip to content

Instantly share code, notes, and snippets.

@p2or
Last active May 22, 2023 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save p2or/f419f4f440191bb52447 to your computer and use it in GitHub Desktop.
Save p2or/f419f4f440191bb52447 to your computer and use it in GitHub Desktop.
Check Modifiers #Blender #BSE
# for http://blender.stackexchange.com/questions/42080/check-if-active-object-has-a-modifier
# check for specific modifier using any()
print ([m for m in bpy.context.object.modifiers if m.type == "SUBSURF"])
# or as function
def check_modifier(obj, modifier_type):
for modifier in obj.modifiers:
if modifier.type == modifier_type:
return True
else:
return False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment