本文整理匯總了Python中SubSelectorComponent.release_controls方法的典型用法代碼示例。如果您正苦於以下問題:Python SubSelectorComponent.release_controls方法的具體用法?Python SubSelectorComponent.release_controls怎麽用?Python SubSelectorComponent.release_controls使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類SubSelectorComponent
的用法示例。
在下文中一共展示了SubSelectorComponent.release_controls方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: MainSelectorComponent
# 需要導入模塊: import SubSelectorComponent [as 別名]
# 或者: from SubSelectorComponent import release_controls [as 別名]
#.........這裏部分代碼省略.........
self._config_button.send_value(32)
def _setup_step_sequencer(self, as_active):
if(self._stepseq != None):
#if(self._stepseq.is_enabled() != as_active):
if as_active:
self._activate_scene_buttons(True)
self._activate_matrix(True)
self._activate_navigation_buttons(True)
self._config_button.send_value(32)
self._stepseq.set_enabled(True)
else:
self._stepseq.set_enabled(False)
def _setup_step_sequencer2(self, as_active):
if(self._stepseq2 != None):
#if(self._stepseq2.is_enabled() != as_active):
if as_active:
self._activate_scene_buttons(True)
self._activate_matrix(True)
self._activate_navigation_buttons(True)
self._config_button.send_value(32)
self._stepseq2.set_enabled(True)
else:
self._stepseq2.set_enabled(False)
def _setup_mixer(self, as_active):
assert isinstance(as_active, type(False))
if as_active:
self._activate_navigation_buttons(True)
self._activate_scene_buttons(True)
self._activate_matrix(True)
if(self._sub_modes.is_enabled()):
# go back to default mode
self._sub_modes.set_mode(-1)
else:
self._sub_modes.release_controls()
self._sub_modes.set_enabled(as_active)
def _init_session(self):
major = self._parent._live_major_version
minor = self._parent._live_minor_version
bugfix = self._parent._live_bugfix_version
if (major >= 9 and minor > 1) or (major >= 9 and minor >= 1 and bugfix >= 2):
# api changed in 9.1.2
self._session.set_stop_clip_value(self._skin.session.track_stop)
self._session.set_stop_clip_triggered_value(self._skin.session.clip_triggered_to_stop)
else:
# api for 9.1.1 below
self._session.set_stop_track_clip_value(self._skin.session.clip_triggered_to_stop)
#if self._mk2:
# self._session.set_rgb_mode(self._skin.CLIP_COLOR_TABLE, self._skin.RGB_COLOR_TABLE)
session_height = self._matrix.height()
if self._session._stop_clip_buttons != None:
session_height = self._matrix.height()-1
for scene_index in range(session_height):
scene = self._session.scene(scene_index)
scene.set_triggered_value(self._skin.session.scene_triggered)
scene.name = 'Scene_' + str(scene_index)
for track_index in range(self._matrix.width()):
clip_slot = scene.clip_slot(track_index)
clip_slot.set_triggered_to_play_value(self._skin.session.clip_triggered_to_play)
clip_slot.set_triggered_to_record_value(self._skin.session.clip_triggered_to_record)
clip_slot.set_stopped_value(self._skin.session.clip_stopped)
clip_slot.set_started_value(self._skin.session.clip_playing)
clip_slot.set_recording_value(self._skin.session.clip_recording)
clip_slot.set_record_button_value(self._skin.session.clip_record)
clip_slot.name = str(track_index) + '_Clip_Slot_' + str(scene_index)
self._all_buttons.append(self._matrix.get_button(track_index, scene_index))
self._zooming.set_stopped_value(self._skin.RED_FULL)
self._zooming.set_selected_value(self._skin.AMBER_FULL)
self._zooming.set_playing_value(self._skin.GREEN_FULL)
def _activate_navigation_buttons(self, active):
for button in self._nav_buttons:
button.set_enabled(active)
def _activate_scene_buttons(self, active):
for button in self._side_buttons:
button.set_enabled(active)
def _activate_matrix(self, active):
for scene_index in range(8):
for track_index in range(8):
self._matrix.get_button(track_index, scene_index).set_enabled(active)
def log_message(self, msg):
self._parent.log_message(msg)
# Update the channels of the buttons in the user modes..
def _update_control_channels(self):
new_channel = self.channel_for_current_mode()
for button in self._all_buttons:
button.set_channel(new_channel)
button.set_force_next_value()