From b840fca4deb61aac117641bd38c77f1934aebd97 Mon Sep 17 00:00:00 2001 From: Ondrej Samohel Date: Tue, 29 Oct 2019 12:10:50 +0100 Subject: [PATCH] added loader for matchmove family in NUke --- pype/plugins/nuke/load/load_matchmove.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pype/plugins/nuke/load/load_matchmove.py diff --git a/pype/plugins/nuke/load/load_matchmove.py b/pype/plugins/nuke/load/load_matchmove.py new file mode 100644 index 0000000000..2ce4b75662 --- /dev/null +++ b/pype/plugins/nuke/load/load_matchmove.py @@ -0,0 +1,24 @@ +from avalon import api + + +class MatchmoveLoader(api.Loader): + """ + This will run matchmove script to create track in script. + """ + + families = ["rendersetup"] + 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: + self.log.error("Unsupported script type") + + return True