登录sg
def get_version(shot_name, step_name, ):
sg = shotgun_api3.Shotgun("https://xinglian.shotgunstudio.com",
login="user",
password="password")
Project = sg.find('Project', [['name', 'is', 'WTS']])
shot = sg.find('Shot', [['project', 'is', Project], ['code', 'is', shot_name]])
step = sg.find('Step', [['id', 'is', 8]], ['code'])
task = sg.find('Task', [['step.', 'is', step], ['entity', 'is', shot], ['content', 'is', 'cmp']])
version = sg.find("Version", [['project', 'is', Project], ['entity', 'is', shot], ['sg_task', 'is', task]], ['code'])
if version:
return sorted([j['code'] for j in version])[-1]
else:
return
for i in shots:
print(get_version(i))