@staticmethod
    def _loadShadingParam( collada, localscope, node ):
        """Load from the node a definition for a material property."""
        children = node.getchildren()
        if not children: raise DaeIncompleteError('Incorrect effect shading parameter '+node.tag)
        vnode = children[0]
        if vnode.tag == tag('color'):
            try:
                value = tuple([ float(v) for v in vnode.text.split() ])
            except __HOLE__ as ex:
                raise DaeMalformedError('Corrupted color definition in effect '+id)
            except IndexError as ex:
                raise DaeMalformedError('Corrupted color definition in effect '+id)
        elif vnode.tag == tag('float'):
            try: value = float(vnode.text)
            except ValueError as ex:
                raise DaeMalformedError('Corrupted float definition in effect '+id)
        elif vnode.tag == tag('texture'):
            value = Map.load(collada, localscope, vnode)
        elif vnode.tag == tag('param'):
            refid = vnode.get('ref')
            if refid is not None and refid in localscope:
                value = localscope[refid]
            else:
                return None
        else:
            raise DaeUnsupportedError('Unknown shading param definition ' + \
                    vnode.tag)
        return value
dataset/ETHPy150Open pycollada/pycollada/collada/material.py/Effect._loadShadingParam