Skip to content

Commit

Permalink
fix: [Blender 4] fix an error when mirroring an object with the SHIFT…
Browse files Browse the repository at this point in the history
… (place on top of the stack) alt-mode selected
  • Loading branch information
tristan-hm committed Feb 24, 2024
1 parent 3fb0b05 commit 49d5e38
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion replicate/mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,11 @@ def add_mirror_modifiers(self):

if self.early_apply:
while obj.modifiers[0].name != mirror.name:
bpy.ops.object.modifier_move_up({'object': obj}, modifier=mirror.name)
if bpy.app.version < (4, 0, 0):
bpy.ops.object.modifier_move_up({'object': obj}, modifier=mirror.name)
else:
with bpy.context.temp_override(object=obj):
bpy.ops.object.modifier_move_up(modifier=mirror.name)


def operate(self, context):
Expand Down

0 comments on commit 49d5e38

Please sign in to comment.