mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
27 lines
606 B
Python
27 lines
606 B
Python
from avalon import api
|
|
import nuke
|
|
|
|
|
|
class MatchmoveLoader(api.Loader):
|
|
"""
|
|
This will run matchmove script to create track in script.
|
|
"""
|
|
|
|
families = ["matchmove"]
|
|
representations = ["py"]
|
|
defaults = ["Camera", "Object"]
|
|
|
|
label = "Run matchmove script"
|
|
icon = "empire"
|
|
color = "orange"
|
|
|
|
def load(self, context, name, namespace, data):
|
|
if self.fname.lower().endswith(".py"):
|
|
exec(open(self.fname).read())
|
|
|
|
else:
|
|
msg = "Unsupported script type"
|
|
self.log.error(msg)
|
|
nuke.message(msg)
|
|
|
|
return True
|