Open12
FlowPT関連

なにもしてないサイト / プロジェクトでも
Demo: Animationでフィルタされているウィジェットが配置されていて、一瞬混乱する

旧ShotGrid Createのステータスのカテゴリー整理は、アプリの管理メニューからアクセスできる

SG Desktopでも各プロジェクトのキャッシュ以下のcfgフォルダに移動して
./tank
でtankコマンドを利用できる。
cfg % ./tank
Welcome to SGTK!
For documentation, see https://developer.shotgridsoftware.com
Starting Toolkit for your current path
'~~~~~/cfg'
- The path is not associated with any PTR object.
- Falling back on default project settings.
- Running as user '~~~~~@~~~~~'
- Using configuration 'Unmanaged' and Core v0.21.8
- Setting the Context to Project test_project.
Type conversion already registered from type QFuture<QString> to type QFuture<void>
- Started Shell Engine version v0.10.1
- Environment:
~~~~~/bundle_cache/app_store/tk-config-basic/v1.7.3/env/project.yml.
The following commands are available:
==================================================
Admin Commands
==================================================
attach_to_core
...
shell engine
tk-shell
>>> import sgtk
>>> sgtk.LogManager().initialize_custom_handler()
<StreamHandler <stderr> (INFO)>
>>> sgtk.LogManager().global_debug = True
>>> authenticator = sgtk.authentication.ShotgunAuthenticator()
>>> user = authenticator.get_user()
>>> mgr = sgtk.bootstrap.ToolkitManager(user)
>>> mgr.plugin_id = "basic.shell"
>>> mgr
<TkManager User ~~~~~@~~~~~
Bundle cache fallback paths []
Caching policy 0
Plugin id basic.shell
Config is None
Base None >
>>> project = {"type": "Project", "id": 999}
>>> mgr.base_configuration = "sgtk:descriptor:app_store?name=tk-config-basic"
>>> engine = mgr.bootstrap_engine("tk-shell", entity=project)
...
[DEBUG sgtk.core.descriptor.io_descriptor.appstore] Downloaded data for 1 versions from Flow Production Tracking.
...
[DEBUG sgtk.core.bootstrap.resolver] Creating Configuration instance from <CachedConfigDescriptor <IODescriptorAppStore sgtk:descriptor:app_store?name=tk-config-basic&version=v1.7.3>>.
[DEBUG sgtk.core.bootstrap.resolver] Configuration root resolved to ~~~~~/Caches/Shotgun/(site)/p999.basic.shell/cfg.
...
[DEBUG sgtk.core.descriptor.io_descriptor.downloadable] Downloading Toolkit App Store Config tk-config-basic v1.7.3 to temporary download path ~~~~~/Caches/Shotgun/bundle_cache/tmp/~~~~~.
...
[DEBUG sgtk.core.bootstrap.cached_configuration] Verifying that all necessary PTR data is available in order for config tk-config-basic v1.7.3 to run...
...
[DEBUG sgtk.core.descriptor.io_descriptor.downloadable] Downloading Toolkit App Store Core v0.21.8 to temporary download path ~~~~~/Caches/Shotgun/bundle_cache/tmp/~~~~~.
...
[DEBUG sgtk.core.util.filesystem] Creating auto-generated config file ~~~~~/Caches/Shotgun/(site)/p999.basic.shell/cfg/config/core/shotgun.yml
...
[DEBUG sgtk.core.bootstrap.configuration_writer] Ending configuration update transaction.
[DEBUG sgtk.core.bootstrap.manager] Progress Report (15%): Starting up Toolkit...
...
coreのswap
[DEBUG sgtk.core.bootstrap.import_handler] Added import handler to sys.meta_path to support core swapping.
...
[DEBUG sgtk.core.bootstrap.import_handler] ...core swap complete.
[DEBUG sgtk.core.bootstrap.import_handler] running explicit 'import tank' to re-initialize new core...
...
[DEBUG sgtk.core.bootstrap.configuration] Core swapped, authenticated user will be set.
[DEBUG sgtk.core.bootstrap.configuration] The project's core supports the authentication module.
[DEBUG sgtk.core.util.user_settings] Reading user settings from /Users/itouhiroyuki/Library/Preferences/Shotgun/toolkit.ini
...
[DEBUG sgtk.core.util.storage_roots] Creating StorageRoots instance from config: ~~~~~/Caches/Shotgun/(site)/p999.basic.shell/cfg/config
...
[DEBUG sgtk.core.util.storage_roots] Created: <StorageRoots folder:'~~~~~/Caches/Shotgun/(site)/p999.basic.shell/cfg/config', roots:''>
...
[DEBUG sgtk.core.platform.environment] Loading environment data from path: ~~~~~/Caches/Shotgun/bundle_cache/app_store/tk-config-basic/v1.7.3/env/site.yml
...
[DEBUG sgtk.core.bootstrap.manager] Progress Report (20%): Downloading tk-shell v0.10.1 (1 of 16)...
...
bundleをいろいろダウンロード
[DEBUG sgtk.core.descriptor.io_descriptor.downloadable] Downloading Toolkit App Store Engine tk-shell v0.10.1 to temporary download path ~~~~~.
...
[DEBUG sgtk.core.bootstrap.manager] Progress Report (24%): Downloading tk-multi-launchapp v0.13.2 (2 of 16)...
...
[DEBUG sgtk.core.bootstrap.manager] Progress Report (28%): Downloading tk-framework-adobe v1.2.7 (3 of 16)...
...
[DEBUG sgtk.core.bootstrap.manager] Progress Report (37%): Downloading tk-framework-shotgunutils v4.4.15 (5 of 16)...
...
[DEBUG sgtk.core.bootstrap.manager] Progress Report (41%): Downloading tk-framework-shotgunutils v5.10.1 (6 of 16)...
...
[DEBUG sgtk.core.bootstrap.manager] Progress Report (46%): Downloading tk-framework-adminui v0.7.7 (7 of 16)...
...
[DEBUG sgtk.core.bootstrap.manager] Progress Report (50%): Downloading tk-framework-widget v1.2.1 (8 of 16)...
...
[DEBUG sgtk.core.bootstrap.manager] Progress Report (55%): Downloading tk-framework-desktopserver v1.7.6 (9 of 16)...
...
...
[DEBUG sgtk.core.bootstrap.manager] Progress Report (85%): Downloading tk-multi-publish2 v2.10.1 (16 of 16)...
[DEBUG sgtk.core.bootstrap.manager] Begin starting up engine tk-shell.
[DEBUG sgtk.core.bootstrap.manager] Progress Report (95%): Resolving context...
...
[DEBUG sgtk.core.bootstrap.manager] Attempting to start engine tk-shell for context <Sgtk Context: Project: {'type': 'Project', 'id': 999, 'name': 'test_project'}
Entity: None
Step: None
Task: None
User: None
PTR URL: https://(site).shotgrid.autodesk.com/detail/Project/999
Additional Entities: []
Source Entity: {'type': 'Project', 'id': 999}>
[DEBUG sgtk.core.log] TK_DEBUG environment variable detected. Enabling debug logging.
[DEBUG sgtk.core.log] Switching file based std logger from 'None' to '~~~~~/tk-shell.log'.
...
[DEBUG sgtk.core.platform.environment] Loading environment data from path: ~~~~~/Caches/Shotgun/bundle_cache/app_store/tk-config-basic/v1.7.3/env/project.yml
...
[DEBUG sgtk.env.project.tk-shell.tk-multi-launchapp] App init: Instantiating <Sgtk App 0x10e5d7d00: tk-multi-launchapp, engine: <Sgtk Engine 0x10da6a7a0: tk-shell, env: project>>
...
[DEBUG sgtk.env.project.tk-shell.tk-framework-shotgunutils] <Sgtk Framework 0x10e49bc40: tk-framework-shotgunutils, engine: <Sgtk Engine 0x10da6a7a0: tk-shell, env: project>>: Initializing...
...
[DEBUG sgtk.env.project.tk-shell.tk-framework-qtwidgets] <Sgtk Framework 0x10e4de2f0: tk-framework-qtwidgets, engine: <Sgtk Engine 0x10da6a7a0: tk-shell, env: project>>: Initializing...
...
[DEBUG sgtk.env.project.tk-shell.tk-framework-shotgunutils] Importing python modules in ~~~~~/tk-framework-shotgunutils/v5.10.1/python...
App ~~~~~/tk-multi-launchapp/v0.13.2 failed to initialize. It will not be loaded: The Flow Production Tracking App you are trying to execute requires a full QT environment in order to render its UI. A valid PySide2/PySide/PyQt installation could not be found in your python system path.
...
[DEBUG sgtk.env.project.tk-shell.tk-multi-publish2] Importing python modules in ~~~~~/tk-multi-publish2/v2.10.1/python...
App ~~~~~/tk-multi-publish2/v2.10.1 failed to initialize. It will not be loaded: The Flow Production Tracking App you are trying to execute requires a full QT environment in order to render its UI. A valid PySide2/PySide/PyQt installation could not be found in your python system path.
...
[DEBUG sgtk.core.bootstrap.manager] Progress Report (100%): Engine launched.
[DEBUG sgtk.core.bootstrap.manager] Default progress callback (1): Engine launched.
tk-shell
>>> engine.name
'tk-shell'
>>> engine.version
'v0.10.1'
>>> engine.display_name
'Flow Production Tracking Engine for the Shell'
>>> engine.description
'Flow Production Tracking Support in a Shell'
>>> engine.documentation_url
'https://help.autodesk.com/view/SGSUB/ENU/?guid=SG_Supervisor_Artist_sa_integrations_sa_integrations_user_guide_html'
>>> engine.has_ui
False
>>> engine.host_info
{'name': 'Python', 'version': '3.10.8'}
>>> engine.descriptor
<EngineDescriptor <IODescriptorAppStore sgtk:descriptor:app_store?name=tk-shell&version=v0.10.1>>
>>> engine.get_env()
<Sgtk Environment ~~~~~/bundle_cache/app_store/tk-config-basic/v1.7.3/env/project.yml>
>>> engine.environment
{'name': 'project', 'description': 'Toolkit configuration to be loaded whenever an association with a project has been established.', 'disk_location': '~~~~~/bundle_cache/app_store/tk-config-basic/v1.7.3/env/project.yml'}
>>> engine.disk_location
'~~~~~/bundle_cache/app_store/tk-shell/v0.10.1'
>>> engine.context
<Sgtk Context: Project: {'type': 'Project', 'id': 999, 'name': 'test_project'}
Entity: None
Step: None
Task: None
User: None
PTR URL: https://(site).shotgrid.autodesk.com/detail/Project/999
Additional Entities: []
Source Entity: {'type': 'Project', 'id': 999}>
>>> engine.get_project_cache_location(999)
'~~~~~/Caches/Shotgun/(site)/p999.basic.shell/tk-shell'
>>> engine.apps
{}
>>> engine.frameworks
{}
>>> engine.settings
{}
>>> engine.get_debug_tracked_qt_widgets()
{}
contextがNoneなのが多いのはわかるけどUserまで空になってるのは? < connection切れてた
>>> sgtk
<module 'tank' from '~~~~~/(site)/p999.basic.desktop/cfg/install/core/python/tank/__init__.py'>
>>> engine.sgtk
<Sgtk Core v0.21.8@0x10e2f38b0 Config ~~~~~/(site)/p999.basic.shell/cfg>
>>> engine.context
<Sgtk Context: Project: {'type': 'Project', 'id': 999, 'name': 'test_project'}
...
Source Entity: {'type': 'Project', 'id': 999}>
>>> engine.shotgun
<tank.authentication.shotgun_wrapper.ShotgunWrapper object at 0x10e2f0a90>
>>> engine.shotgun.find('Project',[['id','is',999]],['name'])
[{'type': 'Project', 'id': 999, 'name': 'test_project'}]
>>> engine.commands.keys()
dict_keys(['Open Log Folder'])
Projectコンテキストにいるからできることが少ない
フィールドの型のドキュメント
期間(Duration)の単位はサイト基本設定で変更可能(何もしなければ「日」。1と打ったら「1日」)
レンダーファームの稼働ログをFlowPTに蓄積・視覚化することを考える
(メリット:Monitor上では作業者がジョブ管理しやすいよう、サブミットしたジョブは任意に削除できた方がいい。ただそれだとあとでレンダリング所要時間の集計などができないが、稼働ログは別場所に蓄積すれば集計可能。蓄積すればコスト把握の資料になる)
カスタムエンティティを設置

ログをとりたいフィールドを追加

グラフ化するとこんな感じ?

todo:
- レンダーファーム側のタスク終了イベントに、FlowPTへのcreateスクリプトを追加
- プロジェクト欄の活用(案件ごとのコスト把握)
- ステータス欄の活用(completeなのか、エラーなのか、中断なのか)
- なにを視覚化すべきかを策定(どう視覚化したら何が明らかになるのか)
- カスタムエンティティもう一つ使ってJOBに関する値はそちらに持たせるようにする。Render TaskはJOBエンティティでグルーピングする。
- いわゆるランチャーからの起動で環境設定している場合、タスクとの紐付きも得られるはずなので、タスクとリンクするエンティティフィールドも足す?