本文整理汇总了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()