ayon-core/pype/plugins/nuke/load/load_matchmove.py
Jakub Jezek b0da1c9013
fix(nuke: removing annoying message window
happened every time log.error happened
2020-01-28 15:07:37 +01:00

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