Bases: LoaderPlugin
This will run matchmove script to create track in script.
Source code in client/ayon_nuke/plugins/load/load_matchmove.py
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32 | class MatchmoveLoader(load.LoaderPlugin):
"""
This will run matchmove script to create track in script.
"""
product_types = {"matchmove"}
representations = {"*"}
extensions = {"py"}
settings_category = "nuke"
defaults = ["Camera", "Object"]
label = "Run matchmove script"
icon = "empire"
color = "orange"
def load(self, context, name, namespace, data):
path = self.filepath_from_context(context)
if path.lower().endswith(".py"):
exec(open(path).read())
else:
msg = "Unsupported script type"
self.log.error(msg)
nuke.message(msg)
return True
|