Post #3417: You can do this by adding each separately.

📋 Metadata

🏷️ Tags

macro python-scripting intermediate

  • Macro Editor
  • Python Scripting

💬 Content

You can do this by adding each separately.

  1. modifier: bpy.ops.object.modifier_add(True, type='DECIMATE')
  2. x tells you the las modifier added: x = C.object.modifiers[len(C.object.modifiers)-1]
  3. using x you change the different parameters from the last modifier:
    x.decimate_type = 'DISSOLVE'
    x.angle_limit = 0.349066
    x.use_dissolve_boundaries = True

Here is the one line code, you can add this in the command tab

bpy.ops.object.modifier_add(True, type='DECIMATE'); x = C.object.modifiers[len(C.object.modifiers)-1]; x.decimate_type = 'DISSOLVE'; x.angle_limit = 0.349066; x.use_dissolve_boundaries = True

Following the steps you can add any type and number of modifiers in a macro with custom settings
Hope it helps.


❤️ 1 likes


🔗 View on Blender Artists