Post #3970: You can call the last modifier created by changing the name to -1

📋 Metadata

🏷️ Tags

macro scripting intermediate

  • Macro Editor
  • Python Scripting

💬 Content

You can call the last modifier created by changing the name to -1

Example:

This calls a specific modifier

bpy.context.object.modifiers["Solidify"].thickness = 2

This calls the last created and tries to change the thickness

bpy.context.object.modifiers[-1].thickness = 2


❤️ 1 likes


🔗 View on Blender Artists