Merge branch 'feature_plugins' into feature_plugins_shader_gadgets

This commit is contained in:
Tristan Rowley
2020-01-19 15:19:45 +00:00
2 changed files with 9 additions and 7 deletions

View File

@@ -30,10 +30,10 @@ class MidiActionsTestPlugin(ActionsPlugin,SequencePlugin):
self.cycle_count = 0
for i,shader in enumerate(self.pc.message_handler.shaders.selected_shader_list):
self.pc.midi_input.call_method_name(
self.pc.actions.call_method_name(
"play_shader_%s_%s" % (i, self.cycle_count), None
)
self.pc.midi_input.call_method_name(
self.pc.actions.call_method_name(
"start_shader_layer_%s" % i, None
)
self.cycle_count += 1
@@ -41,11 +41,11 @@ class MidiActionsTestPlugin(ActionsPlugin,SequencePlugin):
duration = 5000
frequency = 50
def run_sequence(self, position):
self.pc.midi_input.call_method_name(
self.pc.actions.call_method_name(
"set_the_shader_param_0_layer_0_continuous", position
)
self.pc.midi_input.call_method_name(
self.pc.actions.call_method_name(
"set_the_shader_param_1_layer_0_continuous", position
)

View File

@@ -13,7 +13,7 @@ class MidiFeedbackAPCKey25Plugin(MidiFeedbackPlugin):
def get_note(self,action,default):
bind = self.pc.midi_input.find_binding_for_action(action)
if 'note ' in bind:
if bind and 'note ' in bind:
return int(play_bind.split(' ')[1])
else:
return default
@@ -128,7 +128,8 @@ class MidiFeedbackAPCKey25Plugin(MidiFeedbackPlugin):
colour = self.COLOUR_OFF
self.set_status(command='note_on', note=self.NOTE_CLIP_STATUS_ROW+i, velocity=colour)
except Exception as e:
print ("Warning: Failed when running plugin feedback for ShaderLoopRecordPlugin:\t%s" % str(e))
pass
#print ("Warning: Failed when running plugin feedback for ShaderLoopRecordPlugin:\t%s" % str(e))
try:
from plugins.ShaderQuickPresetPlugin import ShaderQuickPresetPlugin
@@ -148,7 +149,8 @@ class MidiFeedbackAPCKey25Plugin(MidiFeedbackPlugin):
colour += self.BLINK
self.set_status(command='note_on', note=pad, velocity=colour)
except Exception as e:
print ("Warning: Failed when running plugin feedback for ShaderQuickPresetPlugin:\t%s" % str(e))
pass
#print ("Warning: Failed when running plugin feedback for ShaderQuickPresetPlugin:\t%s" % str(e))
BLINK = 1
COLOUR_OFF = 0