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

        if persnode is None:
            raise DaeIncompleteError('Missing perspective for camera definition')

        xfov = persnode.find( tag('xfov') )
        yfov = persnode.find( tag('yfov') )
        aspect_ratio = persnode.find( tag('aspect_ratio') )
        znearnode = persnode.find( tag('znear') )
        zfarnode = persnode.find( tag('zfar') )
        id = node.get('id', '')

        try:
            if xfov is not None:
                xfov = float(xfov.text)
            if yfov is not None:
                yfov = float(yfov.text)
            if aspect_ratio is not None:
                aspect_ratio = float(aspect_ratio.text)
            znear = float(znearnode.text)
            zfar = float(zfarnode.text)
        except (__HOLE__, ValueError) 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 xfov is not None and yfov is not None and aspect_ratio is not None:
            aspect_ratio = None

        return PerspectiveCamera(id, znear, zfar, xfov=xfov, yfov=yfov,
                aspect_ratio=aspect_ratio, xmlnode=node)
dataset/ETHPy150Open pycollada/pycollada/collada/camera.py/PerspectiveCamera.load