def ball(node, **kwargs): root = scene.xml_load( os.path.join(localdir, 'ball.xml') ) name = kwargs.get('name', 'ball') res = scene.xml_insert(node, root) res.name = name return res
def beam(node, **kwargs): name = kwargs.get('name', 'beam') color = kwargs.get('color', '1 1 1') color = [color + ' 0.3', color + ' 1'] root = scene.xml_load('beam.xml') for model, c in izip(root.iter('VisualModel'), color): model.attrib['color'] = c res = scene.xml_insert(node, root) res.name = name return res
def beam(node, **kwargs): name = kwargs.get('name', 'beam') color = kwargs.get('color', '1 1 1') color = [ color + ' 0.3', color + ' 1'] root = scene.xml_load('beam.xml') for model, c in izip(root.iter('VisualModel'), color): model.attrib['color'] = c res = scene.xml_insert(node, root) res.name = name return res