get_client_dir

get_client_dir(snapshot_code, file_type='main', mode='client_repo')

Get a dir segment from a snapshot

param:

snapshot_code - the unique code 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 - directory segment for a snapshot and file type

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'))

Then, on a Windows client, get_client_dir() will return:

        T:/assets/sample3d/asset/chr/chr003/scenes