def execute(self):
for container in self.files:
operation = container['operation'].value()
file_path = container['file_path'].get_path()
namespace = container['namespace'].value()
flag = 'i' if operation == Component.import_operation else 'r'
kwargs = {
flag: True,
'type': {
'.ma': 'mayaAscii',
'.mb': 'mayaBinary',
'.fbx': 'FBX',
}[os.path.splitext(file_path.lower())[-1]]
}
if namespace:
kwargs['namespace'] = namespace
cmds.file(file_path, **kwargs)
评论列表
文章目录