Skip to content

Commit

Permalink
multiple choosers
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgoringe committed Mar 13, 2024
1 parent 23eb9ab commit 00f2b74
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions image_chooser_preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class PreviewAndChoose(PreviewImage):
CATEGORY = "image_chooser"
INPUT_IS_LIST=True
OUTPUT_NODE = False
last_ic = 0
last_ic = {}
@classmethod
def INPUT_TYPES(s):
return {
Expand All @@ -26,9 +26,9 @@ def INPUT_TYPES(s):
}

@classmethod
def IS_CHANGED(cls, mode, **kwargs):
if (mode[0]!="Repeat last selection" or not cls.last_ic): cls.last_ic = random.random()
return cls.last_ic
def IS_CHANGED(cls, mode, id, **kwargs):
if (mode[0]!="Repeat last selection" or not id[0] in cls.last_ic): cls.last_ic[id[0]] = random.random()
return cls.last_ic[id[0]]

def func(self, id, **kwargs):
# mode doesn't exist in subclass
Expand Down

0 comments on commit 00f2b74

Please sign in to comment.