1
$\begingroup$

I have multiple objects and they have the same exact modifier with same name (same parameters , name etc). For example :

  • cube1 has modifiers : array1, boolean1
  • sphere1 has modifiers : solidify1, boolean1
  • cone1 has modifiers : boolean1

So i want to change the name of boolean1 to become myboolean for multiple objects at once. Can i do this ?

Do we need python for this ? using Alt doesn't do the trick for multiple edit.

Thanks

$\endgroup$
2
  • $\begingroup$ Yes most likely you need to use Python to do that. $\endgroup$
    – lemon
    Commented Dec 3, 2020 at 13:34
  • $\begingroup$ Well if modifier is expected to have all parameters the same then you can rename it for one object and then use any facility to copy it over to other objects (Link modifiers or Copy Attributes addons etc). However to just do renaming this won't be useful $\endgroup$
    – Mr Zak
    Commented Dec 3, 2020 at 14:02

1 Answer 1

3
$\begingroup$

Iterate over all objects (or all selected objects, in the following script). If the object supports modifiers, check if the looked for modifier name exists, if it does, rename it.

import bpy

previous_name_modifier = "boolean1"
new_name_modifier = "MyBoolean"

for obj in bpy.context.selected_objects:
    if not obj.modifiers:
        continue
    mod = obj.modifiers.get(previous_name_modifier)
    if mod:
        mod.name = new_name_modifier
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .