Skip to content

Instantly share code, notes, and snippets.

@yamadaaaaaaa
Created June 8, 2018 00:06
Show Gist options
  • Save yamadaaaaaaa/f7853b5611f49e3cbd0a2ac909ecee2a to your computer and use it in GitHub Desktop.
Save yamadaaaaaaa/f7853b5611f49e3cbd0a2ac909ecee2a to your computer and use it in GitHub Desktop.
SG_sample4
# -*- coding: utf-8 -*-
import shotgun_api3
sg = shotgun_api3.Shotgun('https://test.shotgunstudio.com', script_name='test_tool', api_key='0a1b2c3d4e5f9g7h8i9j')
# 先ず指定プロジェクトを取得
project = sg.find_one('Project', [['name', 'is', "testProject"]]) # プロジェクト名:例ではtestProject
# project = {'type': 'Project', 'id': 000}
# Assetエンティティの各アイテムIDリストを取得
result = sg.find("Asset", [['project', 'is', project]])
print(result)
sg.close()
# result
# [{'type': 'Asset', 'id': 10000}, {'type': 'Asset', 'id': 10001}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment