So, I have some arbitrary object referred by the variable
target_object. I can directly add the modifier to this object:
mod = target_obj.modifiers.new(type='BOOLEAN', name='Boolean')
mod.operation = 'DIFFERENCE'
mod.object = tool_obj #some tool object
I have the one main question: is it possible to somehow directly apply this newly created modifier? I doesn't find any ways to do this, avoiding to use
bpy.ops.object.modifier_apply() which works with the active object only.
I have the secondary question: does some built-in function or method exist to get unique modifier's name? For unclear reasons the
name parameter of the
new() method is required and I do not wish to write the additional code to generate such name manually...