Download¶
Download models.
Including download, automatic download (the task is fully rendered, one frame is downloaded after downloading one frame), download so the un-downloaded task is recorded (the task is rendered).
-
class
rayvision_sync.download.
RayvisionDownload
(api, transports_json='', transmitter_exe='', automatic_line=True, internet_provider='', logger=None, log_folder=None, log_name=None, log_level='DEBUG')¶ Bases:
object
Downloader.
Download all the passed tasks by calling the cmd command.
-
auto_download
(task_id_list=None, max_speed=None, print_log=False, sleep_time=10, download_filename_format='true', local_path=None, engine_type='aspera', server_ip=None, server_port=None, network_mode=0, is_test_stop=False)¶ Automatic download (complete one frame download).
Wait for all downloads to update undownloaded records.
Parameters: - task_id_list (list of int) – List of tasks ids that need to be downloaded.
- max_speed (str, optional) – Download speed limit, The unit of ‘max_speed’ is KB/S,default value is 1048576 KB/S, means 1 GB/S.
- print_log (bool, optional) – Print log, True: print, False: not print.
- sleep_time (int, optional) – Sleep time between download, unit is second.
- download_filename_format – File download local save style, “true”: tape task ID and scene name, “false” : download directly without doing processing.
- local_path (str) – Download file locally save path, default Window system is “USERPROFILE” environment variable address splicing “renderfarm_sdk”, Linux system is “HOME” environment variable address splicing “renderfarm_sdk”.
- engine_type (str, optional) – set engine type, support “aspera” and “raysyncweb”, Default “aspera”.
- server_ip (str, optional) – transmit server host, if not set, it is obtained from the default transport profile.
- server_port (str, optional) – transmit server port, if not set, it is obtained from the default transport profile.
- network_mode (int) – network mode: 0: auto selected, default, 1:tcp 2:udp
Returns: True is success.
Return type:
-
auto_download_after_task_completed
(task_id_list=None, max_speed=None, print_log=True, sleep_time=10, download_filename_format='true', local_path=None, engine_type='aspera', server_ip=None, server_port=None, network_mode=0)¶ Auto download after the tasks render completed.
Parameters: - task_id_list (list of int) – List of tasks ids that need to be downloaded.
- max_speed (str, optional) – Download speed limit, The unit of ‘max_speed’ is KB/S,default value is 1048576 KB/S, means 1 GB/S.
- print_log (bool, optional) – Print log, True: print, False: not print.
- sleep_time (int, optional) – Sleep time between download, unit is second.
- download_filename_format – File download local save style, “true”: tape task ID and scene name, “false” : download directly without doing processing.
- local_path (str) – Download file locally save path, default Window system is “USERPROFILE” environment variable address splicing “renderfarm_sdk”, Linux system is “HOME” environment variable address splicing “renderfarm_sdk”.
- engine_type (str, optional) – set engine type, support “aspera” and “raysyncweb”, Default “aspera”.
- server_ip (str, optional) – transmit server host, if not set, it is obtained from the default transport profile.
- server_port (str, optional) – transmit server port, if not set, it is obtained from the default transport profile.
- network_mode (int) – network mode: 0: auto selected, default; 1: tcp; 2: udp;
Returns: True is success.
Return type:
-
static
check_params
(task_id_list, custom_server_output_path)¶ Check the parameters.
Task_id_list and custom_server_output_path must have one.
-
download
(task_id_list=None, max_speed=None, print_log=True, download_filename_format='true', local_path=None, server_path=None, engine_type='aspera', server_ip=None, server_port=None, network_mode=0)¶ Download and update the undownloaded record.
Parameters: - task_id_list (list of int) – List of tasks ids that need to be downloaded.
- max_speed (str, optional) – Download speed limit,
The unit of
max_speed
is KB/S,default value is 1048576 KB/S, means 1 GB/S. - print_log (bool, optional) – Print log, True: print, False: not print.
- download_filename_format – File download local save style, “true”: tape task ID and scene name, “false” : download directly without doing processing.
- local_path (str) – Download file locally save path, default Window system is “USERPROFILE” environment variable address splicing “renderfarm_sdk”, Linux system is “HOME” environment variable address splicing “renderfarm_sdk”,
- server_path (str or list) – The user customizes the file structure to be downloaded from the output server, and all file structures are downloaded by default, example: “18164087_test/l_layer”.
- engine_type (str, optional) – set engine type, support “aspera” and “raysyncweb”, Default “aspera”.
- server_ip (str, optional) – transmit server host, if not set, it is obtained from the default transport profile.
- server_port (str, optional) – transmit server port, if not set, it is obtained from the default transport profile.
- network_mode (int) – network mode: 0: auto selected, default; 1: tcp; 2: udp;
Returns: True is success.
Return type:
-