# HG changeset patch # User drewp@bigasterisk.com # Date 2017-05-10 04:06:02 # Node ID 5a0a775ca9d3dcea435f23002101477b0476f577 # Parent a5a44077c54ca05caca066b1320e14c8a35972b4 tiny bit more WIP on solve.py Ignore-this: 6ea6f78a95a19877a26b9091946506b8 diff --git a/light9/paint/solve.py b/light9/paint/solve.py --- a/light9/paint/solve.py +++ b/light9/paint/solve.py @@ -55,8 +55,16 @@ def loadNumpy(path, thumb=(100, 100)): class Settings(object): + def __init__(self, graph, settingsList): + self._compiled = {} # dev: { attr: val } + for row in settingsList: + self._compiled.setdefault(row[0], {})[row[1]] = row[2] + def toVector(self): - def fromVector(self): + """ + + def fromVector(cls, graph, vector): + """update our settings from a vector with the same ordering as toVector would make""" def distanceTo(self, other):