Returns the opacity amount for this connection.
        
        :return     <float>

def opacity(self):
        """
        Returns the opacity amount for this connection.
        
        :return     <float>
        """
        in_node = self.inputNode()
        out_node = self.outputNode()

        if ( in_node and out_node and \
                     (in_node.isIsolateHidden() or out_node.isIsolateHidden()) ):
            return 0.1

        opacity = super(XNodeConnection, self).opacity()
        layer = self.layer()
        if layer:
            return layer.opacity() * opacity

        return opacity