From b80eb38199b99643345fcb4b1bac697e14ce0e77 Mon Sep 17 00:00:00 2001 From: wijnand Date: Wed, 25 Apr 2018 16:53:21 +0200 Subject: [PATCH] Definitions of tool action plugins and the register_manager_action function --- colorbleed/manager_actions.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 colorbleed/manager_actions.py diff --git a/colorbleed/manager_actions.py b/colorbleed/manager_actions.py new file mode 100644 index 0000000000..02ff3ce610 --- /dev/null +++ b/colorbleed/manager_actions.py @@ -0,0 +1,29 @@ +from avalon import api, pipeline + + +class FusionSelectContainer(api.ToolAction): + + label = "Select Container" + icon = "object-group" + hosts = ["fusion"] + tools = ["manager"] + + def process(self, items): + + import avalon.fusion + + tools = [i["_tool"] for i in items] + + comp = avalon.fusion.get_current_comp() + flow = comp.CurrentFrame.FlowView + + # Clear selection + flow.Select() + + # Select tool + for tool in tools: + flow.Select(tool) + + +def register_manager_actions(): + pipeline.register_plugin(api.ToolAction, FusionSelectContainer)