Commit f2f4a8b3 authored by Alexander Gavrilov's avatar Alexander Gavrilov
Browse files

The apply_as parameter of modifier_apply was removed due to operator split.

Specifying DATA was redundant anyway, as that was the default.
parent 45aa940d
...@@ -360,7 +360,7 @@ def cleanupApplyPre(context): ...@@ -360,7 +360,7 @@ def cleanupApplyPre(context):
if temp_mod: if temp_mod:
for m in temp_mod: for m in temp_mod:
if m.object: if m.object:
bpy.ops.object.modifier_apply(apply_as='DATA', modifier=m.name) bpy.ops.object.modifier_apply(modifier=m.name)
else: else:
bpy.ops.object.modifier_remove(modifier=m.name) bpy.ops.object.modifier_remove(modifier=m.name)
...@@ -411,7 +411,7 @@ def applyLatticeModifier(): ...@@ -411,7 +411,7 @@ def applyLatticeModifier():
if temp_mod: if temp_mod:
for m in temp_mod: for m in temp_mod:
bpy.ops.object.modifier_apply(apply_as='DATA', modifier=m.name) bpy.ops.object.modifier_apply(modifier=m.name)
except: except:
print("no modifiers") print("no modifiers")
...@@ -529,7 +529,7 @@ def applyLatticeOp(obj, context): ...@@ -529,7 +529,7 @@ def applyLatticeOp(obj, context):
if temp_mod: if temp_mod:
for m in temp_mod: for m in temp_mod:
if m.object: if m.object:
bpy.ops.object.modifier_apply(apply_as='DATA', modifier=m.name) bpy.ops.object.modifier_apply(modifier=m.name)
else: else:
bpy.ops.object.modifier_remove(modifier=m.name) bpy.ops.object.modifier_remove(modifier=m.name)
......
...@@ -205,7 +205,7 @@ class FRACTURE_OT_Crack(Operator): ...@@ -205,7 +205,7 @@ class FRACTURE_OT_Crack(Operator):
var1=crack_props.extrude_var, var2=crack_props.extrude_var, var3=crack_props.extrude_var, var1=crack_props.extrude_var, var2=crack_props.extrude_var, var3=crack_props.extrude_var,
num=crack_props.extrude_num, ran=0 num=crack_props.extrude_num, ran=0
) )
bpy.ops.object.modifier_apply(apply_as='DATA', modifier='DECIMATE_crackit') bpy.ops.object.modifier_apply(modifier='DECIMATE_crackit')
bpy.ops.object.shade_smooth() bpy.ops.object.shade_smooth()
if crack_props.modifier_wireframe == True: if crack_props.modifier_wireframe == True:
......
...@@ -379,7 +379,7 @@ def cell_boolean(context, original, cells, ...@@ -379,7 +379,7 @@ def cell_boolean(context, original, cells,
original.select_set(True) original.select_set(True)
cell.select_set(True) cell.select_set(True)
bpy.context.view_layer.objects.active = cell bpy.context.view_layer.objects.active = cell
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Boolean") bpy.ops.object.modifier_apply(modifier="Boolean")
if i == 0: if i == 0:
bpy.data.objects.remove(cell, do_unlink=True) bpy.data.objects.remove(cell, do_unlink=True)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment