Skip to content

Commit

Permalink
fix: ensure that the WN modifier doesn't add additional mods to an ob…
Browse files Browse the repository at this point in the history
…ject with the WN mod already applied
  • Loading branch information
tristan-hm committed Apr 14, 2024
1 parent e8f8c7e commit c1b9607
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions shading/wn.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ def invoke(self, context, event):
self.keep_sharp = not event.shift

for obj in context.selected_objects:
if any(' — ND WN' in mod.name for mod in obj.modifiers):
continue

mod = new_modifier(obj, 'Weighted Normal — ND WN', 'WEIGHTED_NORMAL', rectify=False)
mod.keep_sharp = self.keep_sharp
mod.weight = 100
Expand Down

0 comments on commit c1b9607

Please sign in to comment.