Created
June 8, 2018 00:06
-
-
Save yamadaaaaaaa/f7853b5611f49e3cbd0a2ac909ecee2a to your computer and use it in GitHub Desktop.
SG_sample4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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