mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
Definitions of tool action plugins and the register_manager_action function
This commit is contained in:
parent
cd10166f1c
commit
b80eb38199
1 changed files with 29 additions and 0 deletions
29
colorbleed/manager_actions.py
Normal file
29
colorbleed/manager_actions.py
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue