Open kimkyuseok opened 6 months ago
# 프로젝트 이름
project_name = "moe"
# ShotGrid에서 프로젝트 정보 가져오기
project = sg.find_one("Project", [["name", "is", project_name]])
if project:
project_id = project['id']
filters = [
#['event_type', 'is', 'Summary'],
['project', 'is', {'type': 'Project', 'id': project_id}]
]
fields = [
"id",
"event_type",
"attribute_name",
"meta",
"entity",
"user",
"project",
"session_uuid",
"created_at",
]
#order = [{"column": "id", "direction": "asc"}]
order = [{"column": "id", "direction": "desc"}]
EventLogEntryA = sg.find("EventLogEntry", filters, fields, order, limit=10)
for i in EventLogEntryA:
print(i)
else:
print("Project not found:", project_name)
# 프로젝트 이름
project_name = "moe"
# ShotGrid에서 프로젝트 정보 가져오기
project = sg.find_one("Project", [["name", "is", project_name]])
if project:
project_id = project['id']
# 필터에 사용할 유저 정보 찾기
user = sg.find_one("HumanUser", [["name", "is", "김혜강"]])
if user:
user_id = user['id']
filters = [
#['event_type', 'is', 'Summary'],
['project', 'is', {'type': 'Project', 'id': project_id}],
['user', 'is', {'type': 'HumanUser', 'id': user_id}]
]
fields = [
"id",
"event_type",
"attribute_name",
"meta",
"entity",
"user",
"project",
"session_uuid",
"created_at",
]
order = [{"column": "id", "direction": "desc"}]
EventLogEntryA = sg.find("EventLogEntry", filters, fields, order, limit=10)
for event in EventLogEntryA:
print(event)
else:
print("User not found: 김혜강")
else:
print("Project not found:", project_name)