(self, name, data, **kwargs)
Update data of a variable.
Update data of a variable.
Update data of a variable .
def update_variable(self, name, data, **kwargs):
        """Update data of a variable."""
        variable = self.get_variable(name)
        if variable is None:
            log_debug("Variable '%s' was not found, unable to update it." % name)
        else:
            shader_type = variable['shader_type']
            # skip compound, which is handled in set_data
            if shader_type == 'compound' or shader_type == 'varying' or shader_type == 'framebuffer':
                pass
            else:
                getattr(self, 'update_%s' % shader_type)(name, data, **kwargs)
def update_variable ( self , name , data , * * kwargs ) : variable = self . get_variable ( name ) if variable is None : log_debug ( "Variable '%s' was not found, unable to update it." % name ) else : shader_type = variable [ 'shader_type' ] # skip compound, which is handled in set_data if shader_type == 'compound' or shader_type == 'varying' or shader_type == 'framebuffer' : pass else : getattr ( self , 'update_%s' % shader_type ) ( name , data , * * kwargs )