@staticmethod
    def load(collada, localscope, node):
        orthonode = node.find('%s/%s/%s' % (
            tag('optics'),
            tag('technique_common'),
            tag('orthographic')))

        if orthonode is None: raise DaeIncompleteError('Missing orthographic for camera definition')

        xmag = orthonode.find( tag('xmag') )
        ymag = orthonode.find( tag('ymag') )
        aspect_ratio = orthonode.find( tag('aspect_ratio') )
        znearnode = orthonode.find( tag('znear') )
        zfarnode = orthonode.find( tag('zfar') )
        id = node.get('id', '')

        try:
            if xmag is not None:
                xmag = float(xmag.text)
            if ymag is not None:
                ymag = float(ymag.text)
            if aspect_ratio is not None:
                aspect_ratio = float(aspect_ratio.text)
            znear = float(znearnode.text)
            zfar = float(zfarnode.text)
        except (TypeError, __HOLE__) as ex:
            raise DaeMalformedError('Corrupted float values in camera definition')

        #There are some exporters that incorrectly output all three of these.
        # Worse, they actually got the caculation of aspect_ratio wrong!
        # So instead of failing to load, let's just add one more hack because of terrible exporters
        if xmag is not None and ymag is not None and aspect_ratio is not None:
            aspect_ratio = None

        return OrthographicCamera(id, znear, zfar, xmag=xmag, ymag=ymag,
                aspect_ratio=aspect_ratio, xmlnode=node)
dataset/ETHPy150Open pycollada/pycollada/collada/camera.py/OrthographicCamera.load