Skip to content

Commit

Permalink
fix: ensure the decimate modifier retains its appropriate position in…
Browse files Browse the repository at this point in the history
… the stack when recalling the ring_and_bolt operator
  • Loading branch information
tristan-hm committed Feb 20, 2022
1 parent d67034f commit 03117a2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions generators/ring_and_bolt.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@ def add_decimate_modifier(self):

self.decimate = decimate

all_mods = self.obj.modifiers.values()
decimate_index = all_mods.index(self.screwZ) + 1

while self.obj.modifiers[decimate_index].name != self.decimate.name:
bpy.ops.object.modifier_move_up(modifier=self.decimate.name)


def try_remove_decimate_modifier(self, context):
self.had_decimate_mod = False
Expand Down

0 comments on commit 03117a2

Please sign in to comment.