get_path_from_snapshot
get_path_from_snapshot(snapshot_code, file_type='main', mode='client_repo')
Get a full path from a snapshot
param:
snapshot_code - the unique code / search_key of the snapshot
keyparam:
file_type - each file in a snapshot is identified by a file type.
This parameter specifies which type. Defaults to 'main'
mode - Forces the type of folder path returned to use the value from the
appropriate tactic_<SERVER_OS>-conf.xml configuration file.
Values include 'lib', 'web', 'local_repo', 'sandbox', 'client_repo', 'relative'
lib = the NFS asset directory from the server point of view
web = the http asset directory from the client point of view
local_repo = the local sync of the TACTIC repository
sandbox = the local sandbox (work area) designated by TACTIC
client_repo (default) = the asset directory from the client point of view
If there is no value for win32_client_repo_dir or linux_client_repo_dir
in the config, then the value for asset_base_dir will be used instead.
relative = the relative direcory without any base
return:
string - the directory to copy a file to handoff to Tactic without having to
go through http protocol
example:
If the tactic_<SERVER_OS>-conf.xml configuration file contains the following:
<win32_client_repo_dir>T:/assets</win32_client_repo_dir>
and if the call to the method is as follows:
snapshot = server.create_snapshot(search_key, context)
code = snapshot.get('code')
server.get_path_from_snapshot(snapshot.get('code'))
# in a trigger
snapshot_key = my.get_input_value("search_key")
server.get_path_from_snapshot(snapshot_key)
Then, on a Windows client, get_path_from_snapshot() will return:
T:/assets/sample3d/asset/chr/chr003/scenes/chr003_rig_v003.txt