I got a lot of objects, with different modifiers, can i apply the modifiers together but with individual values for each single object? (in order to save time?)
-
$\begingroup$ Make the object which has the modifiers the active one, and then press Ctrl + L>Modifiers $\endgroup$– someonewithpcCommented Feb 18, 2015 at 12:41
-
$\begingroup$ But what if some objects have already some different modifiers that aren't applied? doesnt they mix or something? $\endgroup$– beavoruCommented Feb 18, 2015 at 12:45
-
$\begingroup$ Yes, it will over-write the set modifiers, not what you are looking for $\endgroup$– J SargentCommented Feb 18, 2015 at 12:45
-
$\begingroup$ @someonewithpc that links them not applies them.. $\endgroup$– Jaroslav Jerryno NovotnyCommented Feb 18, 2015 at 12:46
-
$\begingroup$ @Jerryno Exactly, Beavoru, why do you want to apply them? Whenever you export or render it will act the same. $\endgroup$– J SargentCommented Feb 18, 2015 at 12:47
2 Answers
Select all the objects with modifiers that should be applied and then press Alt + C. In the dialog appeared select the second variant, i.e Mesh from Curve/etc. That will apply all the modifiers respectively.
In Blender 2.8 and above, the hotkey for this operation was dropped so you have to call it from viewport menu > Object > Convert To. You can assign a shortcut to it yourself or in viewport press Ctrl+A —> Visual Geometry to Mesh which essentially will call the same Convert To > Mesh operator.
Probably you will need to create backups of the meshes to have possibility to redo something with modifiers if needed.
Be careful applying modifiers to objects that share mesh data, as it can lead to unexpected results due to instancing; only one mesh will be used for all instances which means that modifiers will be copied from the very first instance and modifiers on other instances won't be taken into account as well as still-active modifiers on unselected object instances can cause severe performance impacts.
This will do what you want: Applies modifiers for all selected objects:
import bpy
import bmesh
for ob in [ob for ob in bpy.context.selected_objects if ob.type == 'MESH']:
b_me = bmesh.new()
b_me.from_object(ob, bpy.context.scene)
b_me.to_mesh(ob.data)
b_me.free()
for mod in ob.modifiers:
ob.modifiers.remove(mod)
To add modifier (wireframe) for all selected objects:
import bpy
for ob in [ob for ob in bpy.context.selected_objects if ob.type == 'MESH']:
mod = ob.modifiers.new(name='Wire', type='WIREFRAME')
mod.thickness = 0.02 # SET THIS