trackteroid
1.0.0
ftrack 쿼리를위한 선언적이고 객체 지향 래퍼. 결과 컬렉션과의 강력한 기능 스타일 상호 작용.
Trackteroid는 미디어 및 엔터테인먼트 산업을 위해 특별히 설계된 프로젝트 관리 및 생산 추적 소프트웨어 인 Ftrack 및 Python API에 의존합니다. 일반적으로 영화, 텔레비전, 애니메이션, 시각 효과 및 게임 분야에서 일반적으로 사용됩니다.
PIP를 사용하여 설치 및 업데이트 :
pip install trackteroidPython API와 직접 상호 작용할 때 발생하는 몇 가지 제한 사항과 과제를 해결하기 위해 Ftrack Python API 주위에 포장 API를 구축하기로 결정했습니다. Ftrack Python API는 많은 유연성을 제공하지만 개발 및 유지 보수를보다 번거롭고 직관적이지 않은 특정 측면이 있습니다. 우리는 포장 API를 만들어 이러한 과제를 극복하고보다 간소화되고 개발자 친화적 인 경험을 제공하는 것을 목표로합니다. 이 결정의 주요 이유는 다음과 같습니다.
단순화 쿼리
쿼리 성능을 최적화합니다
데이터베이스 스키마 복잡성 추상화
결과 컬렉션 향상
현장 접근성 향상
요약에서 Trackeroid는 Ftrack 플랫폼과 상호 작용하는보다 직관적이고 효율적인 방법을 제공하고 궁극적으로 개발을 가속화하고 코드 품질을 개선하며 전반적인 사용자 경험을 향상시켜 개발자에게 권한을 부여하려고합니다.
트레일 테로이드 와 ...
# Calculate and display the total time duration logged for
# AssetBuild types within specified Shots and Folders.
#
# output:
# Found 9 assetbuilds.
# Found 1 assetbuilds with timelogs.
# {16.0: ['Drone Craft'],
# 'No time tracked yet.': ['Drawer Cabinet 01',
# 'Gothic Commode 01',
# 'Shelf 01',
# 'Side Table 01',
# 'Small Wooden Table 01',
# 'Vintage Wooden Drawer 01',
# 'Wooden Table 01',
# 'Wooden Table 02']}
from pprint import pprint
from trackteroid import (
Query ,
AssetBuild ,
Folder ,
Task ,
Project
)
assetbuild_collection = Query ( AssetBuild ).
by_name ( Project , "sync" , "showroom" ).
by_name ( Folder , "Asset%" , "Delivery 3" ).
get_all (
projections = [
Task . Timelog ,
Task . Timelog . duration
]
)
print (
f"Found { len ( assetbuild_collection ) } assets. n "
f"Found { assetbuild_collection . count ( lambda ac : ac . Task . Timelog ) } assetbuilds with timelogs."
)
pprint (
assetbuild_collection . group_and_map (
lambda abc : abc . Task . Timelog . fold (
0 ,
lambda current , tc : current + tc . duration [ 0 ] / 3600
) or "No time tracked yet." ,
lambda abc : abc . sort (
lambda abc : abc . name
). name
)
)... Ftrack Python API 와 대조적으로.
# Calculate and display the total time duration logged for
# AssetBuild types within specified Shots and Folders.
#
# output:
# Found 9 assetbuilds.
# Found 1 assetbuilds with timelogs.
# {16.0: ['Drone Craft'],
# 'No time tracked yet.': ['Drawer Cabinet 01',
# 'Gothic Commode 01',
# 'Shelf 01',
# 'Side Table 01',
# 'Small Wooden Table 01',
# 'Vintage Wooden Drawer 01',
# 'Wooden Table 01',
# 'Wooden Table 02']}
from pprint import pprint
import ftrack_api
session = ftrack_api . Session ( auto_connect_event_hub = False , auto_populate = False )
project_names = ( "sync" , "showroom" )
folder_specific = "Delivery 3"
folder_unspecific = "Asset%"
query = (
f"select id, name, assets.name, parent.name, project.name, "
f"assets.versions.task.timelogs, assets.versions.task.timelogs.duration "
f"from AssetBuild where project has (name in { project_names } ) "
f"and parent[Folder] has (name is ' { folder_specific } ' or name like ' { folder_unspecific } ')"
)
assetbuilds_no_duration = [ "No time tracked yet." , []]
assetbuilds_timelog_duration = [ 0 , []]
assetbuilds = session . query ( query ). all ()
for assetbuild in assetbuilds :
has_duration = False
for asset in assetbuild [ "assets" ]:
for version in asset [ "versions" ]:
durations = [ _ [ "duration" ] for _ in version [ "task" ][ "timelogs" ]]
if any ( durations ):
for duration in durations :
assetbuilds_timelog_duration [ 0 ] += duration / 3600
if not has_duration :
has_duration = True
if has_duration :
assetbuilds_timelog_duration [ 1 ]. append ( assetbuild [ "name" ])
else :
assetbuilds_no_duration [ 1 ]. append ( assetbuild [ "name" ])
print (
f"Found { len ( assetbuilds ) } assetbuilds. n "
f"Found { len ( assetbuilds_timelog_duration [ 1 ]) } assetbuilds with timelogs."
)
assetbuilds_no_duration [ 1 ]. sort ()
assetbuilds_timelog_duration [ 1 ]. sort ()
pprint (
dict (
[ assetbuilds_no_duration , assetbuilds_timelog_duration ]
)
)사용법 세부 정보는 최신 문서를 참조하십시오.