# HG changeset patch # User drewp@bigasterisk.com # Date 2023-05-22 08:06:27 # Node ID 5b38db0369fcc1f8b14ba07dbb1d4b4c1f983c78 # Parent 71fa794c160c3435229581a37c9c148b3f35dc35 add resolve() to DeviceSettings.__init__ diff --git a/light9/effect/settings.py b/light9/effect/settings.py --- a/light9/effect/settings.py +++ b/light9/effect/settings.py @@ -64,8 +64,14 @@ class _Settings: def __init__(self, graph: GraphType, settingsList: List[Tuple[Any, Any, VTUnion]]): self.graph = graph # for looking up all possible attrs self._compiled: Dict[self.__class__.EntityType, Dict[self.__class__.AttrType, VTUnion]] = {} - for row in settingsList: - self._compiled.setdefault(row[0], {})[row[1]] = row[2] + for e, a, v in settingsList: + attrVals = self._compiled.setdefault(e, {}) + if a in attrVals: + v = resolve( + e, # Hey, this is supposed to be DeviceClass (which is not convenient for us), but so far resolve() doesn't use that arg + a, + [attrVals[a], v]) + attrVals[a] = v # self._compiled may not be final yet- see _fromCompiled self._delZeros()