

def __set_source(self, shape, name, stride, min_element=None, max_element=None, data=None):
    'Add a vertex stream source for the specified geometry shape.'
    if (data is None):
        data = []
    source = {
        'stride': stride,
        'data': data,
    }
    if (min_element is not None):
        source['min'] = min_element
    if (max_element is not None):
        source['max'] = max_element
    LOG.debug('geometries:%s:sources:%s[%i]', shape, name, (len(data) / stride))
    self.asset['geometries'][shape]['sources'][name] = source

dataset/ETHPy150Open turbulenz/turbulenz_tools/turbulenz_tools/tools/asset2json.py JsonAsset.__set_source/original