mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
added loader for matchmove family
This commit is contained in:
parent
00d3bbc878
commit
c234e332f8
1 changed files with 30 additions and 0 deletions
30
pype/plugins/maya/load/load_matchmove.py
Normal file
30
pype/plugins/maya/load/load_matchmove.py
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
from avalon import api
|
||||
from maya import mel
|
||||
|
||||
|
||||
class MatchmoveLoader(api.Loader):
|
||||
"""
|
||||
This will run matchmove script to create track in scene.
|
||||
|
||||
Supported script types are .py and .mel
|
||||
"""
|
||||
|
||||
families = ["rendersetup"]
|
||||
representations = ["py", "mel"]
|
||||
defaults = ["Camera", "Object", "Mocap"]
|
||||
|
||||
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())
|
||||
|
||||
elif self.fname.lower().endswith(".mel"):
|
||||
mel.eval('source "{}"'.format(self.fname))
|
||||
|
||||
else:
|
||||
self.log.error("Unsupported script type")
|
||||
|
||||
return True
|
||||
Loading…
Add table
Add a link
Reference in a new issue