Skip to content

Commit

Permalink
fix(shader): Prevent resetting parameters in shader settings
Browse files Browse the repository at this point in the history
Introduce an early return check for the shader's variation. If the selected variation is the same as the previously active one, the function exits early, preventing any unnecessary resetting of shader parameters.

Fix StjerneIdioten#180
  • Loading branch information
NMC-TBone committed Sep 23, 2023
1 parent 92e14fc commit 8365653
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions addon/i3dio/ui/shader_picker.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ def variation_items_update(self, context):
)

def variation_setter(self, value):
if self.get('variation') == value:
return
self['variation'] = value
bpy.ops.i3dio.load_custom_shader_variation()

Expand Down

0 comments on commit 8365653

Please sign in to comment.