Post #3002: ![](https://blenderartists.org/user_avatar/blenderartists.org/panosz/48/31678_2.

📋 Metadata

  • Author: roaoao
  • Date: 2020-01-31 18:43:35
  • Type: answer
  • Quality Score: 8/10
  • Reply to: post_03001

🏷️ Tags

macro scripting intermediate solved

  • Macro Editor
  • Python Scripting

💬 Content

panosz:

Is there a way to recognize the new modifier’s name and leave the old one as is?

You can find new or last added modifier with -1 index:

bpy.context.object.modifiers[-1]



bpy.ops.object.modifier_add(type='ARRAY'); mod = bpy.context.object.modifiers[-1]; mod.use_relative_offset = False; mod.count = 1

❤️ 2 likes


🔗 View on Blender Artists