I am trying to run shrinkwrap
and then remesh modifier
repeatedly but not working. It seems to me there is a infinite loop inside the code. I am new to blender and python coding. What is wrong with that code?
I am using Blender 3.6
import bpy
jaw = bpy.data.objects['jaw']
for i in range(0,20):
bpy.ops.object.modifier_add(type='SHRINKWRAP')
bpy.context.object.modifiers["Shrinkwrap"].target = jaw
bpy.context.object.modifiers["Shrinkwrap"].offset = 0.5
bpy.ops.object.modifier_add(type='REMESH')
bpy.context.object.modifiers["Remesh"].mode = 'SMOOTH'
bpy.context.object.modifiers["Remesh"].use_remove_disconnected = False
bpy.context.object.modifiers["Remesh"].octree_depth = 8
bpy.ops.object.modifier_apply(modifier='SHRINKWRAP')
bpy.ops.object.modifier_apply(modifier='REMESH')
print(i)
statement in the loop to observe this in the system console. As @HarryMcKenzie already asked, what are you trying to achieve? $\endgroup$