本文整理汇总了Python中SpecialSessionComponent.SpecialSessionComponent.set_show_highlight方法的典型用法代码示例。如果您正苦于以下问题:Python SpecialSessionComponent.set_show_highlight方法的具体用法?Python SpecialSessionComponent.set_show_highlight怎么用?Python SpecialSessionComponent.set_show_highlight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpecialSessionComponent.SpecialSessionComponent
的用法示例。
在下文中一共展示了SpecialSessionComponent.set_show_highlight方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MainSelectorComponent
# 需要导入模块: from SpecialSessionComponent import SpecialSessionComponent [as 别名]
# 或者: from SpecialSessionComponent.SpecialSessionComponent import set_show_highlight [as 别名]
#.........这里部分代码省略.........
new_channel = self._mode_index + self._sub_modes.mode()
if new_channel > 0:
new_channel += 3
return new_channel
def update(self):
assert self._modes_buttons != None
if self.is_enabled():
# for index in range(len(self._modes_buttons)):
# self._modes_buttons[index].set_force_next_value()
# if index == self._mode_index:
# self._modes_buttons[index].turn_on()
# else:
# self._modes_buttons[index].turn_off()
for scene_index in range(8):
self._side_buttons[scene_index].set_enabled(True)
for track_index in range(8):
self._matrix.get_button(track_index, scene_index).set_enabled(True)
for button in self._nav_buttons:
button.set_enabled(True)
as_active = True
as_enabled = True
self._session.set_allow_update(False)
self._zooming.set_allow_update(False)
self._config_button.send_value(40)
self._config_button.send_value(1)
release_buttons = self._mode_index == 1
if self._mode_index < 4:
self._script._suppress_session_highlight = False
self._session.set_show_highlight(True)
# self._script.set_highlighting_session_component(self.session_component())
self._script._host._set_key_buttons(None)
self._script._host.set_enabled(False)
self._script._host._set_button_matrix(None)
self._script._host._set_alt_button(None)
self._script._host._set_shift_button(None)
self._script._host._set_nav_buttons(None)
for button in self._modes_buttons:
button.set_on_off_values(127, 4)
if self._mode_index == 0:
self._setup_mixer(not as_active)
self._setup_session(as_active, as_enabled)
elif self._mode_index == 1:
self._setup_session(not as_active, not as_enabled)
self._setup_mixer(not as_active)
self._setup_user(release_buttons)
elif self._mode_index == 2:
self._setup_session(not as_active, not as_enabled)
self._setup_mixer(not as_active)
self._setup_user(release_buttons)
elif self._mode_index == 3:
self._setup_session(not as_active, as_enabled)
self._setup_mixer(as_active)
elif self._mode_index == 4:
# self._script.set_highlighting_session_component(None)
self._session.set_show_highlight(False)
self._script._suppress_session_highlight = True
self._setup_session((not as_active), (not as_enabled))
self._setup_mixer((not as_active))
self._setup_user(release_buttons)
self._script._host._set_button_matrix(self._matrix)
示例2: MainSelectorComponent
# 需要导入模块: from SpecialSessionComponent import SpecialSessionComponent [as 别名]
# 或者: from SpecialSessionComponent.SpecialSessionComponent import set_show_highlight [as 别名]
#.........这里部分代码省略.........
def _setup_session(self, as_active, as_enabled):
assert isinstance(as_active, type(False))
for button in self._nav_buttons:
if as_enabled:
button.set_on_off_values(GREEN_FULL, GREEN_THIRD)
else:
button.set_on_off_values(127, LED_OFF)
for scene_index in range(8):
scene = self._session.scene(scene_index)
if as_active:
scene_button = self._side_buttons[scene_index]
scene_button.set_on_off_values(127, LED_OFF)
scene.set_launch_button(scene_button)
else:
scene.set_launch_button(None)
for track_index in range(8):
if as_active:
button = self._matrix.get_button(track_index, scene_index)
button.set_on_off_values(127, LED_OFF)
scene.clip_slot(track_index).set_launch_button(button)
else:
scene.clip_slot(track_index).set_launch_button(None)
if as_active:
self._zooming.set_zoom_button(self._modes_buttons[0])
self._zooming.set_button_matrix(self._matrix)
self._zooming.set_scene_bank_buttons(self._side_buttons)
self._zooming.set_nav_buttons(self._nav_buttons[0], self._nav_buttons[1], self._nav_buttons[2], self._nav_buttons[3])
self._zooming.update()
else:
self._zooming.set_zoom_button(None)
self._zooming.set_button_matrix(None)
self._zooming.set_scene_bank_buttons(None)
self._zooming.set_nav_buttons(None, None, None, None)
if as_enabled:
self._session.set_track_bank_buttons(self._nav_buttons[3], self._nav_buttons[2])
self._session.set_scene_bank_buttons(self._nav_buttons[1], self._nav_buttons[0])
self._session.set_show_highlight(True)
else:
self._session.set_track_bank_buttons(None, None)
self._session.set_scene_bank_buttons(None, None)
self._session.set_show_highlight(False)
def _setup_mixer(self, as_active):
assert isinstance(as_active, type(False))
self._sub_modes.set_enabled(as_active)
def _setup_user(self, release_buttons):
for scene_index in range(8):
scene_button = self._side_buttons[scene_index]
scene_button.set_on_off_values(127, LED_OFF)
scene_button.turn_off()
scene_button.set_enabled((not release_buttons))
for track_index in range(8):
button = self._matrix.get_button(track_index, scene_index)
button.set_on_off_values(127, LED_OFF)
button.turn_off()
button.set_enabled((not release_buttons))
for button in self._nav_buttons:
button.set_on_off_values(127, LED_OFF)
button.turn_off()
button.set_enabled((not release_buttons))
self._config_button.send_value(32)
if release_buttons:
self._config_button.send_value(2)
def _init_session(self):
self._session.set_stop_track_clip_value(AMBER_BLINK)
for scene_index in range(self._matrix.height()):
scene = self._session.scene(scene_index)
scene.set_triggered_value(GREEN_BLINK)
for track_index in range(self._matrix.width()):
clip_slot = scene.clip_slot(track_index)
clip_slot.set_triggered_to_play_value(GREEN_BLINK)
clip_slot.set_triggered_to_record_value(RED_BLINK)
clip_slot.set_stopped_value(AMBER_FULL)
clip_slot.set_started_value(GREEN_FULL)
clip_slot.set_recording_value(RED_FULL)
self._all_buttons.append(self._matrix.get_button(track_index, scene_index))
self._zooming.set_stopped_value(RED_FULL)
self._zooming.set_selected_value(AMBER_FULL)
self._zooming.set_playing_value(GREEN_FULL)