Definitions of tool action plugins and the register_manager_action function

This commit is contained in:
wijnand 2018-04-25 16:53:21 +02:00
parent cd10166f1c
commit b80eb38199

View file

@ -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)