Resolve standalone nodes too

This commit is contained in:
Steven Robertson 2013-12-21 15:32:00 -08:00
parent 38151bb5c9
commit f842a9181d
2 changed files with 3 additions and 2 deletions

View File

@ -13,7 +13,8 @@ from use import Wrapper
from util import get, json_encode, resolve_spec, flatten, unflatten
import variations
def node_to_anim(node, half):
def node_to_anim(gdb, node, half):
node = resolve(gdb, node)
if half:
osrc, odst = -0.25, 0.25
else:

View File

@ -46,7 +46,7 @@ class GenomeDB(object):
gnm = self.get(name)
if gnm['type'] == 'node':
gnm = convert.node_to_anim(gnm, half=half)
gnm = convert.node_to_anim(self, gnm, half=half)
elif gnm['type'] == 'edge':
gnm = convert.edge_to_anim(self, gnm)
assert gnm['type'] == 'animation', 'Unrecognized genome type.'