def _send_chain_colors(self): d = self._device for n, button in enumerate(self._chain_buttons): if not (button): continue if d is None or not d.can_have_chains or n >= len(d.chains): button.send_value(0) else: button.send_value(str_to_color(d.chains[n].name))
def _send_param_colors(self): params = self._get_current_params() for n, button in enumerate(self._param_buttons or []): if not button: continue if n >= len(params): button.send_value(0) continue param = params[n] if param != None and param.name.strip() != '': button.send_value(str_to_color(param.name)) else: button.send_value(0)