mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-14 20:30:06 +01:00
Whitespace
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from data_centre.plugin_collection import ActionsPlugin, SequencePlugin
|
||||
|
||||
class TestPlugin(ActionsPlugin,SequencePlugin):
|
||||
|
||||
class TestPlugin(ActionsPlugin, SequencePlugin):
|
||||
disabled = True
|
||||
|
||||
def __init__(self, plugin_collection):
|
||||
@@ -8,39 +9,41 @@ class TestPlugin(ActionsPlugin,SequencePlugin):
|
||||
|
||||
@property
|
||||
def parserlist(self):
|
||||
return [
|
||||
( r"^test_plugin$", self.test_plugin ),
|
||||
( r"^cycle_shaders$", self.cycle_shaders ),
|
||||
( r"^run_automation$", self.run_automation ),
|
||||
( r"^stop_automation$", self.stop_automation ),
|
||||
( r"^toggle_pause_automation$", self.toggle_pause_automation ),
|
||||
( r"^pause_automation$", self.pause_automation ),
|
||||
( r"^toggle_loop_automation$", self.toggle_loop_automation ),
|
||||
( r"^print_arguments$", self.print_arguments ),
|
||||
( r"^set_the_shader_param_([0-3])_layer_offset_([0-2])_continuous_inverted_example$", self.invert_shader_param_layer )
|
||||
return [
|
||||
(r"^test_plugin$", self.test_plugin),
|
||||
(r"^cycle_shaders$", self.cycle_shaders),
|
||||
(r"^run_automation$", self.run_automation),
|
||||
(r"^stop_automation$", self.stop_automation),
|
||||
(r"^toggle_pause_automation$", self.toggle_pause_automation),
|
||||
(r"^pause_automation$", self.pause_automation),
|
||||
(r"^toggle_loop_automation$", self.toggle_loop_automation),
|
||||
(r"^print_arguments$", self.print_arguments),
|
||||
(r"^set_the_shader_param_([0-3])_layer_offset_([0-2])_continuous_inverted_example$", self.invert_shader_param_layer)
|
||||
]
|
||||
|
||||
def test_plugin(self):
|
||||
print ("TEST PLUGIN test_plugin CALLED!!")
|
||||
print("TEST PLUGIN test_plugin CALLED!!")
|
||||
# can now access various parts of recur via self.pc
|
||||
|
||||
cycle_count = 0
|
||||
|
||||
def cycle_shaders(self):
|
||||
print ("Cycle shaders!!!")
|
||||
if self.cycle_count>9:
|
||||
print("Cycle shaders!!!")
|
||||
if self.cycle_count > 9:
|
||||
self.cycle_count = 0
|
||||
|
||||
for i,shader in enumerate(self.pc.message_handler.shaders.selected_shader_list):
|
||||
for i, shader in enumerate(self.pc.message_handler.shaders.selected_shader_list):
|
||||
self.pc.actions.call_method_name(
|
||||
"play_shader_%s_%s" % (i, self.cycle_count), None
|
||||
"play_shader_%s_%s" % (i, self.cycle_count), None
|
||||
)
|
||||
self.pc.actions.call_method_name(
|
||||
"start_shader_layer_%s" % i, None
|
||||
"start_shader_layer_%s" % i, None
|
||||
)
|
||||
self.cycle_count += 1
|
||||
|
||||
duration = 5000
|
||||
frequency = 50
|
||||
|
||||
def run_sequence(self, position):
|
||||
self.pc.actions.call_method_name(
|
||||
"set_the_shader_param_3_layer_0_continuous", position
|
||||
@@ -56,7 +59,7 @@ class TestPlugin(ActionsPlugin,SequencePlugin):
|
||||
def invert_shader_param_layer(self, param, layer, value):
|
||||
# invert the value
|
||||
self.pc.actions.call_method_name(
|
||||
"set_the_shader_param_%s_layer_offset_%s_continuous" % ( param, layer), 1.0 - value
|
||||
"set_the_shader_param_%s_layer_offset_%s_continuous" % (param, layer), 1.0 - value
|
||||
# if you were calling an action with no argument, use eg:
|
||||
# "toggle_automation_pause", None
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user