Welcome to use FoxRenderFarm SDK!¶
RenderBus at a glance¶
Overview¶
We provide a simple Python rendering SDK to make use of our cloud rendering service easily; This official rendering SDK is developed and maintained by RD and TD groups of RENDERBUS; This rendering SDK has been tested on python2.7 and python3.6;
Why to use the rendering SDK?¶
1. Automation. The SDK automates the process of using the cloud rendering service (analysing scens, uploading assets, rendering, downloading, etc). Users can integrate the modules to there own workflow(such as DeadLine, Qube, etc).
2. Open source. Users can customize the codes or submit development suggestions.
3. Cross-version. Python2 and python3 are both supported.
4. Cross-platform. Windows and Linux are both supported(rayvision_sync only supports Windows and Centos7 and above).
5. Security. Dynamic signature algorithm authentication (HmacSHA256 + Base64 + UTC timestamp time-limited authentication + random number to prevent replay attacks) adopted, more secure.
6. Provide a variety of invoking ways. Support local and remote analysis.
7. Independence. Isolate the API functions, easily expanding.
8. Complete Documentation.
Supported software¶
- Maya
- Houdini
- Clarisse
- 3ds Max
- Katana
- Arnorld Standalone
Note
If the user analyzes the scene by himself, the theory can also support rendering software such as Blender, c4d, Arnold Standalone, and KeyShot.
Preparation¶
- An account of RENDERBUS
- Apply to use the render SDK from RENDERBUS Developer Center and get the AccessID and AccessKey
Installation¶
Refer to Installation Guide
Get started¶
Refer to SDK Getting Started Tutorial
Parameter setting¶
Refer to Detailed parameters configuration
More¶
Important
Make sure local Python environment and PIP are available before use.
Installation Guide¶
Method One (recommended):
Note
Users who have limited access to the Python official address network can download and install from our custom server。
Download from Python official pypi (recommended)
pip install rayvision_maya
pip install rayvision_clarisse
pip install rayvision_houdini
Install from a custom PIP server
Before using specific rendering modules, such as Houdini rendering, please refer to the following installation method to install the modules in turn rayvision_log, rayvision_api , rayvision_utils , rayvision_sync,
Method Two:
Download source code directly from GitHub:
git clone https://github.com/foxrenderfarm/rayvision_log.git
git clone https://github.com/foxrenderfarm/rayvision_api.git
git clone https://github.com/foxrenderfarm/rayvision_utils.git
git clone https://github.com/foxrenderfarm/rayvision_sync.git
other modules are installed similarly to the secondary installation method
SDK tutorial¶
I. Login authentication¶
render_para = {
"domain": "jop.foxrenderfarm.com", # If it doesn't work, you can use "task.foxrenderfarm.com"
"platform": "2",
"access_id": "xxxx",
"access_key": "xxxx",
}
api = RayvisionAPI(
access_id=render_para['access_id'],
access_key=render_para['access_key'],
domain=render_para['domain'],
platform=render_para['platform']
)
RayvisionAPI Parameters:
Parameters | Type | Required | Default | Description |
---|---|---|---|---|
domain | string | Y | task.renderbus.com | China user:task.renderbus.com,Foreign user:jop.foxrenderfarm.com |
platform | string | Y | 2 | platform ID,example: W2:"2", W6/qingyun:"6", GPU Region 1:"21" |
access_id | string | Y | user authorization id | |
access_key | string | Y | user authorization key |
II. Analysis of the scene¶
Analysis is independent(Maya / Houdini / Clarisse)
Example for Houdini:
from rayvision_houdini.analyze_houdini import AnalyzeHoudini
analyze_info = {
"cg_file": r"D:\files\CG FILE\flip_test_slice4.hip",
"workspace": "c:/workspace",
"software_version": "17.5.293",
"project_name": "Project1",
"plugin_config": {
'renderman': '22.6'
}
}
analyze_obj = AnalyzeHoudini(**analyze_info)
analyze_obj.analyse()
Instructions:
“workspace” is used to control the location of the generated json file. If workspace is not set, the default location is generated:
windows : os.environ["USERPROFILE"] + "renderfarm_sdk" Linux:os.environ["HOME"] + “renderfarm_sdk”
Analytically generated task.json is no “task_id”、“user_id”、”project_id” parameters,Users can choose to write the three parameters themselves, or to write the three parameters automatically when check.
AnalyzeHoudini Parameters:
Parameters | Type | Required | Default | Description |
---|---|---|---|---|
cg_file | string | Y | Scenario files to analyze | |
software_version | string | Y | The version of the software | |
project_name | string | N | The project name | |
plugin_config | dict | N | The plug-in configuration,example {'renderman': '22.6'} | |
workspace | string | N | None | Analyze the location of the generated json file (avoiding duplication automatically adds a timestamp folder) |
III. Add special fields and update the json file interface¶
Only updates and modifications to the parameters of task.json and upload.json files are supported.
1. Modify the task.json¶
update_task_info(update_info, task_path)
task_info
from rayvision_api.utils import update_task_info, append_to_task, append_to_upload
update_task = {
"pre_frames": "100", # Sets the priority to render the first frame
"stop_after_test": "1" # Stop rendering after rendering the priority frame
}
update_task_info(update_task, analyze_obj.task_json)
2. task.json add custom parameters¶
The added custom parameters will be integrated into dictionary for key is “additional_info”. 【Warning】:Custom parameters will not take effect immediately. If you have this requirement, please contact our customer service。
additional_info
custom_info_to_task = {
"env": "houdini_env"
}
append_to_task(custom_info_to_task, analyze_obj.task_json)
3. user custom upload.json¶
Support custom add file path to upload.json, will automatically deduplicateappend_to_upload(files_paths, upload_path)
upload
custom_info_to_upload = [
r"D:\houdini\CG file\Cam003\cam.abc",
]
append_to_upload(custom_info_to_upload, analyze_obj.upload_json)
IV. Validate json file¶
When validating, we check whether there is’ user_id ‘, ‘project_id’, ‘task_id’ in task.json, If not, the interface is called to fetch the relevant parameters from the server and write task.json
check_obj = RayvisionCheck(api, analyze_obj)
task_id = check_obj.execute(analyze_obj.task_json, analyze_obj.upload_json)
V. Upload¶
Now there are two ways:
1.Upload the json file first and then upload the resource file according to “upload.json”:¶
Four json files are uploaded, and the transfer engine automatically starts uploading the scene, resource, and other files based on the upload.json file.
upload(self,task_id,task_json_path,tips_json_path,asset_json_path,upload_json_path, max_speed=None)
CONFIG_PATH = [
r"C:\workspace\work\tips.json",
r"C:\workspace\work\task.json",
r"C:\workspace\work\asset.json",
r"C:\workspace\work\upload.json",
]
upload_obj = RayvisionUpload(api)
upload_obj.upload(str(task_id), *CONFIG_PATH)
2.Uploading json files is completely independent of the user resources:¶
Uploading resources:upload_asset(self, upload_json_path, max_speed=None, is_db=True)
Upload json file: upload_config(self, task_id, config_file_list, max_speed=None)
CONFIG_PATH = [
r"C:\workspace\work\tips.json",
r"C:\workspace\work\task.json",
r"C:\workspace\work\asset.json",
]
UPLOAD = RayvisionUpload(api)
UPLOAD.upload_asset(r"C:\workspace\work\upload.json", is_db=False)
UPLOAD.upload_config("5165465", CONFIG_PATH)
【Warning】:You need a task ID to upload a json file, but you don’t need a task ID to upload a resource file;The ‘is_db’ parameter in upload_asset is used to control whether or not a local database is needed. By default, a local database is used;
VI. Submit Task¶
api.submit(int(task_id))
VIII. Download¶
Download now provides 3 ways:
1. Supports custom downloads of hierarchical directory structures under each rendering task.¶
download(self, task_id_list=None, max_speed=None, print_log=True, download_filename_format="true",local_path=None, server_path=None)
download = RayvisionDownload(api)
download.download(download_filename_format="true", server_path="18164087_muti_layer_test/l_ayer2")
Warning:This method needs to provide the task ID if the “server_path” is not empty, and the task ID does not take effect if there is a custom “server_path”.
2. Realtime download, that is, the task rendering completed a frame began to download¶
auto_download(self, task_id_list=None, max_speed=None, print_log=False, sleep_time=10, download_filename_format="true", local_path=None)
download = RayvisionDownload(api)
download.auto_download([18164087], download_filename_format="false")
Warning:The method task ID cannot be empty
3. The task is not downloaded until all frames are rendered¶
auto_download_after_task_completed(self, task_id_list=None, max_speed=None, print_log=True, sleep_time=10, download_filename_format="true", local_path=None):
download = RayvisionDownload(api)
download.auto_download_after_task_completed([18164087], download_filename_format="false")
Warning: The method task ID cannot be empty
IX. Attachment: transfer configuration file¶
1. Transport configuration Settings include:
Select database type, database file path Settings, transfer log path Settings
2. The transport configuration file used by default: db_config.ini, The following figure
db_config.ini
db_config.ini:
[TRANSFER_LOG_PATH]
transfer_log_path =
[DATABASE_CONFIG]
on = true
type = sqlite
db_path =D:\test\upload
[REDIS]
host = 127.0.0.1
port = 6379
password =
table_index = 0
timeout = 5000
[SQLITE]
temporary = false
The user can also modify the configuration for the template based on the default configuration and specify the database configuration file location, specifying a custom configuration file as follows.
from rayvision_sync.upload import RayvisionUpload
UPLOAD = RayvisionUpload(api, db_config_path=r"D:\test\upload\db_config.ini")
3. db_config.ini Parameters:
Parameters | instructions | Default |
---|---|---|
transfer_log_path | Transfer engine log file path | |
on | Whether to use a local database, true / false: Yes / No | true |
type | Select database,currently only supports "redis" and "sqlite" | sqlite |
db_path | The database file saves the path | |
host | redis database host | 127.0.0.1 |
port | redis database port | 6379 |
password | redis database password | |
table_index | Redis Repositories,cannot be empty | |
timeout | Redis client connection timeout,unit ms | 5000 |
temporary | When using sqlite database, if the uploaded record data is deleted after the completion of the upload, the default "false" will not be deleted | false |
4. transfer_log_path and db_path The priority rule for values is as follows:
db_config.ini custom paths are preferred if they are set;
No custom path is as follows:
transfer_log_path
Use environment variables first ‘RAYVISION_LOG’
Second use:
window: The environment variable “USERPROFILE”/<renderfarm_sdk>Linux: The environment variable “HOME” /<renderfarm_sdk>
db_path
Use environment variables first ‘RAYVISION_LOG’
Second use:
window: The environment variable “USERPROFILE”/<renderfarm_sdk>Linux:The environment variable “HOME” /<renderfarm_sdk>
Rayvision Api¶
Note
API entry function module
Note
task is mainly used to verify the analysis results and to configure some initial task information.
Note
Set option for asset and general configuration of the task.
RayvisionTask¶
Note
operators is mainly used for calling the rendering interface.
Environment setting and calling the rendering platform service interface.
RenderEnv¶
Set the rendering environment configuration.
-
class
rayvision_api.operators.env.
RenderEnvOperator
(connect)¶ Bases:
object
The rendering environment configuration.
-
add_render_env
(data)¶ Adjust user rendering environment configuration.
Parameters: data (dict) – Rendering environment configuration. e.g.:
- {
- ‘cgId’: “2000”, ‘cgName’: ‘Maya’, ‘cgVersion’: ‘2018’, ‘renderLayerType’: 0, ‘editName’: ‘tests’, ‘renderSystem’: 1, ‘pluginIds’: [2703]
}
Returns: - Render env info.
- e.g.:
- {
- ‘editName’: ‘tests’
}
Return type: dict
-
delete_render_env
(edit_name)¶ Delete user rendering environment configuration.
Parameters: edit_name (str) – Rendering environment custom name.
-
get_render_env
(name=None, cg_names=None, os_name=1)¶ Get the user rendering environment configuration.
Parameters: Returns: - Software info.
- e.g.:
- [
- {
“cgId”: 2000, “editName”: “testRenderEnv332”, “cgName”: “Maya”, “cgVersion”: “2020”, “osName”: 0, “renderLayerType”: 0, “isDefault”: 0, “respUserPluginInfoVos”: [
- {
“pluginId”: 1166, “pluginName”: “wobble”, “pluginVersion”: “wobble 0.9.5”
}
]
}, {
”cgId”: 2000, “editName”: “testRenderEnv222”, “cgName”: “Maya”, “cgVersion”: “2020”, “osName”: 0, “renderLayerType”: 0, “isDefault”: 0, “respUserPluginInfoVos”: [
- {
“pluginId”: 1166, “pluginName”: “wobble”, “pluginVersion”: “wobble 0.9.5”
}
]
Return type:
-
Query¶
API query operation.
-
class
rayvision_api.operators.query.
QueryOperator
(connect)¶ Bases:
object
API query operation.
-
all_frame_status
()¶ Get the overview of task rendering frame.
Returns: - Frames status info.
- e.g.:
- {
- “executingFramesTotal”: 1, “doneFramesTotal”: 308, “failedFramesTotal”: 2, “waitingFramesTotal”: 153, “totalFrames”: 577
}
Return type: dict
-
error_detail
(code=None, codes=None, language=0)¶ Get analysis error code.
Parameters: - code (string) –
Required value, error code. e.g.:
10010. 15000. - codes (list for int) – error codes
- language (int, optional) – Not required, language, 0: Chinese (default) 1: English.
Returns: - Detailed list of error messages.
- e.g.:
- [
- {
“id”: 5, “code”: “15000”, “type”: 1, “languageFlag”: 0, “desDescriptionCn”: “启动 3ds max 卡住或者失败”, “desSolutionCn”: “1.检查启用对应版本的 3ds max
是否有特殊弹窗,有的话手动关闭;n2.检查操作系 统是否设置了高级别的权限”,
- ”solutionPath”: “
http://note.youdao.com/noteshare?id=d8f1ea0c46dfb524af798f6b1d31cf6f”,
”isRepair”: 0, “isDelete”: 1, “isOpen”: 1, “lastModifyAdmin”: “”, “updateTime”: 1534387709000
},
]
Return type: - code (string) –
-
get_all_frames
(task_id, start_page=1, end_page=2000, page_size=100)¶ Gets all frame details for the specified task.
Parameters: Returns (dict): all frames detail info.
-
get_custome_frames
(task_id, restartframes)¶ Retrieves the frame of the specified task according to the frame。
Parameters:
-
get_frame_thumbnall
(frame_id, frame_status=4)¶ Load thumbnail.
Parameters: Returns: - Thumbnail path.
- Example:
- [
“small_pic100000100001138Render_264_renderbus_0008[-]jpg.jpg”
]
Return type:
-
get_raysync_user_key
()¶ Get the user rendering environment configuration.
Returns: - User login raysync information.
- Example:
- {
- ‘raySyncUserKey’: ‘8ccb94d67c1e4c17fd0691c02ab7f753cea64e3d’, ‘userName’: ‘test’, ‘platform’: 2,
}
Return type: dict
-
get_task_list
(page_num=1, page_size=100, status_list=None, search_keyword=None, start_time=None, end_time=None)¶ Get task list.
An old to the new row, the old one.
Parameters: - page_num (int) – Required value, current page.
- page_size (int) – Required value, numbers displayed per page.
- status_list (list<int>) – status code list,query the status of the task in the list.
- search_keyword (string) – Optional, scenario name or job ID.
- start_time (string) – Optional, search limit for start time.
- end_time (string) – Optional, search limit for end time.
Returns: - Task info, please see the documentation for details.
- e.g.:
- {
“pageCount”: 32, “pageNum”: 1, “total”: 32, “size”: 1, “items”: [
- {
“sceneName”: “衣帽间.max”, “id”: 18278, “taskAlias”: “P18278”, “taskStatus”: 0, “statusText”: “render_task_status_0”, “preTaskStatus”: 25, “preStatusText”: “render_task_status_25”, “totalFrames”: 0, “abortFrames”: null, “executingFrames”: null,
},
]
}
Return type:
-
get_task_processing_img
(task_id, frame_type=None)¶ Get the task progress diagram,currently only Max software is supported.
Parameters: - Returns: Task progress diagram information
- dict:
- Example:
- {
“block”:16, “currentTaskType”:”Render”, “grabInfo”:[
- [
- {
- “couponFee”:”0.00”, “frameIndex”:”0”, “renderInfo”:””, “frameBlock”:”1”, “frameEst”:”0”, “grabUrl”:”/mnt/output/d20/small_pic/10001500/10001834/389406/Render_2018110900083_0_frame_0[_]block_0[_]_STP00000_Renderbus_0000[-]tga.jpg”, “feeAmount”:”0.20”, “frameUsed”:”66”, “frameStatus”:”4”, “framePercent”:”100”, “isMaxPrice”:”0”, “startTime”:”2018-11-09 18:28:26”, “endTime”:”2018-11-09 18:29:32”
}
]
], “height”:1500, “sceneName”:”com_589250.max-Camera007”, “startTime”:”2018-11-09 18:27:40”, “width”:2000
}
-
get_transfer_server_msg
()¶ Get the user rendering environment configuration.
Returns: - Connect raysync information.
- Example:
- {
- ‘raysyncTransfer’: {
- ‘port’: 2542, ‘proxyIp’: ‘render.raysync.cn’, ‘proxyPort’: 32011, ‘serverIp’: ‘127.0.0.1’, ‘serverPort’: 2121, ‘sslPort’: 2543
}
}
Return type: dict
-
platforms
()¶ Get platforms.
Returns: - Platforms info.
- e.g.:
- [
- {
- “platform”: 2, “name”: “query_platform_w2”
},
]
Return type: list
-
restart_failed_frames
(task_param_list, status=None)¶ Replay failed frames for large tasks.
Parameters: - task_param_list (list of str) – Task ID list.
- status (list for int) – task status
-
restart_frame
(task_id, select_all=1, ids_list=None, status=None)¶ Re-submit the specified frame.
Parameters: - task_id (int) – Task ID number.
- ids_list (list, optional) – Frame ID list, valid when select_all is 0.
- select_all (int, optional) – Whether to re-request all, 1 represents the user select all operation, 0 represents the user is not all selected, taskId is required when filling in 1, or ids is required when filling in 0 or not.
- status (list for int, optional) – Specifies the state of the reframe.
-
supported_plugin
(name)¶ Get supported rendering software plugins.
Parameters: name (str) – The name of the DCC. e.g.:
maya, houdiniReturns: - Plugin info.
- e.g.:
- {
- “cgPlugin”: [
- {
- “cvId”: 19,
“pluginName”: “zblur”,
“pluginVersions”: [
- {
- “pluginId”: 1652, “pluginName”: “zblur”, “pluginVersion”: “zblur 2.02.019”
}
]
},
], “cgVersion”: [
- {
- “id”: 23, “cgId”: 2005, “cgName”: “CINEMA 4D”, “cgVersion”: “R19”
}
]
}
Return type: dict
-
supported_software
()¶ Get supported rendering software.
Returns: - Software info.
- e.g.:
- {
- “isAutoCommit”: 2,
“renderInfoList”: [
- {
- “cgId”: 2000, “cgName”: “Maya”, “cgType”: “ma;mb”, “iconPath”: “/img/softimage/maya.png”, “isNeedProjectPath”: 3, “isNeedAnalyse”: 1, “isSupportLinux”: 1
}
], “defaultCgId”: 2001
}
Return type: dict
-
task_frames
(task_id, page_num=1, page_size=100, search_keyword=None)¶ Get task rendering frame details.
Parameters: - task_id (int) – The task ID number, which is the unique identifier of the task, required field.
- page_num (int) – Current page number.
- page_size (int) – Displayed data size per page.
- search_keyword (str, optional) – Is a string, which is queried according to the name of a multi-frame name of a machine rendering, optional.
Returns: - Frames info list, please see the documentation for details.
- e.g.:
- {
“pageCount”: 9, “pageNum”: 1, “total”: 17, “size”: 2, “items”: [
- {
“id”: 1546598, “userId”: null, “framePrice”: null, “feeType”: null, “platform”: null, “frameIndex”: “0-1”, “frameStatus”: 4, “feeAmount”: 0.44, “startTime”: 1535960273000, “endTime”: 1535960762000,
},
],
}
Return type:
-
task_info
(task_ids_list)¶ Get task details.
Parameters: task_ids_list (list of int) – Shell task ID list. Returns: - Task details.
- e.g.:
- {
- “pageCount”: 1,
“pageNum”: 1,
“total”: 1,
“size”: 100,
“items”: [
- {
- “sceneName”: “3d66.com_593362_2018.max”,
“id”: 19084,
“taskAlias”: “P19084”,
“taskStatus”: 0,
“statusText”: “render_task_status_0”,
“preTaskStatus”: 25,
“preStatusText”: “render_task_status_25”,
“totalFrames”: 0,
“abortFrames”: null,
“executingFrames”: null,
“doneFrames”: null,
“failedFrames”: 0,
“framesRange”: “0”,
“projectName”: “”,
“renderConsume”: null,
“taskArrears”: 0,
“submitDate”: 1535958477000,
“startTime”: null,
“completedDate”: null,
“renderDuration”: null,
“userName”: “xiaoguotu_ljian”,
“producer”: null,
“taskLevel”: 60,
“taskUserLevel”: 0,
“taskLimit”: null,
“taskOverTime”: null,
“userId”: 10001520,
“outputFileName”: null,
“munuTaskId”: “”,
“layerParentId”: 0,
“cgId”: 2001,
“taskKeyValueVo”: {”tiles”: null, “allCamera”: null, “renderableCamera”: null
}
}
”userAccountConsume”: null
}
Return type: dict
-
Tag¶
API operation on tags.
-
class
rayvision_api.operators.tag.
TagOperator
(connect)¶ Bases:
object
Task tag settings.
-
add_label
(new_name, status=1)¶ Add a custom label.
Parameters:
-
add_task_tag
(tag, task_ids)¶ Add a custom task tag. :param tag: Label name. :type tag: str :param task_ids: task id list. :type task_ids: list[int], optional
-
delete_label
(del_name)¶ Delete custom label.
Parameters: del_name (str) – The name of the label to be deleted.
-
delete_task_tag
(tag_ids)¶ del custom task label. :param label_ids: lable id list. :type label_ids: list[int], optional
-
get_label_list
()¶ Get custom labels.
Returns: - Label list info.
- e.g.:
- {
- “projectNameList”: [
- {
- “projectId”: 3671, “projectName”: “myLabel”
}
]
}
Return type: dict
-
Task¶
Interface to operate on the task.
-
class
rayvision_api.operators.task.
TaskOperator
(connect)¶ Bases:
object
API task related operations.
-
TASK_PARAM
= 'taskIds'¶
-
create_task
(count=1, task_user_level=50, out_user_id=None, labels=None, clone_original_id=None, artist=None)¶ Create a task ID.
Parameters: - count (int, optional) – The quantity of task ID.
- task_user_level (int) – Set the user’s task level to either 50 or 60, default is 50.
- out_user_id (int, optional) – Non-required, external user ID, used to distinguish users accessing third parties.
- labels (list or tuple, optional) – Custom task labels.
- clone_original_id (int, optional) – Clone the original task ID.
- artist (str, optional) – producer.
Returns: - The information of the task.
- e.g.:
- {
“taskIdList”: [1658434], “aliasTaskIdList”: [2W1658434], “userId”: 100093088
}
Return type:
-
full_speed
(task_id_list)¶ Full to render.
Parameters: - task_id_list (list of int) – Task list.
- Example –
- {
- “taskIds”:[485],
}
-
set_task_overtime_top
(task_id_list, overtime)¶ Set the task timeout stop time.
Parameters:
-
submit_task
(task_id, producer=None, only_id=False)¶ Submit a task to rayvision render farm.
Parameters:
-
User¶
Interface to operate the user.
-
class
rayvision_api.operators.user.
UserOperator
(connect)¶ Bases:
object
API user information operator.
-
get_transfer_bid
()¶ Get user transfer BID.
Returns: - Transfer bid info.
- e.g.:
- {
- “config_bid”: “30201”, “output_bid”: “20201”, “input_bid”: “10201”
}
Return type: dict
-
info
¶
-
query_user_profile
()¶ Get user profile.
Returns: - User profile info.
- e.g.:
- {
- “userId”: 10001136, “userName”: “rayvision”, “platform”: 2, “phone”: “173333333333”, “email”: “”, “company”: “”, “name”: “”, “job”: “”, “communicationNumber”: “”, “softType”: 2000, “softStatus”: 1, “businessType”: 1, “status”: 1, “infoStatus”: 0, “accountType”: 1,
}
Return type: dict
-
query_user_setting
()¶ Get user setting.
Returns: - The information of the user settings.
- e.g.:
- {
- “infoStatus”: null, “accountType”: null, “shareMainCapital”: 0, “subDeleteTask”: 0, “useMainBalance”: 0, “singleNodeRenderFrames”: “1”, “maxIgnoreMapFlag”: “1”, “autoCommit”: “2”, “separateAccountFlag”: 0, “mifileSwitchFlag”: 0, “assfileSwitchFlag”: 0, “manuallyStartAnalysisFlag”: 0, “downloadDisable”: 0, “taskOverTime”: 12
}
Return type: dict
-
update_user_settings
(task_over_time)¶ Update user settings.
Parameters: task_over_time (int) – The task timeout is set in seconds.
-
user_id
¶
-
RayvisionAPI¶
Initialize user, task, query, environment, tag interface.
-
class
rayvision_api.core.
RayvisionAPI
(access_id=None, access_key=None, domain='task.renderbus.com', platform='4', protocol='https', logger=None)¶ Bases:
object
Create the request object.
Including user action, task action, query action, environment operation and tag action.
-
check_and_add_project_name
(project_name)¶ Get the tag id.
Call the API interface to obtain all the label information of the user, determine whether the label name to be added already exists, and obtain the label id if it exists. If the label does not exist, the API interface is repeatedly requested. The request is up to three times. If the third time does not exist, the empty string is returned.
Parameters: project_name (str) – The name of the tag to be added. Returns: Tag id. Return type: int
-
connect
¶ The current connect instance.
Type: rayvision.api.Connect
-
get_user_id
()¶ Get user id.
Example
- user_profile_info = {
- “userId”: 10001136, “userName”: “rayvision”, “platform”: 2, “phone”: “173333333333”, “email”: “”, “company”: “”, “name”: “”, “job”: “”, “communicationNumber”: “”, “softType”: 2000, “softStatus”: 1, “businessType”: 1, “status”: 1, “infoStatus”: 0, “accountType”: 1,
}
Returns: The ID number of the current user. Return type: int
-
submit
(task_id, producer=None)¶ Submit a task.
Parameters:
-
submit_by_data
(task_info, file_name='task.json', producer=None)¶ Submit tasks based on json files.
Parameters: - task_info (string) – task.json content.
- file_name (string, optional) – The name of the json file to be uploaded, only support “”
- producer (string, optional) – Producer.
Returns:
-
user_info
¶
-
Connect¶
Request, request header and request result processing.
-
class
rayvision_api.connect.
Connect
(access_id, access_key, protocol, domain, platform, headers=None, session=None)¶ Bases:
object
Connect operation with the server, request.
-
headers
¶ Get request headers dic.
-
post
(api_url, data=None, validator=True)¶ Send an post request and return data object if no error occurred.
Request processing through the decorator, if the request fails more than five times, then the exception is ran out.
Parameters: - api_url (rayvision_api.api.url.URL or str) –
The URL address of the corresponding action network Request.
- e.g.:
- /api/render/common/queryPlatforms /api/render/user/queryUserProfile /api/render/user/queryUserSetting
- data (dict, optional) – Request data.
- validator (bool, optional) – Validator the data.
Returns: Response data.
Return type: dict or List
Raises: RayVisionAPIError
– The request failed, It returns the error ID, the error message, and the request address.- api_url (rayvision_api.api.url.URL or str) –
-
API interfaces use methods¶
The preparatory work¶
All interface calls are made through the rayvision_api module, and an API object must be instantiated before use :
user_info = {
"domain_name": "jop.foxrenderfarm.com",
"platform": "2",
"access_id": "xxxxxxxxxxxxxxxxxxxxxx",
"access_key": "xxxxxxxxxxxxxxxxxxxxx",
}
api = RayvisionAPI(access_id=user_info['access_id'],
access_key=user_info['access_key'],
domain=user_info['domain_name'],
platform=user_info['platform'])
Warning:
- the following interface calls will be made directly using the API of the above instance;
- In the rayvision_api, the interface actually returns the user only the value of the “data” parameter ;
Obtain the platform list¶
Interface path: /api/render/common/queryPlatforms
Request parameters: No
Return parameters:
Parameters | Type | Description | Memo |
---|---|---|---|
platform | Integer | Platform number | |
name | String | Platform number description |
Example of request:
# automatically distinguish domestic and foreign according to the "domain" parameter
platform = api.query.platforms()
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": [
{
"platform": 2,
"name": "query_platform_w2"
}
],
"serverTime": 1535949047370
}
Obtain the user information¶
Interface path:/api/render/setUp/queryUserProfile
Request parameter:No
Example of request:
user_profile = api.user.query_user_profile()
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": {
"userId": 10001136,
"userName": "rayvision",
"platform": 2,
"phone": "173333333333",
"email": "",
"company": "",
"name": "",
"job": "",
"communicationNumber": "",
"softType": 2000,
"softStatus": 1,
"businessType": 1,
"status": 1,
"infoStatus": 0,
"accountType": 1,
"userType": 1,
"mainUserId": 0,
"level": 49,
"pictureLever": null,
"zone": 1,
"rmbbalance": 0,
"usdbalance": 0,
"rmbCumulative": 0,
"usdCumulative": 0,
"credit": 0,
"coupon": 49.93,
"description": "",
"country": "中国",
"city": "广东 中山",
"address": "",
"cpuPrice": 0.67,
"gpuPrice": 20,
"shareMainCapital": 0,
"subDeleteTask": 0,
"useMainBalance": 0,
"hideBalance": 0,
"hideJobCharge": 0,
"useLevelDirectory": 1,
"downloadDisable": 0,
"displaySubaccount": 1,
"subaccountLimits": 5,
"houdiniFlag": 0,
"c4dFlag": 0,
"blenderFlag": 0,
"keyshotFlag": 0,
"studentEndTime": null
},
"serverTime": 1535953580730
}
Obtain user settings¶
Interface path: /api/render/setUp/queryUserSetting
Request parameter:No
Return parameter:
Parameter | Type | Description | Memo |
---|---|---|---|
infoStatus | Integer | ||
accountType | Integer | ||
shareMainCapital | |||
subDeleteTask | |||
useMainBalance | |||
singleNodeRenderFrames | String | Multiple frames rendered on one machine | |
maxIgnoreMapFlag | String | Can choose to ignore the max map error or not | 0:Do not ignore,1:Ignore |
autoCommit | String | Can choose start scene parameter rendering | 1:Do not start,2 :Start |
separateAccountFlag | Integer | Separate the primary and secondary account settings | |
mifileSwitchFlag | Integer | Indicate the switch option of mi Document analysis risk | |
assfileSwitchFlag | Integer | Do not analyze the ass file switch identifier | |
manuallyStartAnalysisFlag | Integer | Manually turn on the analysis switch | |
downloadDisable | Integer | Choose to disable downloading or not | 1 Disable,0 Do not disable |
taskOverTime | Integer | Timeout - hour |
Example of request:
user_setting = api.user.query_user_setting()
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": {
"infoStatus": null,
"accountType": null,
"shareMainCapital": 0,
"subDeleteTask": 0,
"useMainBalance": 0,
"singleNodeRenderFrames": "1",
"maxIgnoreMapFlag": "1",
"autoCommit": "2",
"separateAccountFlag": 0,
"mifileSwitchFlag": 0,
"assfileSwitchFlag": 0,
"manuallyStartAnalysisFlag": 0,
"downloadDisable": 0,
"taskOverTime": 12,
"taskOverTimeSec": 3600
},
"serverTime": 1535954828406
}
Update user settings¶
Interface path: /api/render/setUp/updateUserSetting
Request parameter:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
task_over_time | Integer | Y | Set up of Task timeout situation, unit: second |
Return parameter: default
Example of return:
update_user_setting = api.user.update_user_settings(task_over_time=43200)
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": null,
"serverTime": 1535957894211
}
Obtain user transfer BID¶
Interface path:/api/render/transfer/getBid
Request parameter:default
Return parameter:
Parameter | Type | Description | Memo |
---|---|---|---|
config_bid | String | Configuration file transfer ID | |
output_bid | String | Download the transfer file ID | |
input_bid | String | Asset upload transfer ID | |
parent_input_bid | String | Input transfer bid for corresponding main account | |
sub_user_output_bids | Object | Subaccount Outputbids: If the accessed user is the main account, there is a subaccount value; otherwise, it is empty | |
userId | String | ID of subaccount | |
output_bid | String | output_bid for subaccount |
Example of request:default
user_transfer_bid = api.user.get_transfer_bid()
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": {
"config_bid": "30201",
"input_bid": "10201",
"output_bid": "20201",
"parent_input_bid": "10202",
"sub_user_output_bids": [{
userId:"119776",
outputBid:"10401"
}]
},
"serverTime": 1535957964631
}
Create task ID¶
Interface path:/api/render/submit/createTask
Request parameter:
parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
count | Integer | N | create the number of task Numbers | Not required, Default 1 |
out_user_id | Long | N | external user ID | Not required,used to distinguish third party access users |
task_user_level | Integer | N | task user level | Not required,optional 50 and 60, default is 50 |
labels | List |
N | custom tag | Not required |
clone_original_id | integer | N | Clone the original task ID | |
artist | String | N | Productor |
Return parameter:
Parameter | Type | Description | Memo |
---|---|---|---|
aliasTaskIdList | List\<String> | Task ID alias | |
taskIdList | List\<Integer> | Task ID |
Example of request:
create_task_id = api.task.create_task(count=1,
task_user_level=50,
labels=["label_test1", "label_test2"])
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": {
"aliasTaskIdList": [
"2W19097"
],
"taskIdList": [
19097
],
"userId": 10007893
},
"serverTime": 1535959487092
}
Submit task¶
Interface path:/api/render/submit/task
Request parameter:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
task_id | Integer | Y | task id | |
producer | String | N | producer |
Return parameter:default
Example of request:
submit_task = api.task.submit_task(task_id=create_task_id[0])
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": null,
"serverTime": 1535957894211
}
Warning: Before committing, you need to call the transport interface to upload the relevant analysis configuration file .
Obtain analysis error code¶
Interface path: /api/render/submit/queryAnalyseErrorDetail
Request parameter:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
code | String | N | error code | Codes and codes are either mandatory |
codes | String | N | Error code list | Codes and codes are either mandatory |
language | String | N | language | 0:Chinese(default) 1:English |
Return parameter:List<CodeInfo>
Parameter | Type | Description | Memo |
---|---|---|---|
id | |||
code | Integer | error code | |
type | Integer | Type | 0 Warning-can be ignored,1 Error-can not be ignored |
languageFlag | Integer | languageType | 0:Chinese,1:English |
desDescriptionCn | String | Chinese description | |
desSolutionCn | String | Solution | |
solutionPath | String | Connect to solution | |
isRepair | Integer | Check if repairable or not | 1:Repairable ,0:Non-repairable |
isOpen | Integer | Check if turn on the intercept of the error or not | 0:Not turn on the intercept,1:Turn on the intercept |
updateTime | Date | The final update time |
Example of request:
error_detail = api.query.error_detail(code="50001")
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": [
{
"id": 5,
"code": "15000",
"type": 1,
"languageFlag": 0,
"desDescriptionCn": "启动3ds max卡住或者失败",
"desSolutionCn": "1.检查启用对应版本的3ds max是否有特殊弹窗,有的话手动关闭;\n2.检查操作系统是否设置了高级别的权限",
"solutionPath": "http://note.youdao.com/noteshare?id=d8f1ea0c46dfb524af798f6b1d31cf6f",
"isRepair": 0,
"isDelete": 1,
"isOpen": 1,
"lastModifyAdmin": "",
"updateTime": 1534387709000
}
],
"serverTime": 1535962451356
}
Obtain the task list¶
Interface path:/api/render/handle/getTaskList
Request parameter:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
page_num | Integer | N | Mandatary,number of current page | Default: 1 |
page_size | Integer | N | Mandatary,quantities of displaying per page | Default: 1 |
status_list | List\<Integer> | N | status code list,query the status of the task in the list | Check task status description for details |
search_keyword | String | N | Optional, scenario name or job ID | Fuzzy search |
start_time | String | N | Optional, search limit for start time | Example:yyyy-MM-dd HH:mm:ss |
end_time | String | N | Optional, search limit for end time | Example:yyyy-MM-dd HH:mm:ss |
Task status description:
Status | Status code | Description |
---|---|---|
WAITING | 0 | Waiting |
RENDERING | 5 | Rendering |
PRE_RENDERING | 8 | Prepared to be handled |
STOP | 10 | Stop |
ARREARAGE_STOP | 20 | Stop due to arrearage |
TIME_OUT_STOP | 23 | Stop due to timing out |
FINISHED | 25 | Finished |
FINISHED_HAS_FAILED | 30 | Finished with failed frames contained |
ABANDON | 35 | Give up |
FINISHED_TEST | 40 | Test completed |
FAILED | 45 | Failed |
ANALYSE | 50 | Analyzing |
Return parameter:list<Task Info>
Parameter | Type | Description | Memo |
---|---|---|---|
sceneName | String | Scene Name | |
id | Integer | Task id | |
taskAlias | String | Task Name | |
taskStatus | Byte | Task status | 1/Waiting, 5/Rendering, 10/Stop, 15/User Stop, 20/Stop due to arrearage, 25/Finished, 30/Finished with failed frames contained, 35/Give up, 40/Test completed, 45/Failed |
statusText | String | Status Text | |
preTaskStatus | Byte | Preprocessi-ng Task Status | |
preStatusText | String | Preprocessi-ng Task Status Text | |
totalFrames | Integer | Total frames | |
abortFrames | Integer | Abort frames | |
executingFrames | Integer | Executing frames | |
doneFrames | Integer | Done frames | |
failedFrames | Integer | Failed frames | |
framesRange | String | Frames range | |
projectName | String | Project name | |
renderConsume | BigDecimal | Task render consume | |
taskArrears | BigDecimal | Task arrears | |
submitDate | Date | Submit Date | |
startTime | Date | Start Date | |
completedDate | Date | Completed Date | |
renderDuration | Long | Task render duration | |
userName | String | User name | |
producer | String | producer | |
taskLevel | Byte | Task level | |
taskUserLevel | Integer | Task level of user | |
taskLimit | Integer | Task node limit | |
taskOverTime | Long | Task timeout reminder time | |
outputFileName | String | Output file name | |
munuTaskId | String | Dispatch id | |
layerParentId | String | About maya task,parent id | |
cgId | Integer | Task type | 2001/maya,2000/max |
taskKeyValueVo | Object | Task keyword | |
userAccountConsume | Bigdecimal | User account consume | |
couponConsume | Bigdecimal | Coupon consume | |
isOpen | Byte | Whether the front-end expansion button is expanded or not | |
taskType | String | Task type | Preprocessing, RenderPhoton, Render |
renderCamera | String | Render camera | |
cloneParentId | Integer | Clone parent id | |
cloneOriginalId | Integer | Clone original id | |
shareMainCapital | Byte | Whether to Share Main Account Assets | 0:no , 1:yes |
taskRam | Integer | Task render memory | |
respRenderingTaskList | List\<TaskInfo> | Child tasks of the open task | Structure the same of this object |
layerName | String | Layer name | |
taskTypeText | String | Task type text | photon/picture |
isDelete | Byte | Whether or not to delete | 0: deleted, 1: not deleted |
taskKeyValueVo:
parameter | Type | Description | Memo |
---|---|---|---|
tiles | String | Tile number | |
allCamera | String | All Cameras | |
RenderableCarema | String | Render Cameras |
Example of request:
task_list = api.query.get_task_list(page_num=1, page_size=1)
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": {
"pageCount": 32,
"pageNum": 1,
"total": 32,
"size": 1,
"items": [
{
"sceneName": "衣帽间.max",
"id": 18278,
"taskAlias": "P18278",
"taskStatus": 0,
"statusText": "render_task_status_0",
"preTaskStatus": 25,
"preStatusText": "render_task_status_25",
"totalFrames": 0,
"abortFrames": null,
"executingFrames": null,
"doneFrames": null,
"failedFrames": 0,
"framesRange": "0",
"projectName": "",
"renderConsume": null,
"taskArrears": 0,
"submitDate": 1535602289000,
"startTime": null,
"completedDate": null,
"renderDuration": null,
"userName": "xiaoguotu_ljian",
"producer": null,
"taskLevel": 79,
"taskUserLevel": 0,
"taskLimit": 200,
"taskOverTime": null,
"userId": 10001520,
"outputFileName": null,
"munuTaskId": "",
"layerParentId": 0,
"cgId": 2001,
"taskKeyValueVo": {
"tiles": null,
"allCamera": null,
"renderableCamera": null
},
"userAccountConsume": null,
"couponConsume": null,
"isOpen": 1,
"taskType": "",
"renderCamera": "VRayCam003",
"cloneParentId": null,
"cloneOriginalId": null,
"shareMainCapital": 0,
"taskRam": null,
"respRenderingTaskList": [
{
"sceneName": "衣帽间.max",
"id": 18280,
"taskAlias": "P18280",
"taskStatus": 25,
"statusText": "render_task_status_25",
"preTaskStatus": null,
"preStatusText": null,
"totalFrames": 1,
"abortFrames": 0,
"executingFrames": 0,
"doneFrames": 1,
"failedFrames": 0,
"framesRange": "0",
"projectName": "",
"renderConsume": 1.57,
"taskArrears": 0,
"submitDate": 1535602289000,
"startTime": 1535602601000,
"completedDate": 1535603874000,
"renderDuration": 1176,
"userName": "xiaoguotu_ljian",
"producer": null,
"taskLevel": 79,
"taskUserLevel": 0,
"taskLimit": 200,
"taskOverTime": 86400000,
"userId": 10001520,
"outputFileName": "18280_衣帽间",
"munuTaskId": "2018083000075",
"layerParentId": 18278,
"cgId": 2001,
"taskKeyValueVo": {
"tiles": null,
"allCamera": null,
"renderableCamera": null
},
"userAccountConsume": 0,
"couponConsume": 1.57,
"isOpen": 0,
"taskType": "RenderPhoton",
"renderCamera": "VRayCam003",
"cloneParentId": 0,
"cloneOriginalId": 0,
"shareMainCapital": 0,
"taskRam": null,
"respRenderingTaskList": null,
"layerName": null,
"taskTypeText": "render_photons_task",
"isDelete": 1
},
{
"sceneName": "衣帽间.max",
"id": 18281,
"taskAlias": "P18281",
"taskStatus": 25,
"statusText": "render_task_status_25",
"preTaskStatus": null,
"preStatusText": null,
"totalFrames": 17,
"abortFrames": 0,
"executingFrames": 0,
"doneFrames": 17,
"failedFrames": 0,
"framesRange": "0",
"projectName": "",
"renderConsume": 6.7,
"taskArrears": 0,
"submitDate": 1535602289000,
"startTime": 1535603885000,
"completedDate": 1535604765000,
"renderDuration": 5028,
"userName": "xiaoguotu_ljian",
"producer": null,
"taskLevel": 79,
"taskUserLevel": 0,
"taskLimit": 200,
"taskOverTime": 86400000,
"userId": 10001520,
"outputFileName": "18281_衣帽间",
"munuTaskId": "2018083000079",
"layerParentId": 18278,
"cgId": 2001,
"taskKeyValueVo": {
"tiles": null,
"allCamera": null,
"renderableCamera": null
},
"userAccountConsume": 0,
"couponConsume": 6.7,
"isOpen": 0,
"taskType": "Render",
"renderCamera": "VRayCam003",
"cloneParentId": 0,
"cloneOriginalId": 0,
"shareMainCapital": 0,
"taskRam": null,
"respRenderingTaskList": null,
"layerName": null,
"taskTypeText": "render_major_picture_task",
"isDelete": 1
}
],
"layerName": null,
"taskTypeText": null,
"isDelete": 1
}
]
},
"serverTime": 1535964116655
}
Stop task¶
Interface path: /api/render/handle/stopTask
Request parameter:
parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
task_param_list | List\<Integer> | Y | Combination of the task ID |
Return parameter:default
Example of request:
stop_task = api.task.stop_task(task_param_list=[13798105])
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": null,
"serverTime": 1535957894211
}
Start task¶
Interface path:/api/render/handle/startTask
Request parameter:
parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
task_param_list | List\<Integer> | Y | Combination of the task ID |
Return parameter:default
Example of request:
start_task = api.task.start_task(task_param_list=[13798105])
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": null,
"serverTime": 1535957894211
}
Abandon task¶
Interface path:/api/render/handle/abandonTask
Request parameter:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
task_param_list | List\<Integer> | Y | Combination of the task ID |
Return parameter:default
Example of request:
abort_task = api.task.abort_task(task_param_list=[13798105])
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": null,
"serverTime": 1535957894211
}
Delete task¶
Interface path:/api/render/handle/deleteTask
Request parameter:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
task_param_list | List\<Integer> | Y | Task ID list |
Return parameter:default
Example of request:
delete_task = api.task.delete_task(task_param_list=[13798105])
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": null,
"serverTime": 1535957894211
}
Obtain the task rendering frame details¶
Interface path: /api/render/handle/queryTaskFrames
Request parameter:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
task_id | Integer | Y | Task ID | Task ID,Is the unique identifier of the task, mandatary field |
search_keyword | String | N | Query based on the name of the multiple frames that rendered on one machine | Is a string that be queried based on name of the multiple frames that rendered on one machine, optional field |
page_num | Integer | N | Current page number | |
page_size | Integer | N | Size of the data that displayed per page |
Return parameter:List<FrameInfo>
Parameter | Type | Description | Memo |
---|---|---|---|
id | Integer | frame id | |
userId | Long | userID | |
framePrice | Double | Render pricing | |
feeType | Integer | Fee charge type | 0 Quantity-based,1 Machine-bashed,2 Project-based |
platform | Integer | Platform | |
frameIndex | String | Frame sequence name | |
frameBlock | String | Current frame number | |
frameStatus | Integer | Current frame status | 1/Waiting,2/Processing,3/Stopped,4/Complete,5/Failed,6/Waiting for the pre-handeling,7/Waiting for photonic frame rendering completed,8/Waiting for the priority rendering completed,9/ Wait for the photon job to finish rendering,10/Waiting for the settlement job rendering completed,11/Task timing out |
feeAmount | Double | Balance deduction | |
couponFee | Double | Vouchers deduction | |
startTime | Long | Start time (ms) | |
endTime | Long | End time (ms) | |
frameExecuteTime | Long | Rendering frame time | |
frameStatusText | String | Frame status description | |
arrearsFee | Double | Render frame arrears amount | |
taskId | Long | Task ID | |
frameType | Integer | Frame Type | 1/Pre-rendering (only one frame, even for multi-camera case), 2/photon frame, 3/combine photon frame, 4/priority frame, 5/main render frame, 6 priority /maya/max composite rendering frame, 7/maya/max rendering main picture composite frame, 8/houdini settlement frame, 9/max channel frame |
recommitFlag | Integer | Recount times | Indicate the recount time default is 0,increased as the recount time increase |
taskOverTime | Integer | overtime | Overtime details |
gopName | String | Houdini Settlement node name | |
frameRam | Integer | Memory of the task rendering frame | No memory requirement if description does not specified |
Example of request:
task_frame = api.query.task_frames(task_id=13790691, page_num=1, page_size=1)
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": {
"pageCount": 9,
"pageNum": 1,
"total": 17,
"size": 2,
"items": [
{
"id": 1546598,
"userId": null,
"framePrice": null,
"feeType": null,
"platform": null,
"frameIndex": "0-1",
"frameStatus": 4,
"feeAmount": 0.44,
"startTime": 1535960273000,
"endTime": 1535960762000,
"frameExecuteTime": 489,
"frameStatusText": "task_frame_status_4",
"arrearsFee": null,
"munuJobId": "0",
"taskId": 19088,
"munuTaskId": "2018090300040",
"frameType": 5,
"couponFee": 0,
"recommitFlag": 0,
"isCopy": null,
"frameBlock": "1",
"taskOverTime": 86400000,
"gopName": null,
"frameRam": null
},
{
"id": 1546599,
"userId": null,
"framePrice": null,
"feeType": null,
"platform": null,
"frameIndex": "0-2",
"frameStatus": 4,
"feeAmount": 0.43,
"startTime": 1535960856000,
"endTime": 1535961338000,
"frameExecuteTime": 482,
"frameStatusText": "task_frame_status_4",
"arrearsFee": null,
"munuJobId": "1",
"taskId": 19088,
"munuTaskId": "2018090300040",
"frameType": 5,
"couponFee": 0,
"recommitFlag": 0,
"isCopy": null,
"frameBlock": "2",
"taskOverTime": 86400000,
"gopName": null,
"frameRam": null
}
]
},
"serverTime": 1535966967143
}
Gets the page frame details for the specified task¶
[^api]: Add in v2.4.0
Request parameter:
Parameter | Type | Is necessary | Description | Memo |
---|---|---|---|---|
task_id | Integer | Y | small task id | If the job ID is "2W35736251", task_ID is 35736251 |
start_page | Integer | N | Query Start Page, default is 1 | |
end_page | Integer | N | Query end page, default is 2000 | |
page_size | Integer | N | Specifies the number of frames to display per page, which defaults to a maximum of 100 |
Example of request:
all_frames = api.query.get_all_frames(task_id=35736251)
Example of return:
{
"1": {
"id": 665078505,
"userId": null,
"framePrice": null,
"feeType": null,
"platform": null,
"frameIndex": "1",
"frameStatus": 1,
"feeAmount": 0.0,
"startTime": 0,
"endTime": 0,
"frameExecuteTime": 33,
"currentRenderTime": 0,
"frameStatusText": "task_frame_status_1",
"arrearsFee": null,
"munuJobId": "0",
"taskId": 37439351,
"munuTaskId": "2020092801043",
"frameType": 4,
"couponFee": 0.037,
"recommitFlag": 0,
"isCopy": null,
"frameBlock": "",
"taskOverTime": 259200,
"gopName": null,
"frameRam": 64,
"averageCpu": 9,
"averageMemory": 2240647168,
"isOverTime": 0,
"overOneMonth": null,
"renderRam": null,
"nodeId": "10.60.3.224",
"openRenderRam": null
},
"2-4[1]": {
"id": 665078511,
"userId": null,
"framePrice": null,
"feeType": null,
"platform": null,
"frameIndex": "2-4[1]",
"frameStatus": 1,
"feeAmount": null,
"startTime": 0,
"endTime": 0,
"frameExecuteTime": 0,
"currentRenderTime": 0,
"frameStatusText": "task_frame_status_1",
"arrearsFee": null,
"munuJobId": "0",
"taskId": 37439351,
"munuTaskId": "2020092801165",
"frameType": 5,
"couponFee": null,
"recommitFlag": 0,
"isCopy": null,
"frameBlock": "",
"taskOverTime": 259200,
"gopName": null,
"frameRam": 64,
"averageCpu": 0,
"averageMemory": 0,
"isOverTime": 0,
"overOneMonth": null,
"renderRam": null,
"nodeId": "",
"openRenderRam": null
}
}
Obtain the overview of task rendering frames¶
Interface path: /api/render/handle/queryAllFrameStats
Request parameter:No
Return parameter:
parameter | Type | Description | Memo |
---|---|---|---|
executingFramesTotal | Integer | Number of frames in rendering | |
doneFramesTotal | Integer | Number of frames completed | |
failedFramesTotal | Integer | Number of rendered frames failed | |
waitingFramesTotal | Integer | Number of frames in waiting | |
totalFrames | Integer | Number of overall rendered frames |
Example of request:
all_frame_status = api.query.all_frame_status()
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": {
"executingFramesTotal": 1,
"doneFramesTotal": 308,
"failedFramesTotal": 2,
"waitingFramesTotal": 153,
"abandonFramesTotal": 113,
"totalFrames": 577
},
"serverTime": 1535968038725
}
Re-submit the failed frames¶
Interface path: /api/render/handle/recommitTasks
Request parameter:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
task_param_list | List\<Integer> | Y | Task ID list | |
status | List\ |
N | A set of frame task states that are not filled to represent failed frames |
Return parameter:default
Example of request:
restart_failed_frames = api.query.restart_failed_frames(task_param_list=[13788981])
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": null,
"serverTime": 1535957894211
}
Re-submit the specified frames based on the frame number¶
[^api]: Add in v2.4.0
Request parameter:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
task_id | Integer | Y | small task id | If the job ID is "2W35736251", task_ID is 35736251 |
restartframes | List[str] | Y | List of frame Numbers that need to be replayed | example:["6", "7-9[1]"] |
Example of request:
restart_frame = api.query.get_custome_frames(task_id=37439351, restartframes=["6", "7-9[1]"])
Example of return:None
Re-submit the specified frames¶
Interface path: /api/render/handle/recommitTaskFrames
Request parameter:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
task_id | Integer | N | Task ID | |
ids_list | List\<Integer> | N | Combine the frame ID | Effective if 0 displayed when select_all |
select_all | Integer | N | Choose if re-submit all | 1:All,0:Only the specified frame |
status | List\ |
N | frame status | Only pass taskId will take effect |
Return parameter:default
Example of request:
restart_frame = api.query.restart_frame(task_id=14362099, select_all=1)
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": null,
"serverTime": 1535957894211
}
Obtain the task details¶
Interface path: /api/render/handle/queryTaskInfo
Request parameter:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
task_ids_list | List\<Integer> | N | Combine the shell task ID |
Return parameter:List<TaskInfo>
Parameter | Type | Description | Memo |
---|---|---|---|
sceneName | String | Scene Name | |
id | Integer | Task id | |
taskAlias | String | Task Name | |
taskStatus | Byte | Task status | 1/Waiting, 5/Rendering, 10/Stop, 15/User Stop, 20/Stop due to arrearage, 25/Finished, 30/Finished with failed frames contained, 35/Give up, 40/Test completed, 45/Failed |
statusText | String | Status Text | |
preTaskStatus | Byte | Preprocessi-ng Task Status | |
preStatusText | String | Preprocessi-ng Task Status Text | |
totalFrames | Integer | Total frames | |
abortFrames | Integer | Abort frames | |
executingFrames | Integer | Executing frames | |
doneFrames | Integer | Done frames | |
failedFrames | Integer | Failed frames | |
framesRange | String | Frames range | |
projectName | String | Project name | |
renderConsume | BigDecimal | Task render consume | |
taskArrears | BigDecimal | Task arrears | |
submitDate | Date | Submit Date | |
startTime | Date | Start Date | |
completedDate | Date | Completed Date | |
renderDuration | Long | Task render duration | |
userName | String | User name | |
producer | String | producer | |
taskLevel | Byte | Task level | |
taskUserLevel | Integer | Task level of user | |
taskLimit | Integer | Task node limit | |
taskOverTime | Long | Task timeout reminder time | |
outputFileName | String | Output file name | |
munuTaskId | String | Dispatch id | |
layerParentId | String | About maya task,parent id | |
cgId | Integer | Task type | 2001/maya,2000/max |
taskKeyValueVo | Object | Task keyword | |
userAccountConsume | Bigdecimal | User account consume | |
couponConsume | Bigdecimal | Coupon consume | |
isOpen | Byte | Whether the front-end expansion button is expanded or not | |
taskType | String | Task type | Preprocessing, Render photon, Render picture |
renderCamera | String | Render camera | |
cloneParentId | Integer | Clone parent id | |
cloneOriginalId | Integer | Clone original id | |
shareMainCapital | Byte | Whether to Share Main Account Assets | (0:no 1:yes) |
taskRam | Integer | Task render memory | |
respRenderingTaskList | List\<TaskInfo> | Child tasks of the open task | Structure the same of this object |
layerName | String | Layer name | |
taskTypeText | String | Task type text | photon/picture |
Example of request:
task_info = api.query.task_info(task_ids_list=[14400249])
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": {
"pageCount": 1,
"pageNum": 1,
"total": 1,
"size": 100,
"items": [
{
"sceneName": "test_no_randerman_175.hip",
"id": 14400249,
"taskAlias": "2W14400249",
"taskStatus": 25,
"statusText": "render_task_status_25",
"preTaskStatus": null,
"preStatusText": null,
"totalFrames": 1,
"abortFrames": 0,
"executingFrames": 0,
"doneFrames": 1,
"failedFrames": 0,
"framesRange": "/out/geometry110-200[1]",
"projectName": "analysis_multi_project_empty_placeholder",
"renderConsume": 0.0,
"taskArrears": 0.0,
"submitDate": 1577765849000,
"startTime": 1577765851000,
"completedDate": 1577766104000,
"renderDuration": 13,
"userName": "ding625yutao",
"producer": "丁玉涛",
"taskLevel": 81,
"taskUserLevel": 0,
"taskLimit": 1,
"taskOverTime": 43200,
"overTimeStop": 86400,
"userId": 100150764,
"outputFileName": "14400249_test_no_randerman_175",
"munuTaskId": "2019123100841",
"munuTaskIds": "2019123100841",
"layerParentId": 0,
"cgId": 2004,
"userAccountConsume": 0.0,
"couponConsume": 0.039,
"qyCouponConsume": null,
"isOpen": 0,
"taskType": "GopRender",
"renderCamera": "",
"cloneParentId": 0,
"cloneOriginalId": 0,
"shareMainCapital": 0,
"taskRam": 64,
"respRenderingTaskList": null,
"layerName": "",
"taskTypeText": null,
"locationOutput": "C:/RenderFarm/Download",
"isDelete": 1,
"channel": 1,
"remark": "",
"labels": "{}",
"isOverTime": 0,
"taskKeyValueVo": {
"tiles": null,
"allCamera": null,
"renderableCamera": null
},
"waitingCount": null,
"stopType": 0
}
]
},
"serverTime": 1578046630345,
"requestId": "py6RCN-VGFzay1TZXJ2aWNlMDc-1578046630330"
}
Add a custom label¶
Interface path: /api/render/project/add
Request parameter:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
new_name | String | N | Label name | |
status | Integer | N | Lable status | 0: on, 1: off, default is 1 |
Return parameter:default
Example of request:
task_info = api.tag.add_label(new_name="test_tag4", status=0)
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": null,
"serverTime": 1535957894211
}
Delete custom label¶
Interface path: /api/render/project/delete
Request parameter:
Parameter | Type | Description | Memo |
---|---|---|---|
del_name | String | Label name |
Return parameter:default
Example of request:
delete_label_name = api.tag.delete_label(del_name="test_tag2")
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": null,
"serverTime": 1535957894211
}
Get the project name¶
Interface path: /api/render/project/getList
Request parameter:No
Return parameter:
Parameter | Type | Description | Memo |
---|---|---|---|
projectNameList | List | Project name list | |
Object.projectName | String | Project name | |
Object.projectId | Integer | Project id |
Example of request:
label_list = api.tag.get_label_list()
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": {
"projectNameList": [
{
"projectId": 3671,
"projectName": "myLabel"
}
]
},
"serverTime": 1546998557770
}
Get the project name(Control by flag)¶
Interface path: /api/render/project/list
Request parameter:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
flag | int | N | 0:Check the items under this account; 1:Check the items under this account and the main account; 2:Query associated with all items (all items under the same main account); |
default: 0 |
Return parameter:
Parameter | Type | Description | Memo |
---|---|---|---|
projectNameList | List\<Object> | project list | |
Object.projectName | String | project name | |
Object.projectId | Integer | project id |
Example of request:
new_projects = api.tag.get_list(flag=0)
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": {
"projectNameList": [
{
"projectId": 3671,
"projectName": "myLabel"
}
]
},
"serverTime": 1546998557770
}
Add a task label¶
Interface path: /api/render/handle/addTaskLabel
Request parameter:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
tag | string | Y | task tag | |
task_ids | list[int] | Y | task id list |
Return parameter:No
Example of request:No
tag = api.tag.add_task_tag(tag="test_tag", task_ids=[29445045, 29435295])
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": null,
"serverTime": 15942751740441
}
Delete task label¶
Interface path: /api/render/task/deleteTaskLabel
Request parameter:
Parameter | Type | Description | Memo |
---|---|---|---|
tag_ids | list[int] | Delete the task tag ID |
Return parameter:No
Example of request:No
del_tag = api.tag.delete_task_tag(tag_ids=[21205])
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": null,
"serverTime": 15942760110461
}
Obtain the supported rendering software¶
Interface path:/api/render/plugin/querySoftwareList
Request parameter:No
Return parameter:
Parameter | Type | Description | Memo |
---|---|---|---|
isAutoCommit | Integer | Choose if submit automatically or not | |
renderInfoList | List\<Software> | Renderer version list | |
defaultCgId | Integer | Default renderer ID |
Software
Parameter | Type | Description | Memo |
---|---|---|---|
cgId | Integer | Render software ID | |
cgName | String | Render software name | |
cgType | String | Render file suffix support | |
iconPath | String | Rendering software icon address | |
isNeedProjectPath | Integer | ||
isNeedAnalyse | Integer | Need to analyze | |
isSupportLinux | Integer | Indicates if linux is supported or not |
Example of request:
support_software = api.query.supported_software()
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": {
"isAutoCommit": 2,
"renderInfoList": [
{
"cgId": 2000,
"cgName": "Maya",
"cgType": "ma;mb",
"iconPath": "/img/softimage/maya.png",
"isNeedProjectPath": 1,
"isNeedAnalyse": 1,
"isSupportLinux": 1
},
{
"cgId": 2001,
"cgName": "3ds Max",
"cgType": "max",
"iconPath": "/img/softimage/max.png",
"isNeedProjectPath": 1,
"isNeedAnalyse": 1,
"isSupportLinux": 0
},
{
"cgId": 2004,
"cgName": "Houdini",
"cgType": "hip;hipnc;hiplc",
"iconPath": "/img/softimage/houdini.png",
"isNeedProjectPath": 2,
"isNeedAnalyse": 1,
"isSupportLinux": 1
},
{
"cgId": 2005,
"cgName": "Cinema 4D",
"cgType": "c4d",
"iconPath": "/img/softimage/cinema-4D.png",
"isNeedProjectPath": 1,
"isNeedAnalyse": 1,
"isSupportLinux": 0
},
{
"cgId": 2007,
"cgName": "Blender",
"cgType": "blend",
"iconPath": "/img/softimage/blender.png",
"isNeedProjectPath": 1,
"isNeedAnalyse": 1,
"isSupportLinux": 0
},
{
"cgId": 2008,
"cgName": "VR Standalone",
"cgType": "vrscene",
"iconPath": "/img/softimage/VR-standalone.png",
"isNeedProjectPath": 3,
"isNeedAnalyse": 2,
"isSupportLinux": 0
},
{
"cgId": 2012,
"cgName": "KeyShot",
"cgType": "bip",
"iconPath": "/img/softimage/keyshot.png",
"isNeedProjectPath": 2,
"isNeedAnalyse": 1,
"isSupportLinux": 0
},
{
"cgId": 2013,
"cgName": "Clarisse",
"cgType": "project;render",
"iconPath": "/img/softimage/clarisse.png",
"isNeedProjectPath": 3,
"isNeedAnalyse": 1,
"isSupportLinux": 1
}
],
"defaultCgId": 2001
},
"serverTime": 1578048938715,
"requestId": "W12mkM-VGFzay1TZXJ2aWNlMDc-1578048938685"
}
Obtain supported rendering software plugins¶
Interface path:/api/render/plugin/querySoftwareDetail
Request parameter:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
name | String | Y | Render software ID |
Return parameter:
Parameter | Type | Description | Memo |
---|---|---|---|
cgPlugin | List\<Plugin> | Supported plugin list | |
cgVersion | List\<Soft Version> | Supported software list |
Plugin:
Parameter | Type | Description | Memo |
---|---|---|---|
cvId | Integer | Rendering software version ID (Soft Version.id) | |
pluginName | String | Plugin name | |
pluginVersions | List\<Plugin Version> | Plugin version list |
PluginVersion
Parameter | Type | Description | Memo |
---|---|---|---|
pluginId | Integer | Plugin version ID | |
pluginName | String | Plugin name | |
pluginVersion | String | Plugin version |
SoftVersion:
Parameter | Type | Description | Memo |
---|---|---|---|
id | Integer | Render software version ID | |
cgId | Integer | Render software ID | |
cgName | String | Render software name | |
cgVersion | String | Render software version |
Example of request:
support_software_plugin = api.query.supported_plugin(name='maya')
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": {
"isAutoCommit": 2,
"renderInfoList": [
{
"cgId": 2000,
"cgName": "Maya",
"cgType": "ma;mb",
"iconPath": "/img/softimage/maya.png",
"isNeedProjectPath": 3,
"isNeedAnalyse": 1,
"isSupportLinux": 1
}
],
"defaultCgId": 2001
},
"serverTime": 1535973558961
}
New user rendering environment configuration¶
Interface path:/api/render/plugin/addUserPluginConfig
Request parameter:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
render_env | Dict | Y | Render environment configuration | Detailed parameters refer to |
render_env:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
cgId | Integer | Y | Render software ID | Soft Version.cgId |
cgName | String | Y | Render software name | Soft Version.cgName |
cgVersion | String | Y | Render software version | Soft Version.cgVersion |
renderLayerType | Integer | N | Maya render Type | |
editName | String | Y | render environment custom name | |
renderSystem | Integer | Y | Render system | 0 linux, 1 windows |
pluginIds | List\<Integer> | Y | render plugin list | Plugin Version.plugin Id |
projectPath | String | N | Engineering path |
Return parameter:
Parameter | Type | Description | Memo |
---|---|---|---|
editName | String | render environment custom name |
Example of request:
env = {
"cgId": 2000,
"cgName": "Maya",
"cgVersion": "2020",
"renderLayerType": 0,
"editName": "testRenderEnv",
"renderSystem": "0",
"pluginIds": [1166]
}
add_user_env = api.env.add_render_env(render_env=env)
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": {
"editName": "testRenderEnv"
},
"serverTime": 1535957894211
}
Adjust user render environment configuration¶
Interface path:/api/render/plugin/editUserPluginConfig
Request parameter:
Parameter | Type | Description | Memo | |
---|---|---|---|---|
render_env | Dict | Y | Render environment configuration | Detailed parameters refer to |
render_env:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
cgId | Integer | Y | Render software ID | Soft Version.cgId |
cgName | String | Y | Render software name | Soft Version.cgName |
cgVersion | String | Y | Render software version | Soft Version.cgVersion |
renderLayerType | Integer | N | Maya render Type | |
editName | String | Y | render environment custom name | |
renderSystem | Integer | Y | Render system | 0 linux, 1 windows |
pluginIds | List |
Y | render plugin list | Plugin Version.plugin Id |
projectPath | String | N | Engineering path |
Return parameter:default
Example of request:
update_env = {
"cgId": 2000,
"cgName": "Maya",
"cgVersion": "2020",
"renderLayerType": 0,
"editName": "testRenderEnv",
"renderSystem": "0",
"pluginIds": []
}
update_user_env = api.env.update_render_env(render_env=update_env)
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": null,
"serverTime": 1536027063801
}
Delete user render environment configuration¶
Interface path: /api/render/plugin/deleteUserPluginConfig
Request parameter:
parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
edit_name | String | Y | render environment custom name |
Return parameter:default
Example of request:
delete_user_env = api.env.delete_render_env(edit_name="testRenderEnv")
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": null,
"serverTime": 1536027063801
}
Set up default render environment configuration¶
Interface path:/api/render/plugin/setDefaultUserPluginConfig
Request parameter:
parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
edit_name | String | Y | render environment custom name |
Return parameter:default
Example of request:
set_default_user_env = api.env.set_default_render_env(edit_name="testRenderEnv")
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": null,
"serverTime": 1536027063801
}
Obtain user render environment configuration¶
Interface path:/api/render/plugin/getUserPluginConfig
Request parameter:
Parameter | Type | Description | Memo | |
---|---|---|---|---|
name | String | N | Rendering software name | cg_names and name must fill in one |
cg_names | List\ |
N | 渲染软件名列表 | cg_names and name must fill in one |
os_name | Integer | N | 选择操作系统 | 0:Linux,1:windows,默认1 |
Return parameter: List<RenderEnv>
Parameter | Type | Description | Memo |
---|---|---|---|
cgId | Integer | Render software ID | |
editName | String | render environment custom name | |
cgName | String | Render software name | |
cgVersion | String | Render software version | |
osName | Integer | render environment system | 0:Linux,1:windows |
renderLayerType | Integer | ||
isDefault | Integer | Check if it is the default configuration | 0 Not default configuration 1 Is default configuration |
respUserPluginInfoVos | List\<Plugin Version> | render environment plugin list |
Example of request:
user_render_config = api.env.get_render_env(name='houdini')
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": [
{
"cgId": 2004,
"editName": "175",
"cgName": "Houdini",
"cgVersion": "17.5",
"osName": 1,
"renderLayerType": 0,
"isDefault": 0,
"projectPath": "",
"isMainUserId": 1,
"respUserPluginInfoVos": [
{
"pluginId": 5304,
"pluginName": "renderman",
"pluginVersion": "renderman 22.6"
}
]
},
{
"cgId": 2004,
"editName": "pianwan",
"cgName": "Houdini",
"cgVersion": "17.5",
"osName": 1,
"renderLayerType": 0,
"isDefault": 0,
"projectPath": "",
"isMainUserId": 1,
"respUserPluginInfoVos": []
},
{
"cgId": 2004,
"editName": "houdini_test",
"cgName": "Houdini",
"cgVersion": "17.5",
"osName": 0,
"renderLayerType": 0,
"isDefault": 0,
"projectPath": "",
"isMainUserId": 1,
"respUserPluginInfoVos": []
},
{
"cgId": 2004,
"editName": "16.5",
"cgName": "Houdini",
"cgVersion": "16.5",
"osName": 1,
"renderLayerType": 0,
"isDefault": 0,
"projectPath": "",
"isMainUserId": 1,
"respUserPluginInfoVos": []
}
],
"serverTime": 1578282315348,
"requestId": "23IhQf-VGFzay1TZXJ2aWNlMDQ-1578282315343"
}
Task Progress (Only support Max )¶
Interface path:/api/render/handle/loadTaskProcessImg
Request parameter:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
task_id | Integer | Y | Task ID | required |
frame_type | Integer | N | Frame type | 2:photon,5:picture Without transmission, the background will dynamically return the results according to the stage of the rendering task |
Return parameter:
Parameter | Type | Description | Memo |
---|---|---|---|
width | Integer | Image resolution width | |
height | Integer | Image resolution height | |
block | Integer | Block number | |
isRenderPhoton | Boolean | Is render photon | True:task is render photon |
currentTaskType | String | Task render stage | Render: render picture RenderPhoton: render photon |
sceneName | String | Scene name+camera name | |
startTime | String | Task start time | |
endTime | String | Task end time | |
grabInfo | List\<List\<dict>> | Block frame info |
Block frame info:grabInfo
Parameter | Type | Description | Memo |
---|---|---|---|
startTime | String | Start time | |
endTime | String | End time | |
frameStatus | String | Frame status | |
isMaxPrice | String | Is max picture | |
feeAmount | String | Fee amount | |
couponFee | String | Coupon fee | |
frameIndex | String | Frame number | |
frameBlock | String | Block number | |
framePercent | String | Frame render percent | |
frameUsed | String | Frame render time consumed | |
frameEst | String | Predicted Remaining Time for Frame Rendering | |
renderInfo | String | Frame Rendering Progress Information | |
grabUrl | String | Frame Rendering Schedule Connection Address |
Example of request:
task_processing_img = api.query.get_task_processing_img(task_id=14470635, frame_type=2)
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": {
"isRenderPhoton": true,
"completedTime": "2020-01-03 10:02:55",
"currentTaskType": "RenderPhoton",
"sceneName": "翻新就沙发.max-Camera001",
"grabInfo": [
[
{
"couponFee": "1.04",
"frameIndex": "0",
"renderInfo": "",
"frameBlock": null,
"frameEst": "0",
"grabUrl": "/mnt/output/d2_1/small_pic/100033000/100033433/14470635/RenderPhoton_2020010200306_0_rayvision0000[-]tga.jpg",
"feeAmount": "0.00",
"frameUsed": "174",
"frameStatus": "4",
"framePercent": "100",
"isMaxPrice": "0",
"startTime": "2020-01-03 09:57:18",
"endTime": "2020-01-03 10:00:12"
}
]
],
"width": 700,
"block": 1,
"startTime": "2020-01-02 09:35:51",
"height": 518
},
"serverTime": 1578299393862,
"requestId": "qELLr0-VGFzay1TZXJ2aWNlMDc-1578299393837"
}
Task Setting Of Over Time Stop¶
Interface path: /api/render/handle/setTaskOverTimeStop
Request parameter:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
task_id_list | List\<Integer> | Y | Task ID | required |
overtime | Long | Y | Time of Task stop | Required,unit:second |
Example of request:
set_task_overtime = api.task.set_task_overtime_top(task_id_list=[14684405], overtime=60)
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": "SUCCESS",
"serverTime": 1578308287155,
"requestId": "8VNTma-VGFzay1TZXJ2aWNlMDc-1578308286842"
}
Task thumbnail¶
Interface path:/api/render/handle/loadingFrameThumbnail
Request parameter:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
frame_id | Integer | Y | Frame ID | This can be obtained through the "Obtain the task rendering frame details" interface |
frame_status | Integer | N | Frame status | A value of 4 means complete, only thumbnails are available when completed |
Example of request:
frame_thumbnall = api.query.get_frame_thumbnall(frame_id=230772361)
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": "SUCCESS",
"serverTime": 1578308287155,
"requestId": "8VNTma-VGFzay1TZXJ2aWNlMDc-1578308286842"
}
Get Raysync transmission message¶
Interface path: /api/render/transfer/getServerInfo
Request parameter:No
Example of request:
transfer_server_msg = api.query.get_transfer_server_msg()
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": {
"clientVersion": "3.2.8.2",
"protocolVersion": "3.2.8.2",
"raysyncTransfer": {
"serverIp": "127.0.0.1",
"serverPort": 2121,
"proxyIp": "42.123.110.38",
"proxyPort": 32001,
"sslPort": 2443,
"port": 2442
}
},
"serverTime": 1565678980735,
"requestId": "YenJW9-1565678980088"
}
Get Raysync authentication key¶
Interface path:/api/render/user/getRaySyncUserKey
Request parameter:No
Example of request:
raysync_user_key = api.query.get_raysync_user_key()
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": {
"channel": 2,
"platform": 2,
"signature": "rayvision2017",
"version": "1.0.0",
"userKey": "5394a44e890557d8d937b92086482dab",
"id": 1868599,
"userName": "wsh_12345",
"zone": 1,
"phone": "183160224171",
"email": "testwangshunhui@rayvision",
"loginTime": 1565682011157,
"infoStatus": 0,
"accountType": 2,
"shareMainCapital": 0,
"subDeleteTask": 0,
"subDeleteCapital": 1,
"useMainBalance": 0,
"downloadDisable": 0,
"raySyncUserKey": "40d59041f72809ffaa16146a36780595666c681e"
},
"serverTime": 1565682019430,
"requestId": "4lkn0I-1565682010026"
}
Full Speed Render¶
Interface path: /api/render/handle/fullSpeedRendering
Request parameter:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
task_id_list | List\<Integer> | Y | Yes | Task id |
Example of request:
full_speed_render = api.task.full_speed(task_id_list=[13652193])
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": "成功",
"serverTime": 1578311448826,
"requestId": "X81MN5-VGFzay1TZXJ2aWNlMDQ-1578311448620"
}
Get transport configuration¶
Interface path: /api/render/transfer/getConfig
Request parameter:No
Return parameter:
Parameter | Type | Description | Memo |
---|---|---|---|
inputBid | String | Input bid | |
outputBid | String | output bid | |
configBid | String | config bid | |
parentInputBid | String | Input Bid corresponds to the main account | |
resqEngines | Object[] | Engine configuration | |
engineName | String | Engine name | |
checkServer | String | Check server | |
checkPort | String | Check port | |
checkEnable | String | Check for availability | |
checkExcludType | String | Detect exception file type, separate | |
automaticCheck | number | Automatic detection and switching of line 1 is 0: No | |
isDefault | number | 1: Yes; 0: No, default 1 | |
resqEngineAccounts | Object[] | aspera account | |
bid | String | aspera input bid | |
name | String | aspera username | |
password | String | aspera password | |
respTaskEngineLines | Object[] | Engine list | |
name | String | Line name | |
server | String | Line server IP | |
port | String | Line server port | |
isDefault | Number | 1: Yes; 0: No, default 1 | |
lineId | Number | ID of line tables | |
type | Number | Line type 1. Special line 0. General line | |
subUserOutputBids | Object[] | Collection outputbid subaccount | |
userId | String | ID of subaccount | |
outputBid | String | outputBid |
Example of request:
transfer_config = api.transmit.get_transfer_config()
Example of return:
{
"version": "1.0.0",
"result": true,
"message": "success",
"code": 200,
"data": {
"inputBid": "10202",
"outputBid": "20202",
"configBid": "30201",
"parentInputBid": null,
"resqEngines": [
{
"resqEngineAccounts": [
{
"bid": "20202",
"name": "20202",
"password": "xB9CWAML1qd+k1X9prYHheQUAtZ0hcpmJHxe7mfVw9Q="
}
],
"respTaskEngineLines": [
{
"name": "Aspera_main",
"server": "10.60.197.79",
"port": "10221",
"isDefault": 1,
"lineId": 123,
"type":1
}
],
"engineName": "trtt",
"automaticCheck": 1,
"checkServer": "677",
"checkPort": "8888",
"checkEnable": "1",
"checkExcludType": "88",
"isDefault": 0
},
{
"resqEngineAccounts": null,
"respTaskEngineLines": [
{
"name": "raysync_main",
"server": "10.60.197.79",
"port": "10200",
"isDefault": 1,
"lineId": 121
}
],
"engineName": "RaySync",
"automaticCheck": 0,
"checkServer": "10.60.196.151",
"checkPort": "10100",
"checkEnable": "0",
"checkExcludType": "tx",
"isDefault": 1
},
{
"resqEngineAccounts": [
{
"bid": "30201",
"name": "30201",
"password": "ACz/0lNMCgyq/7WjR0QGpaXmR0/Xb0//6UaMn/s8QN4="
}
],
"respTaskEngineLines": [
{
"name": "Aspera_main",
"server": "10.60.197.79",
"port": "10221",
"isDefault": 1,
"lineId": 123
}
],
"engineName": "Aspera",
"automaticCheck": 0,
"checkServer": "test2.raysync.cn",
"checkPort": "8888",
"checkEnable": "0",
"checkExcludType": "tx",
"isDefault": 0
}
],
"subUserOutputBids": [
{
"userId": "119784",
"outputBid": "10202"
}
]
},
"serverTime": 1587380763325,
"requestId": "K7wW6L-QmV5b25kTGVlZGVNYWNCb29rLVByby5sb2NhbA-1587380762156"
}
Upload the task profile¶
Interface path: /api/render/submit/taskJsonFile
Request parameter:
Parameter | Type | Necessary | Description | Memo |
---|---|---|---|---|
task_id | Integer | Y | task id | |
content | String | Y | File values in jsonformat | |
file_name | String | N | file name | default“task.json” |
Return parameter:No
Example of request:
start_task = api.task.start_task(task_param_list=[13798105])
Example of return:
{
"version": "2.0.0",
"result": true,
"message": "success",
"code": 200,
"data": null,
"serverTime": 1589532607599,
"requestId": null
}
Log Management¶
Warning
Make sure local Python environment and PIP are available before use.
Demo¶
rayvision_log An example is given as follows: demo
import logging
from rayvision_log import init_logger
package_name = 'mylog'
init_logger(package_name)
logging.info('test')
Set the log path¶
- Default path
Mac OS X:
~/Library/Logs/<AppName>/Logs/<username>/<hostname>.log
Unix:
~/.cache/<AppName>/log/Logs/<username>/<hostname>.log
Window:
C:Users<username>AppDataLocal<AppAuthor><AppName>Logs<username><hostname>.log
- Customized path
- Define parameter:
RAYVISION_LOG_ROOT = "xxxx"
- Set RAYVISION_LOG_ROOT as environment variable
- The log files will be saved in RAYVISION_LOG_ROOT
Log interface¶
Basic logging setup.
-
rayvision_log.core.
get_default_log_config
()¶ Get the default logging configuration.
Returns: The default logging configuration. Return type: dict
-
rayvision_log.core.
init_logger
(app_name)¶ Initialize logging with our default configuration.
An easier interface for artists to use to create loggers in their packages and applications. Any application that uses this will use the default logging configuration.
Examples
>>> import logging >>> from rayvision_log import init_logger >>> app_name = "rayvision_api" >>> init_logger(app_name) >>> LOG = logging.getLogger(app_name)
Parameters: app_name (str) – The application or package name for which to create a logger.
-
rayvision_log.core.
set_up_logger
(app_name, log_config, use_orginal=False)¶ Set up loggers based on given name and configuration.
Example
>>> app_name = "rayvision_api" >>> log_config = { formatters: { file: { format: '%(asctime)s [%(levelname)s] %(name)s: %(message)s' } }, handlers: { file: { class: concurrent_log_handler.ConcurrentRotatingFileHandler } } }
Parameters: References
Note
Mainly to verify the analysis results
Task Information Verification¶
Mainly to check task information (task_info) and uploading (upload) asset information. Whether it is automated analysis using the SDK or user-defined local analysis, the result must be verified in this step.
Check the analysis results.
Check the analysis of the task information and upload asset information.
-
class
rayvision_api.task.check.
RayvisionCheck
(api, analyze=None, workspace=None)¶ Bases:
object
Check the analysis results.
-
check_analyze
(analyze, workspace, is_cover=True)¶ Initializes the configuration file information.
-
check_error_warn_info
(language='0')¶ Check the error in the analysis scenario.
According to the status code of the analyzed error information, the API interface is called to obtain detailed error information and solutions, and the warning information is printed out, and the number of error information is recorded.
Parameters: - language (str) – The language that identifies the details of the
- obtained, 0 (error) – Chinese (default) 1: English.
Returns: List of detailed descriptions of errors.
Return type:
-
static
check_path
(tmp_path)¶ Check if the path exists.
-
check_task_info
(task_info)¶ Check and add the required parameter information.
-
check_workspace
(workspace)¶ Check the working environment.
Parameters: workspace (str) – Workspace path. Returns: Workspace path. Return type: str
-
execute
(task_json, upload_json='', asset_json='', is_cover=True, only_id=True)¶ Check asset configuration information.
Check the scene for problems and filter unwanted configuration information. :param is_cover: Whether the updated json file overwrites the file under the original path,
by default ‘True’.
-
get_json_info
(data)¶
-
is_scene_have_error
()¶ Check the scene.
Determine whether the scene has an error based on the number of serious errors.
Raises: RayvisionError
– There is a problem with the scene.
-
write
(only_id=True)¶ Check and write to a json file.
-
Upload¶
1. Upload file cutting¶
Some upload.json files may have up to hundreds of thousands of resources, at this time you may need to cut the upload file。
def cutting_upload(upload_path, max_resources_number=None, after_cutting_position=None):
"""Cut upload.json according to the number of custom files.
Args:
upload_path (str): upload.json absolute path.
max_resources_number (int): Maximum number of resources in each upload file.
after_cutting_position (str): save location of upload file generated after cutting.
Returns:
list: Absolute path of all upload files generated after cutting, excluding original upload files.
e.g.:
['D:\\test\\test_upload\\1586250829\\upload_1.json',
'D:\\test\\test_upload\\1586250829\\upload_2.json']
"""
Use example:
from rayvision_sync.utils import cutting_upload
upload_pool = cutting_upload(r"D:\test\test_upload\1586250829\upload.json", max_resources_number=800)
2. Multi-thread upload¶
Multiple uploads can use multi-threaded concurrent upload
def multi_thread_upload(self, upload_pool, thread_num=10):
"""muti thread upload resource.
Args:
upload_pool (list or tuple): Store a list or ancestor of uploaded files.
thread_num (int): Number of threads, 10 threads are enabled by default.
"""
Use example:
from rayvision_api import RayvisionAPI
from rayvision_sync.upload import RayvisionUpload
api = RayvisionAPI(access_id="xxxxx",
access_key="xxxxx",
domain="task.renderbus.com",
platform="2")
UPLOAD = RayvisionUpload(api)
UPLOAD.multi_thread_upload(upload_pool, thread_num=20)
3. Use thread pool to control upload¶
Thread pool can also be used for concurrent uploads
def thread_pool_upload(self, upload_pool, pool_size=10):
"""Thread pool upload.
Args:
upload_pool (list or tuple): store a list or ancestor of uploaded files.
pool_size (int): thread pool size, default is 10 threads.
"""
pool = ThreadPoolExecutor(pool_size)
for i in range(len(upload_pool)):
pool.submit(self.upload_asset, upload_pool[i])
pool.shutdown(wait=True)
Use example:
from rayvision_api import RayvisionAPI
from rayvision_sync.upload import RayvisionUpload
api = RayvisionAPI(access_id="xxxxx",
access_key="xxxxx",
domain="task.renderbus.com",
platform="2")
UPLOAD = RayvisionUpload(api)
UPLOAD.thread_pool_upload(upload_pool, pool_size=20)
4. Only upload resources in upload¶
Users who upload upload resources only need to log in
def upload_asset(self, upload_json_path, max_speed=None, is_db=True):
"""Run the cmd command to upload asset files.
Args:
upload_json_path (str): Path to the upload.json file.
max_speed (str): Maximum transmission speed, default value
is 1048576 KB/S.
is_db (bool): Whether to produce local database record upload file.
Returns:
bool: True is success, False is failure.
"""
Use example:
from rayvision_api import RayvisionAPI
from rayvision_sync.upload import RayvisionUpload
api = RayvisionAPI(access_id="xxxxx",
access_key="xxxxx",
domain="task.renderbus.com",
platform="2")
UPLOAD = RayvisionUpload(api)
UPLOAD.upload_asset(r"D:\test\test_upload\1586250829\upload.json")
5. Only upload the json configuration file generated by analysis¶
def upload_config(self, task_id, config_file_list, max_speed=None):
"""Run the cmd command to upload configuration profiles.
Args:
task_id (str): Task id.
config_file_list (list): Configuration file path list.
max_speed (str): Maximum transmission speed, default value
is 1048576 KB/S.
Returns:
bool: True is success, False is failure.
"""
Use example:
from rayvision_api import RayvisionAPI
from rayvision_sync.upload import RayvisionUpload
api = RayvisionAPI(access_id="xxxxx",
access_key="xxxxx",
domain="task.renderbus.com",
platform="2")
CONFIG_PATH = [
r"C:\workspace\work\tips.json",
r"C:\workspace\work\task.json",
r"C:\workspace\work\asset.json",
r"C:\workspace\work\upload.json",
]
UPLOAD = RayvisionUpload(api)
UPLOAD.upload_config("5165465", CONFIG_PATH)
6. Upload the configuration file first and then automatically upload the resource according to the upload file (task id must be)¶
def upload(self, task_id, task_json_path, tips_json_path, asset_json_path,
upload_json_path, max_speed=None):
"""Run the cmd command to upload the configuration file.
Args:
task_id (str, optional): Task id.
task_json_path (str, optional): task.json file absolute path.
tips_json_path (str, optional): tips.json file absolute path.
asset_json_path (str, optional): asset.json file absolute path.
upload_json_path (str, optional): upload.json file absolute path.
max_speed (str): Maximum transmission speed, default value
is 1048576 KB/S.
Returns:
bool: True is success, False is failure.
"""
Use example:
from rayvision_api import RayvisionAPI
from rayvision_sync.upload import RayvisionUpload
api = RayvisionAPI(access_id="xxxxx",
access_key="xxxxx",
domain="task.renderbus.com",
platform="2")
CONFIG_PATH = [
r"C:\workspace\work\tips.json",
r"C:\workspace\work\task.json",
r"C:\workspace\work\asset.json",
r"C:\workspace\work\upload.json",
]
upload_obj = RayvisionUpload(api)
upload_obj.upload("5165465", **CONFIG_PATH)
7. append_to_upload: Custom upload.json file¶
from rayvision_api import RayvisionAPI
from rayvision_sync.upload import RayvisionUpload
from rayvision_api.utils import append_to_upload
api = RayvisionAPI(access_id="xxxxx",
access_key="xxxxx",
domain="jop.foxrenderfarm.com",
platform="2")
UPLOAD = RayvisionUpload(api)
# 1. Can accept the list, the list can be passed in the folder path or file path
custom_info_to_upload = [
r"E:\fang\ass_test\static_ass.ass",
r"E:\fang",
r"D:\houdini\CG file\F"
]
# 2.You can also receive a single string
# custom_info_to_upload = r"D:\houdini\CG file\katana_file"
# Need to specify an existing upload.json path
append_to_upload(custom_info_to_upload, r"D:\test\upload.json")
UPLOAD.upload_asset(r"D:\test\upload.json")
8. Customize upload service address and transport engine selection¶
Upload service address generally does not need to be modified, if the line is not good also support custom modification.
1. The following upload interface supports custom server addresses and transport engine Settings¶
Transport engine support: “aspera” and “raysync”
upload_asset
UPLOAD.upload_asset(r"D:\test\upload.json", engine_type='aspera', server_ip="45.251.92.16", server_port="12121")
upload_config
CONFIG_PATH = [ r"C:\workspace\work\tips.json", r"C:\workspace\work\task.json", r"C:\workspace\work\asset.json", r"C:\workspace\work\upload.json", ] UPLOAD.upload_config(task_id="5165465", config_file_list=config_list, server_ip="45.251.92.16", server_port="12121")
upload
UPLOAD.upload(task_id="41235091", engine_type='aspera', server_ip="45.251.92.16", server_port="12121", task_json_path=r"C:\workspace\work\task.json", tips_json_path=r"C:\workspace\work\tips.json", asset_json_path=r"C:\workspace\work\asset.json", upload_json_path=r"C:\workspace\work\upload.json")
9. Upload file type (transmit_type)¶
The upload file is controlled by the parameter “transmit_type”, and the supported transmission file formats are: “upload_list” and “upload_json”.
- upload_list
The content of the “upload_json_path” file specified by this upload mode (support txt and json files) can be a file absolute path or folder absolute path for each line. If it is a folder, all files in the folder will be uploaded.
For Example:
- upload_json
The content of the “upload_json_path” file (json file) specified by this upload mode must follow a fixed format, and only files can be uploaded.
例如:
// upload.json { "asset": [ { "local": "D:/houdini/CG file/local/clarisse_test1.project", "server": "/D/houdini/CG file/local/clarisse_test1.project" } ] }
Download¶
1. The automatic download is completed with a single frame as the granularity rendering (task id must be)¶
def auto_download(self, 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):
"""Automatic download (complete one frame download).
Wait for all downloads to update undownloaded records.
Args:
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 "raysync", 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.
Returns:
bool: True is success.
"""
Use example
from rayvision_api import RayvisionAPI
from rayvision_sync.download import RayvisionDownload
api = RayvisionAPI(access_id="xxx",
access_key="xxx",
domain="task.renderbus.com",
platform="2")
download = RayvisionDownload(api)
download.auto_download([18164087], download_filename_format="false")
2. Taking task as the granularity, downloading starts when all frames in the task are rendered (task id must be)¶
def auto_download_after_task_completed(self, 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):
"""Auto download after the tasks render completed.
Args:
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 "raysync", 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.
Returns:
bool: True is success.
"""
Use example
from rayvision_api import RayvisionAPI
from rayvision_sync.download import RayvisionDownload
api = RayvisionAPI(access_id="xxx",
access_key="xxx",
domain="task.renderbus.com",
platform="2")
download = RayvisionDownload(api)
download.auto_download_after_task_completed([18164087], download_filename_format="false")
3. User-defined download server directory structure download (task id is not required)¶
def download(self, 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):
"""Download and update the undownloaded record.
Args:
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 "raysync", 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.
Returns:
bool: True is success.
"""
Use example:
from rayvision_api import RayvisionAPI
from rayvision_sync.download import RayvisionDownload
api = RayvisionAPI(access_id="xxx",
access_key="xxx",
domain="task.renderbus.com",
platform="2")
download = RayvisionDownload(api)
download.download(download_filename_format="true", server_path="18164087_muti_layer_test/l_ayer2")
Maya¶
Analyse assets, save the result as a local json file. Before analysis, verify initial configuration info.
Clarisse¶
Analyse assets, save the result as a local json file. Before analysis, verify initial configuration info.
A interface for clarisse.
-
class
rayvision_clarisse.analyse_clarisse.
AnalyzeClarisse
(cg_file, software_version, project_name=None, plugin_config=None, render_software='Clarisse', local_os=None, workspace=None, custom_exe_path=None, platform='2')¶ Bases:
object
-
add_tip
(code, info)¶ Add error message.
Parameters:
-
analyse
(no_upload=False)¶ Analytical master method for clarrise.
-
analyse_cg_file
()¶ Start analyse cg file.
- Examples cmd command:
“D:/myproject/internal_news/rayvision_clarisse/rayvision_clarisse /tool/Analyze.exe” -cf “E:/copy/DHGB_sc05_zhuta_610-1570_v0102.project” -tj
“c:/workspace/work/10398483/task.json”
-
static
check_local_os
(local_os)¶ Check the system name.
Parameters: local_os (str) – System name. Returns: str
-
static
check_path
(tmp_path)¶ Check if the path exists.
-
check_result
()¶ Check that the analysis results file exists.
-
check_workspace
(workspace)¶ Check the working environment.
Parameters: workspace (str) – Workspace path. Returns: Workspace path. Return type: str
-
gather_upload_dict
()¶ Gather upload info.
Examples
- {
- “asset”: [
- {
- “local”: “E:/copy/muti_layer_test.ma”, “server”: “/E/copy/muti_layer_test.ma”
}
]
}
-
get_file_md5
(file_path)¶ Generate the md5 values for the scenario.
-
save_tips
()¶ Write the error message to tips.json.
-
write_task_json
()¶ The initialization task.json.
-
write_tips_info
()¶ Write tips info.
-
Houdini¶
Analyse assets, save the result as a local json file. Before analysis, verify initial configuration info.
Exception management¶
Customized exception handling
Error message.
CG errors.
-
exception
rayvision_utils.exception.exception.
AnalyseFailError
¶ Bases:
rayvision_utils.exception.exception.AnalyzeError
Analyse Fail Error.
-
exception
rayvision_utils.exception.exception.
AnalyzeError
¶ Bases:
Exception
Analyze has a damage error.
-
exception
rayvision_utils.exception.exception.
CGExeNotExistError
¶ Bases:
rayvision_utils.exception.exception.AnalyzeError
No errors in CG boot.
-
exception
rayvision_utils.exception.exception.
CGFileNameIllegalError
¶ Bases:
rayvision_utils.exception.exception.AnalyzeError
CG File Name Illegal Error.
-
exception
rayvision_utils.exception.exception.
CGFileNotExistsError
¶ Bases:
rayvision_utils.exception.exception.AnalyzeError
CG file does not exist error.
-
exception
rayvision_utils.exception.exception.
CGFileZipFailError
¶ Bases:
rayvision_utils.exception.exception.AnalyzeError
CG file compression failed error.
-
exception
rayvision_utils.exception.exception.
CompressionFailedError
¶ Bases:
Exception
Compression failed error.
-
exception
rayvision_utils.exception.exception.
DecompressionFailedError
¶ Bases:
Exception
Unzip failed error.
-
exception
rayvision_utils.exception.exception.
FileNameContainsChineseError
¶ Bases:
rayvision_utils.exception.exception.AnalyzeError
File Name Contains Chinese Error.
-
exception
rayvision_utils.exception.exception.
GetCGLocationError
¶ Bases:
rayvision_utils.exception.exception.AnalyzeError
Error getting CG local path.
-
exception
rayvision_utils.exception.exception.
GetCGVersionError
¶ Bases:
rayvision_utils.exception.exception.AnalyzeError
Error getting CG version.
-
exception
rayvision_utils.exception.exception.
GetRendererError
¶ Bases:
rayvision_utils.exception.exception.AnalyzeError
Get renderer error.
-
exception
rayvision_utils.exception.exception.
MaxDamageError
¶ Bases:
rayvision_utils.exception.exception.AnalyzeError
Max has a damage error.
-
exception
rayvision_utils.exception.exception.
MaxExeNotExistError
¶ Bases:
rayvision_utils.exception.exception.AnalyzeError
There are no errors in the Max startup file.
-
exception
rayvision_utils.exception.exception.
MultiScatterAndVrayConfilictError
¶ Bases:
rayvision_utils.exception.exception.AnalyzeError
Multi scatter and vray Confilict error.
-
exception
rayvision_utils.exception.exception.
ProjectMaxVersionError
¶ Bases:
rayvision_utils.exception.exception.AnalyzeError
Project Max version error.
-
exception
rayvision_utils.exception.exception.
RayvisionAPIError
(error_code, error, request)¶ Bases:
rayvision_utils.exception.exception.RayvisionError
Raise RayVisionAPIError.
-
exception
rayvision_utils.exception.exception.
RayvisionError
(error_code, error, *args, **kwargs)¶ Bases:
Exception
Raise RayvisionError if something wrong.
-
class
rayvision_utils.exception.exception.
RayvisionHTTPErrorProcessor
¶ Bases:
urllib.request.HTTPErrorProcessor
Process HTTP error responses.
Inherit HTTPErrorProcessor in urllib2.
-
http_response
(request, response)¶ Override the http_response method of HTTPErrorProcessor.
Process the response,when it is a bad Request,the corresponding exception is reported.
Parameters: - request (urllib2.Request) – Request object.
- response (opener.open) – Response object.
Returns: Abnormal response.
Return type:
-
-
exception
rayvision_utils.exception.exception.
RayvisonTaskIdError
(error)¶ Bases:
rayvision_utils.exception.exception.RayvisionError
Raise RayVisonTaskIdError.
-
exception
rayvision_utils.exception.exception.
VersionNotMatchError
¶ Bases:
rayvision_utils.exception.exception.AnalyzeError
Version not match error.
Handle tips messages and write them to tips.json.
-
class
rayvision_utils.exception.tips.
TipsInfo
(save_path=None)¶ Bases:
object
Handling errors encountered in the analysis.
-
add
(key, *values)¶ Add tips message.
Parameters:
-
save_and_exit
(path, exit_code=-1)¶ Save the prompt to the tips.json file and exit.
Parameters:
-
Detailed parameter configuration¶
Clarisse Configuration¶
Analyze clarisse scene and save the output as task.json, asset.json, upload.json and tips.json.
1.task.json¶
File to save the analysis result of the scene, including scene name, cg software version, render settings, etc.
task.json example
{
"scene_info_render": {
"image_node": [
{
"frames": "0-50[1]",
"renderable": "0",
"output": "D:\\temp\\cam02",
"format": "exr16",
"LUT": "linear",
"save_to_disk": "1",
"name": "project://scene/cam02",
"layers": [
{
"frames": "0-50[1]",
"renderable": "1",
"output": "D:\\temp\\cam02_layer02",
"format": "exr16",
"enable_deep_output": "1",
"save_to_disk": "1",
"enable_deep_output_path": "D:\\temp\\cam02_layer02_deep",
"name": "project://scene/cam02.cam02_layer02"
}
]
}
]
},
"software_config":{
"plugins":{},
"cg_version":"clarisse_ifx_4.0_sp3",
"cg_name":"Clarisse"
},
"task_info":{
"task_stop_time":"259200",
"frames_per_task":"1",
"channel":"4",
"task_id":"11022523",
"project_name":"Project1",
"platform":"2",
"tiles":"1",
"is_picture":"0",
"project_id":"200953",
"job_stop_time":"86400",
"distribute_render_node":"3",
"stop_after_test":"2",
"clone_original_id":"",
"ram":"64",
"render_layer_type":"0",
"test_frames":"000",
"graphics_cards_num":"2",
"edit_name":"",
"pre_frames":"000",
"input_project_path":"",
"enable_layered":"1",
"is_distribute_render":"0",
"time_out":"43200",
"tiles_type":"block",
"user_id":"100150764",
"cg_id":"2013",
"input_cg_file":"E:/copy/DHGB_sc05_zhuta_610-1570_v0102.project",
"os_name":"1",
},
"scene_info":{
"image_node": [
{
"frames": "0-50[1]",
"renderable": "0",
"output": "D:\\temp\\cam02",
"format": "exr16",
"LUT": "linear",
"save_to_disk": "1",
"name": "project://scene/cam02",
"layers": [
{
"frames": "0-50[1]",
"renderable": "1",
"output": "D:\\temp\\cam02_layer02",
"format": "exr16",
"enable_deep_output": "1",
"save_to_disk": "1",
"enable_deep_output_path": "D:\\temp\\cam02_layer02_deep",
"name": "project://scene/cam02.cam02_layer02"
}
]
}
]
}
}
task.json Parametric Interpretation
parameter | type | description | example |
---|---|---|---|
software_config | object | environment(cg software, version and plugins, etc.) | refer to software_config |
task_info | object | render settings(priority frames, render range, etc.) | refer to task_info |
scene_info_render | object | analysis result(render node, output, etc.) | refer to scene_info_render |
software_config
parameter | type | description | example |
---|---|---|---|
cg_name | string | software | "Clarisse" |
cg_version | string | software version | "clarisse_ifx_4.0_sp3" |
plugins | object | plugin{name, version} | {} |
task_info
parameter | type | Is it necessary | description | default | example |
---|---|---|---|---|---|
graphics_cards_num | string | Y | 1: open single card rendering 2: open dual card rendering | "2" | "2" |
enable_layered | string | Y | render layer mode,"0":off, "1":on | "0" | "1" |
cg_id | string | Y | software id."2013": Clarisse | "2013" | |
ram | string | Y | ram: 64 / 128 | "64" | "64" |
os_name | string | Y | Rendering machine operating system: "0":Linux; "1": Windows | "1" | "1" |
render_layer_type | string | N | render layer mode(only support maya): "0":renderlayer方式 "1":rendersetup方式 | "0" | "0" |
is_distribute_render | string | N | distributed render mode,"0":off, "1":on | "0" | "0" |
input_cg_file | string | Y | input file path | "E:/copy/DHGB_sc05_zhuta_610-1570_v0102.project" | |
input_project_path | string | Y | project path, could be empty | " " | |
job_stop_time | string | Y | Set the frame timeout time, will only affect the current frame, unit seconds | "259200" | "28800" |
user_id | string | Y | user id | ||
pre_frames | string | Y | Priority rendering (priority frames are not recommended to customize multiple individual frames) | "000" | "000: 1,3-4 [1]" means: Priority rendering first frame: No Priority rendering middle frame: No Priority rendering last frame: No Priority rendering custom frame: 1,3-4 [1] |
platform | string | Y | submit platform : "2": "www2", "3": "www3", "6": "www4", "21": "gpu", | "2" | |
is_picture | string | Y | "0: Effect Chart "1": Animation Chart | "0" | "0" |
project_id | string | Y | project id | " " | "200953" |
project_name | string | Y | project name | " 0" | "Project1" |
channel | string | Y | 1:Web local analysis (animation deduction); 2:web cloud analysis; 3:Rendering plugin submission; 4:API/SDK submission; 8:Animation plugin submission | "4" | "4" |
tiles_type | string | Y | "block, strip" | "block" | "block" |
tiles | string | Y | tile number, 1 for single node, greater than 1 for tiles rendering(multi-nodes) | "1" | "1" |
distribute_render_node | string | N | nodes number for distributed rendering | "3" | "3" |
frames_per_task | string | Y | frames per task | "1" | "1" |
stop_after_test | string | Y | "1":pause after priority render, "2":continue after priority render (default "2") | "2" | "2" |
task_id | string | Y | task id | ||
task_stop_time | string | Y | Large task timeout stops in unit seconds, "0" means unlimited | "0" | "86400" |
time_out | string | Y | Overtime reminder time, unit: sec | "43200" | "43200" |
Note: Clarisse temporarily does not support distributed rendering (is_distribute_render) and tiled rendering (tiles)
scene_info_render
parameter | type | description | example |
---|---|---|---|
image_node | object | Clarisse IFX includes all images in the scene and 3dlayer under the image, and clarisse BUiLDER includes all VariableRange in the scene and ImageNodeWrite under VariableRange. | refer to scene_info_render.image_node |
scene_info_render.image_node
parameter | type | description | example |
---|---|---|---|
renderable | string | "0": do not open rendering, “1”: open rendering (this is not the value in the scene,the platform is not open by default, the platform is notrecommended to directly render image and VariableRange) |
"0" |
output | string | The output path of the current image in clarisse IFX, no output in clarisse BUiLDER The output path of the current image in clarisse IFX, no in clarisse BUiLDER | "D:\temp\cam02" |
format | string | The output format of the current image in clarisse IFX, optional value, none under clarisse BUiLDER | "exr16" |
LUT | string | The stringIFX manages the output color of the current image. Non-essential values, none under clarisse BUiLDER | "linear" |
save_to_disk | string | Whether to save the output of the current image in clarisse IFX, no under clarisse BUiLDER | "1" |
name | string | The name of the current image in clarisse IFX, the name of the current VariableRange in clarisse BUiLDER, and the path of the two in the scene | "project://scene/cam02" |
layers | string | IFX is the 3dlayer in the current image, the value is list, the value of list is dict, there are several layers of dict in the current image, there are several layers of dict, clarisse BUiLDER is the ImageNodeWrite in the current VariableRange, the value is list, The value of list is dict. How many ImageNodeWrites are in the current VariableRange, there are several dicts of ImageNodeWrites. See scene_info_render.image_node.layers object analysis | scene_info_render.image_node.layers |
frames | string | clarisse IFX is the frame range of the current image, clarisse BUiLDER is the value of the F or Frame variable of the current VariableRange | "0-50[1]" |
scene_info_render.image_node.layers
parameter | type | description | example |
---|---|---|---|
frames | string | clarisse IFX is the current 3dlayer start frame and end frame, and clarisse BUiLDER is the coverage value of the ImageNodeWrite under the current VariableRange | "0-50[1]" |
renderable | string | "0": do not open rendering “1”: open rendering |
"1" |
output | string | The output path of the current layer in clarisse IFX, not under clarisse BUiLDER | "D:\temp\cam02_layer02" |
format | string | The output format of the current layer or ImageNodeWrite | "exr16" |
enable_deep_output | string | Whether to enable deep save output for the current layer in clarisse IFX, no under clarisse BUiLDER | "1" |
save_to_disk | string | Whether to save the output of the current layer in clarisse IFX, no under clarisse BUiLDER | "1" |
enable_deep_output_path | string | clarisse IFX is the deep output path of the current layer, there is no under clarisse BUiLDER | "D:\temp\cam02_layer02_deep" |
name | string | 1: The current layer name in clarisse IFX is also the path in the scene; 2: The name of the current ImageNodeWrite in clarisse BUiLDER, the value is the path in the scene of the current VariableRange and the current imageNodeWrite in the scene Path to === link |
1:"project://scene/cam02.cam02_layer02" 2:“build://yt_0080===build://cloudShadow” |
2.upload.json¶
File to save assets info
upload.json example
{
"scene": [
{
"local": "E:\\work\\Trex\\ep\\ani_fly\\clarisse\\trex_fly_env_songshu.project",
"server": "/E/work/Trex/ep/ani_fly/clarisse/trex_fly_env_songshu.project"
}
],
"asset": [
{
"local": "E:\\work\\Trex\\ep\\ani_fly\\clarisse\\assets\\speedtree\\guanmu01\\LeafHD2.png",
"server": "/E/work/Trex/ep/ani_fly/clarisse/assets/speedtree/guanmu01/LeafHD2.png"
},
{
"local": "E:\\work\\Trex\\ep\\ani_fly\\clarisse\\assets\\speedtree\\tree_far\\tree_far08\\HuangshanPineBark_Normal.png",
"server": "/E/work/Trex/ep/ani_fly/clarisse/assets/speedtree/tree_far/tree_far08/HuangshanPineBark_Normal.png"
}
]
}
upload.json
parameter | type | description | example |
---|---|---|---|
asset | object | Asset path information to be uploaded | refer to asset |
scene | object | Scene file information | refer to scene |
asset
parameter | type | description | example |
---|---|---|---|
local | string | local path of asset | "E:\work\Trex\ep\ani_fly\clarisse\assets\speedtree\guanmu01\LeafHD2.png" |
server | string | Relative path on the server side, generally consistent with local | "/E/work/Trex/ep/ani_fly/clarisse/assets/speedtree/guanmu01/LeafHD2.png" |
scene
parameter | type | description | example |
---|---|---|---|
local | string | local path of project | "E:\work\Trex\ep\ani_fly\clarisse\trex_fly_env_songshu.project" |
server | string | Relative path on the server side, generally consistent with local | "/E/work/Trex/ep/ani_fly/clarisse/trex_fly_env_songshu.project" |
3.tips.json¶
File to save errors, warnings
{
"50001":[
"Nodes: /obj/flattank_fluid/compressed_cache/file_mode File name: $HIP/geo/$HIPNAME.$OS.$F.bgeo.sc miss file: /geo/flip_test_slice4.compressed_cache.1.bgeo.sc ",
]
}
Houdini Configuration¶
Analyze houdini scene and save the output as task.json, asset.json,upload.json and tips.json.
1.task.json¶
File to save the analysis result of the scene, including scene name, cg software version, render settings, etc.
task.json
{
"scene_info_render": {
"rop_node": [
{
"node": "/out/mantra1",
"frames": "1-10[1]",
"option": "-1",
"render": "1",
"height": "720",
"width": "1280"
}
],
"geo_node": [],
"distributedsim_node": [
{
"node": "/out/distributedsim",
"output_driver": "/obj/distribute_flattank/save_slices",
"render": "0",
"simControlName": "/obj/flattank_sim/DISTRIBUTE_flattank_CONTROLS",
"output_file": "/geo/flip_test_slice4.flattank.0.1.bgeo.sc",
"num_slices": "4",
"option": "1",
"frames": "1-240[1]",
"sliceType": "particle"
}
]
},
"task_info": {
"enable_layered":"1",
"cg_id": "2004",
"ram": "64",
"os_name": "1",
"render_layer_type": "0",
"is_distribute_render": "1",
"input_cg_file": "D:/gitlab/renderSDK/scenes/houdini_test/sphere.hip",
"job_stop_time": "28800",
"user_id": "10000031",
"pre_frames": "000",
"platform": "2",
"is_picture": "0",
"project_id": "3316",
"channel": "4",
"tiles_type": "block",
"tiles": "1",
"project_name": "dasdd",
"distribute_render_node": "3",
"frames_per_task": "1",
"stop_after_test": "2",
"input_project_path": "",
"task_id": "440149",
"task_stop_time": "86400",
"time_out": "12",
"graphics_cards_num": "2"
},
"software_config": {
"cg_version": "16.5.268",
"cg_name": "Houdini",
"plugins": {}
}
}
task.json Parametric Interpretation
parameter | type | description | example | |
---|---|---|---|---|
software_config | object | Y | environment(cg software, version and plugins, etc.) | refer to software_config |
task_info | object | Y | render settings(priority frames, render range, etc.) | refer to task_info |
scene_info_render | object | Y | analysis result(render node, output, etc.) | refer to scene_info_render |
software_config
parameter | type | description | example |
---|---|---|---|
cg_name | string | software | "Houdini" |
cg_version | string | software version | "16.5.268" |
plugins | object | plugin{name, version} | {} |
task_info
parameter | type | Is it necessary | description | default | example |
---|---|---|---|---|---|
graphics_cards_num | string | Y | 1: open single card rendering 2: open dual card rendering | "2" | "2" |
enable_layered | string | Y | render layer mode,"0":off, "1":on | "0" | "1" |
cg_id | string | Y | software id."2004": Houdini | "2013" | |
ram | string | Y | ram: 64 / 128 | "64" | "64" |
os_name | string | Y | Rendering machine operating system: "0":Linux; "1": Windows | "1" | "1" |
render_layer_type | string | N | render layer mode(only support maya): "0":renderlayer方式 "1":rendersetup方式 | "0" | "0" |
is_distribute_render | string | N | distributed render mode,"0":off, "1":on | "0" | "0" |
input_cg_file | string | Y | input file path | "E:/copy/DHGB_sc05_zhuta_610-1570_v0102.project" | |
input_project_path | string | Y | project path, could be empty | " " | |
job_stop_time | string | Y | Set the frame timeout time, will only affect the current frame, unit seconds | "259200" | "28800" |
user_id | string | Y | user id | ||
pre_frames | string | Y | Priority rendering (priority frames are not recommended to customize multiple individual frames) | "000" | "000: 1,3-4 [1]" means: Priority rendering first frame: No Priority rendering middle frame: No Priority rendering last frame: No Priority rendering custom frame: 1,3-4 [1] |
platform | string | Y | submit platform : "2": "www2", "3": "www3", "6": "www4", "21": "gpu", | "2" | |
is_picture | string | Y | "0: Effect Chart "1": Animation Chart | "0" | "0" |
project_id | string | Y | project id | " " | "200953" |
project_name | string | Y | project name | " 0" | "Project1" |
channel | string | Y | 1:Web local analysis (animation deduction); 2:web cloud analysis; 3:Rendering plugin submission; 4:API/SDK submission; 8:Animation plugin submission | "4" | "4" |
tiles_type | string | Y | "block, strip" | "block" | "block" |
tiles | string | Y | tile number, 1 for single node, greater than 1 for tiles rendering(multi-nodes) | "1" | "1" |
distribute_render_node | string | N | nodes number for distributed rendering | "3" | "3" |
frames_per_task | string | Y | frames per task | "1" | "1" |
stop_after_test | string | Y | "1":pause after priority render, "2":continue after priority render (default "2") | "2" | "2" |
task_id | string | Y | task id | ||
task_stop_time | string | Y | Large task timeout stops in unit seconds, "0" means unlimited | "0" | "86400" |
time_out | string | Y | Overtime reminder time, unit: sec | "43200" | "43200" |
Note:The distributed rendering machine (distribute_render_node) will only take effect if the distributed storage parameter (distribute_render_node) is set to on.
scene_info_render
parameter | type | description | example |
---|---|---|---|
rop_node | object | Render node | |
geo_node | object | Solve node | |
distributedsim_node | object | Distributed node |
scene_info_render.rop_node和geo_node
parameter | type | Is it necessary | description | example |
---|---|---|---|---|
node | string | Y | Node full path name | "/out/mantra1" |
frames | string | Y | Frame number range | "1-10[1]" |
option | string | Y | Task type: -1: rendering; 0: general solution; 1: distributed solution; |
"-1" |
render | string | Y | Whether to activate rendering: 1: Render (solve) the node; 0: The node does not participate in rendering (solve) |
"1" |
height | string | N | Camera height | “720” |
width | string | N | Camera width | “1280” |
scene_info_render.distributedsim_node对象解析
parameter | type | Is it necessary | description | example |
---|---|---|---|---|
node | string | Y | Node full path name | "/out/distributedsim" |
output_driver | string | N | Solve node path | "/obj/distribute_flattank/save_slices" |
render | string | Y | Whether to activate rendering: 1: Render (solve) the node; 0: The node does not participate in rendering (solve) |
"0" |
simControlName | string | N | Solve node name | "/obj/flattank_sim/DISTRIBUTE_flattank_CONTROLS" |
output_file | string | N | Output file | "/geo/flip_test_slice4.flattank.0.1.bgeo.sc" |
num_slices | string | N | Block calculation of the total number of blocks (the total cannot exceed 16) | "4" |
option | string | Y | Task type: -1: rendering; 0: general solution; 1: distributed solution; |
"1" |
frames | string | Y | Solve Frame Range | "1-240[1]" |
sliceType | string | N | Slice type | "particle" |
2.upload.json¶
File to save asset info
upload.json example
{
"asset": [
{
"local": "D:/gitlab/renderSDK/scenes/houdini_test/sphere.hip",
"server": "/D/gitlab/renderSDK/scenes/houdini_test/sphere.hip"
}
]
}
upload.json
parameter | type | description | example |
---|---|---|---|
asset | object | Asset path information to be uploaded | refer to asset |
asset
parameter | type | description | example |
---|---|---|---|
local | string | local path of asset | "D:/gitlab/renderSDK/scenes/houdini_test/sphere.hip" |
server | string | Relative path on the server side, generally consistent with local | "/D/gitlab/renderSDK/scenes/houdini_test/sphere.hip" |
3.tips.json¶
File to save errors, warnings
{
"50001":[
"Nodes: /obj/flattank_fluid/compressed_cache/file_mode File name: $HIP/geo/$HIPNAME.$OS.$F.bgeo.sc miss file: /geo/flip_test_slice4.compressed_cache.1.bgeo.sc "
]
}
Maya Configuration¶
Analyze clarisse scene and save the output as task.json, asset.json, upload.json and tips.json.
1.task.json¶
File to save the analysis result of the scene, including scene name, cg software version, render settings, etc.
task.json
{
"scene_info_render": {
"defaultRenderLayer": {
"renderable": "1",
"env": {},
"is_default_camera": "1",
"option": "",
"common": {
"image_format": "exr",
"end": "10",
"width": "960",
"image_file_prefix": "",
"all_camera": [
"stereoCameraRightShape",
"stereoCameraLeftShape",
"stereoCameraCenterCamShape",
"perspShape",
"cameraShape2",
"cameraShape1"
],
"render_camera": [
"cameraShape1"
],
"start": "1",
"animation": "False",
"renderer": "mentalRay",
"frames": "1-10[1]",
"height": "540",
"renumber_frames": "False",
"by_frame": "1"
}
},
"mut": {
"renderable": "1",
"is_default_camera": "1",
"option": "",
"common": {
"image_format": "exr",
"end": "10",
"width": "960",
"image_file_prefix": "",
"all_camera": [
"stereoCameraRightShape",
"stereoCameraLeftShape",
"stereoCameraCenterCamShape",
"perspShape",
"cameraShape2",
"cameraShape1"
],
"render_camera": [
"cameraShape1",
"stereoCameraLeftShape"
],
"start": "1",
"animation": "False",
"renderer": "mentalRay",
"frames": "1-10[1]",
"height": "540",
"renumber_frames": "False",
"by_frame": "1"
}
}
},
"task_info": {
"enable_layered": "1",
"cg_id": "2000",
"ram": "64",
"os_name": "1",
"render_layer_type": "0",
"is_distribute_render": "0",
"input_cg_file": "D:/chensr/scene/maya2016_multi_layers_cameras.ma",
"job_stop_time": "28800",
"user_id": "10000031",
"pre_frames": "000",
"platform": "2",
"is_picture": "0",
"project_id": "3316",
"channel": "4",
"tiles_type": "block",
"tiles": "1",
"project_name": "dasdd",
"distribute_render_node": "3",
"frames_per_task": "1",
"stop_after_test": "2",
"input_project_path": "",
"task_id": "439800",
"task_stop_time": "86400",
"time_out": "12",
"graphics_cards_num": "2"
},
"software_config": {
"cg_version": "2016",
"cg_name": "Maya",
"plugins": {}
}
}
task.json
parameter | type | description | example |
---|---|---|---|
software_config | object | environment(cg software, version and plugins, etc.) | refer to software_config |
task_info | object | render settings(priority frames, render range, etc.) | refer to task_info |
scene_info_render | object | analysis result(render node, output, etc.) | refer to scene_info_render |
software_config
parameter | type | Is it necessary | description | example |
---|---|---|---|---|
cg_name | string | Y | software | "Maya" |
cg_version | string | Y | software version | "2016" |
plugins | object | Y | plugin{name, version} | {} |
task_info
parameter | type | Is it necessary | description | default | example |
---|---|---|---|---|---|
graphics_cards_num | string | Y | 1: open single card rendering 2: open dual card rendering | "2" | |
enable_layered | string | Y | render layer mode,"0":off, "1":on | "0" | "1" |
cg_id | string | Y | software id."2000": Maya | "2013" | |
ram | string | Y | ram: 64 / 128 | "64" | "64" |
os_name | string | Y | Rendering machine operating system: "0":Linux; "1": Windows | "1" | "1" |
render_layer_type | string | N | render layer mode: "0":renderlayer "1":rendersetup | "0" | "0" |
is_distribute_render | string | N | distributed render mode,"0":off, "1":on | "0" | "0" |
input_cg_file | string | Y | input file path | "E:/copy/DHGB_sc05_zhuta_610-1570_v0102.project" | |
input_project_path | string | Y | project path, could be empty | " " | |
job_stop_time | string | Y | Set the frame timeout time, will only affect the current frame, unit seconds | "259200" | "28800" |
user_id | string | Y | user id | ||
pre_frames | string | Y | Priority rendering (priority frames are not recommended to customize multiple individual frames) | "000" | "000: 1,3-4 [1]" means: Priority rendering first frame: No Priority rendering middle frame: No Priority rendering last frame: No Priority rendering custom frame: 1,3-4 [1] |
platform | string | Y | submit platform : "2": "www2", "3": "www3", "6": "www4", "21": "gpu", | "2" | |
is_picture | string | Y | "0: Effect Chart "1": Animation Chart | "0" | "0" |
project_id | string | Y | project id | " " | "200953" |
project_name | string | Y | project name | " 0" | "Project1" |
channel | string | Y | 1:Web local analysis (animation deduction); 2:web cloud analysis; 3:Rendering plugin submission; 4:API/SDK submission; 8:Animation plugin submission | "4" | "4" |
tiles_type | string | Y | "block, strip" | "block" | "block" |
tiles | string | Y | tile number, 1 for single node, greater than 1 for tiles rendering(multi-nodes) | "1" | "1" |
distribute_render_node | string | N | nodes number for distributed rendering | "3" | "3" |
frames_per_task | string | Y | frames per task | "1" | "1" |
stop_after_test | string | Y | "1":pause after priority render, "2":continue after priority render (default "2") | "2" | "2" |
task_id | string | Y | task id | ||
task_stop_time | string | Y | Large task timeout stops in unit seconds, "0" means unlimited | "0" | "86400" |
time_out | string | Y | Overtime reminder time, unit: sec | "43200" | "43200" |
Note:
- Only when layering is enabled (enable_layered) can you use tiled rendering. Tiled rendering mode (tiles_type) and one machine multi-frame rendering mode (frames_per_task) are mutually exclusive. Only one mode can be used at the same time
- Maya currently does not support distributed rendering (is_distribute_render).
scene_info_render
parameter | type | Is it necessary | description | example |
---|---|---|---|---|
layer | object | Y | layer info | refer to scene_info_render.layer |
scene_info_render.layer
parameter | type | description | example | |
---|---|---|---|---|
renderable | string | Y | Render layer switch | "1" |
env | object | N | Environmental information | {} |
is_default_camera | string | N | Whether to use the default camera, the default value is ‘1’ (use the default camera) | "1" |
option | string | N | Renderer corresponding information | "" |
common | object | Y | Scene general information | refer to scene_info_render.layer.common |
scene_info_render.layer.common
parameter | type | Is it necessary | description | example |
---|---|---|---|---|
image_format | string | Y | Render element output file type | "jpg" |
end | string | Y | end frame | "100" |
width | string | Y | Width-resolution | "1920" |
image_file_prefix | string | Y | Output file name setting," |
"" |
all_camera | array |
Y | List of all cameras | ["stereoCameraRightShape", "cameraShape1"] |
render_camera | array |
Y | List of cameras to be rendered | ["stereoCameraRightShape"] |
start | string | Y | Start frame | "1" |
animation | string | N | Animation switch | "False" |
renderer | string | Y | Renderer name | “arnold“ |
frames | string | Y | Render frame | "1-10[1]" |
height | string | Y | High-resolution | "1080" |
renumber_frames | string | N | Frame overlay | "False" |
by_frame | string | Y | Frame interval | "1" |
2.upload.json¶
File to save assets info
upload.json example
{
"asset": [
{
"local": "D:/chensr/scene/maya2016_multi_layers_cameras.ma",
"server": "/D/chensr/scene/maya2016_multi_layers_cameras.ma"
}
]
}
upload.json
parameter | type | description | example |
---|---|---|---|
asset | object | Asset path information to be uploaded | refer to asset |
asset Parametric Interpretation
parameter | type | description | example |
---|---|---|---|
local | string | local path of asset | "D:/chensr/scene/maya2016_multi_layers_cameras.ma" |
server | string | Relative path on the server side, generally consistent with local | "/D/chensr/scene/maya2016_multi_layers_cameras.ma" |
3.tips.json¶
File to save errors, warnings
{
"50001":[
"Nodes: /obj/flattank_fluid/compressed_cache/file_mode File name: $HIP/geo/$HIPNAME.$OS.$F.bgeo.sc miss file: /geo/flip_test_slice4.compressed_cache.1.bgeo.sc ",
]
}
Max Profile document¶
Analysis: We analyze and save the information needed in the scene to task.json, asset.json, upload.json, tips.json for further analysis and processing
1.task.json¶
Description: Store scene analysis results, rendering settings and other information
task.json
{
"scene_info": {
"common": {
"CurrentProjectFolder": "C:/Users/dingyutao/Documents/3dsMax",
"Faces": "3784",
"Peak_Memory": "702.758",
"Vertices": "1914",
"all_camera": [
"Camera001",
"Camera002",
"Camera003",
"Camera004",
"Camera005"
],
"all_element_type": [
".tga",
".tif",
".jpg",
".png",
".exr",
".rla",
".rpf"
],
"all_output_file_type": [
".tga",
".tif",
".jpg",
".png",
".exr",
".rla",
".rpf"
],
"animation_range": "0-100",
"cgv": "2018",
"element_active": "1",
"element_list": [
"MultiMatteElement",
"VRayAlpha",
"VRayAtmosphere",
"VRayBackground",
"MultiMatteElement",
"VRayAlpha",
"VRayAtmosphere"
],
"element_path_list": [
"jh_out_MultiMatteElement.rla",
"jh_out_VRayAlpha.rla",
"jh_out_VRayAtmosphere.rla",
"jh_out_VRayBackground.rla",
"jh_out_MultiMatteElement1.rla",
"jh_out_VRayAlpha2.rla",
"jh_out_VRayAtmosphere.rla"
],
"element_type": ".rla",
"frames": "0",
"gamma": "1",
"gamma_val": "2.2",
"global_proxy": "false",
"height": "480",
"in_gamma": "2.2",
"is_picture": "0",
"net_render": "0",
"out_gamma": "2.2",
"output_file": "E:/3D_Scene/Max/jh/output/1/jh_out.rla",
"output_file_basename": "jh_out",
"output_file_type": ".rla",
"rend_save_file": "true",
"rend_timeType": "1",
"renderable_camera": [],
"taskdurationlimit": "86400",
"width": "640"
},
"renderer": {
"name": "scanline",
"renderer": "scanline",
"renderer_orign": "Default_Scanline_Renderer"
}
},
"scene_info_render": {
"common": {
"CurrentProjectFolder": "C:/Users/dingyutao/Documents/3dsMax",
"Faces": "3784",
"Peak_Memory": "702.758",
"Vertices": "1914",
"all_camera": [
"Camera001",
"Camera002",
"Camera003",
"Camera004",
"Camera005"
],
"all_element_type": [
".tga",
".tif",
".jpg",
".png",
".exr",
".rla",
".rpf"
],
"all_output_file_type": [
".tga",
".tif",
".jpg",
".png",
".exr",
".rla",
".rpf"
],
"animation_range": "0-100",
"cgv": "2018",
"element_active": "1",
"element_list": [
"Missing_Render_Element_Plug_in",
"Missing_Render_Element_Plug_in",
"Missing_Render_Element_Plug_in",
"Missing_Render_Element_Plug_in",
"Missing_Render_Element_Plug_in",
"Missing_Render_Element_Plug_in",
"Missing_Render_Element_Plug_in"
],
"element_path_list": [],
"element_type": ".rla",
"frames": "0",
"gamma": "1",
"gamma_val": "2.2",
"global_proxy": "false",
"height": "480",
"in_gamma": "2.2",
"is_picture": "0",
"net_render": "0",
"out_gamma": "2.2",
"output_file": "E:/3D_Scene/Max/jh/output/1/jh_out.rla",
"output_file_basename": "jh_out",
"output_file_type": ".rla",
"rend_save_file": "true",
"rend_timeType": "1",
"renderable_camera": [
"Camera001"
],
"width": "640"
},
"renderer": {
"name": "scanline",
"renderer": "scanline",
"renderer_orign": "Default_Scanline_Renderer"
}
},
"software_config": {
"cg_name": "3ds Max",
"cg_version": "2018",
"plugins": {}
},
"task_info": {
"cg_id": "2001",
"channel": "4",
"distribute_render_node": "3",
"enable_layered": "0",
"frames_per_task": "1",
"input_cg_file": "D:/houdini/CG file/jh/jh.max",
"input_project_path": "",
"is_distribute_render": "0",
"is_layer_rendering": "1",
"is_picture": "0",
"job_stop_time": "259200",
"os_name": "1",
"platform": "2",
"pre_frames": "100",
"project_id": "200953",
"project_name": "Project1",
"ram": "64",
"render_layer_type": "0",
"stop_after_test": "1",
"task_id": 28474141,
"task_stop_time": "0",
"tiles": "1",
"tiles_type": "block",
"time_out": "43200",
"user_id": 100150764
},
"additional_info": {}
}
task.json
parameter | type | Is it necessary | description | example |
---|---|---|---|---|
software_config | dict | Y | environment(cg software, version and plugins, etc.) | refer to software_config |
task_info | dict | Y | render settings(priority frames, render range, etc.) | refer to task_info |
scene_info_render | dict | Y | analysis result(render node, output, etc.) | refer to scene_info_render |
scene_info | dict | N | same as scene_info_render | |
additional_info | dict | N | Location of user-defined parameters (need to use custom parameters, need to confirm with the company business personnel) |
software_config
parameter | type | Is it necessary | description | example |
---|---|---|---|---|
cg_name | string | Y | software name | "3ds Max" |
cg_version | string | Y | software version | "2001" |
plugins | object | Y | rendering plugin | {} |
task_info
parameter | type | Is it necessary | description | default | example |
---|---|---|---|---|---|
graphics_cards_num | string | Y | 1: open single card rendering 2: open dual card rendering | "2" | |
enable_layered | string | Y | render layer mode,"0":off, "1":on | "0" | "1" |
cg_id | string | Y | software id."2001": Max | "2001" | |
ram | string | Y | ram: 64 / 128 | "64" | "64" |
os_name | string | Y | Rendering machine operating system: "0":Linux; "1": Windows | "1" | "1" |
render_layer_type | string | N | render layer mode: "0":renderlayer "1":rendersetup | "0" | "0" |
is_distribute_render | string | N | distributed render mode,"0":off, "1":on | "0" | "0" |
input_cg_file | string | Y | input file path | "E:/copy/DHGB_sc05_zhuta_610-1570_v0102.project" | |
input_project_path | string | Y | project path, could be empty | " " | |
job_stop_time | string | Y | Set the frame timeout time, will only affect the current frame, unit seconds | "259200" | "28800" |
user_id | string | Y | user id | ||
pre_frames | string | Y | Priority rendering (priority frames are not recommended to customize multiple individual frames) | "000" | "000: 1,3-4 [1]" means: Priority rendering first frame: No Priority rendering middle frame: No Priority rendering last frame: No Priority rendering custom frame: 1,3-4 [1] |
platform | string | Y | submit platform : "2": "www2", "3": "www3", "6": "www4", "21": "gpu", | "2" | |
is_picture | string | Y | "0: Effect Chart "1": Animation Chart | "0" | "0" |
project_id | string | Y | project id | " " | "200953" |
project_name | string | Y | project name | " 0" | "Project1" |
channel | string | Y | 1:Web local analysis (animation deduction); 2:web cloud analysis; 3:Rendering plugin submission; 4:API/SDK submission; 8:Animation plugin submission | "4" | "4" |
tiles_type | string | Y | "block, strip" | "block" | "block" |
tiles | string | Y | tile number, 1 for single node, greater than 1 for tiles rendering(multi-nodes) | "1" | "1" |
distribute_render_node | string | N | nodes number for distributed rendering | "3" | "3" |
frames_per_task | string | Y | frames per task | "1" | "1" |
stop_after_test | string | Y | "1":pause after priority render, "2":continue after priority render (default "2") | "2" | "2" |
task_id | string | Y | task id | ||
task_stop_time | string | Y | Large task timeout stops in unit seconds, "0" means unlimited | "0" | "86400" |
time_out | string | Y | Overtime reminder time, unit: sec | "43200" | "43200" |
Note:
- Only when the GI setting is enabled can you use block rendering. The tile rendering mode (tiles_type) and the multi-frame rendering mode (frames_per_task) are mutually exclusive. Only one mode can be used at the same time.
- Max temporarily does not support distributed rendering (is_distribute_render).
- Max no layered rendering (enable_layered).
scene_info_render
parameter | type | Is it necessary | description | example |
---|---|---|---|---|
renderer | dict | Y | Renderer | refer to scene_info_render.renderer |
common | dict | Y | Scene general information | refer to scene_info_render.common |
scene_info_render.common
parameter | type | Is it necessary | description | example |
---|---|---|---|---|
CurrentProjectFolder | string | Y | The project path of the scene | "C:/Users/dingyutao/Documents/3dsMax" |
Faces | string | N | Number of faces in the scene | "3784" |
Peak_Memory | string | Y | Peak memory | "702.758" |
Vertices | string | Y | vertex | "1914" |
all_camera | list | Y | List of all cameras | ["Camera001", "Camera002",“Camera003”] |
all_element_type | list | Y | All supported rendering element types | [ ".tga", ".tif", ".jpg", ".png", ".exr", ".rla", ".rpf" ] |
all_output_file_type | list | Y | All supported output file types | [ ".tga", ".tif", ".jpg", ".png", ".exr", ".rla", ".rpf" ] |
animation_range | string | N | Animation frame range | "0-100" |
cgv | string | Y | Max software version | “2018“ |
element_active | string | Y | Whether to output rendering elements "1": output; "0": no output |
"1" |
element_list | list | Y | Render element list | [ "MultiMatteElement", "VRayAlpha", "VRayAtmosphere", "VRayBackground", "MultiMatteElement", "VRayAlpha", "VRayAtmosphere" ] |
element_path_list | list | N | List of element paths | [ "jh_out_MultiMatteElement.rla", "jh_out_VRayAlpha.rla", "jh_out_VRayAtmosphere.rla", "jh_out_VRayBackground.rla", "jh_out_MultiMatteElement1.rla", "jh_out_VRayAlpha2.rla", "jh_out_VRayAtmosphere.rla" ] |
element_type | string | Y | Output element type | ".rla" |
frames | string | Y | Current rendered frame | “0” |
gamma | string | Y | Whether gamma is enabled in the scene "1": enabled; "0": not enabled |
“1” |
gamma_val | string | Y | Gamma | “2.2” |
global_proxy | string | Y | Whether to open the global agent | “false” |
height | string | Y | Resolution, high | "480" |
width | string | Y | Resolution, width | "640" |
in_gamma | string | Y | fileingamma | "2.2" |
is_picture | string | Y | "0: Effect Chart "1": Animation Chart | "0" |
net_render | string | N | Whether network rendering "1": on; "0": not on |
"0" |
out_gamma | string | Y | fileoutgamma | "2.2" |
output_file | string | Y | The main image output path in the scene | "E:/3D_Scene/Max/jh/output/1/jh_out.rla" |
rend_save_file | string | N | Whether to save the output file | “true” |
rend_timeType | string | N | rendTimeType | “1” |
renderable_camera | list | N | Need to submit the rendered camera | ["Camera001"] |
scene_info_render.renderer
parameter | type | Is it necessary | description | example |
---|---|---|---|---|
name | string | Y | renderers.production | "scanline" |
renderer | string | Y | classof renderers.production | "scanline" |
renderer_orign | string | Y | renderer orign | "Default_Scanline_Renderer" |
2.upload.json¶
Description: Store asset path information to be uploaded
upload.json
{
"asset": [
{
"server": "/C/3D_Scene/Max/jh/3d66Model-545019-files-1.JPG",
"local": "D:/houdini/CG file/jh/3d66Model-545019-files-1.JPG"
},
{
"server": "/C/3D_Scene/Max/jh/3d66Model-545019-files-3.jpg",
"local": "D:/houdini/CG file/jh/3d66Model-545019-files-3.jpg"
},
{
"server": "/C/3D_Scene/Max/jh/3d66Model-545019-files-4.jpg",
"local": "D:/houdini/CG file/jh/3d66Model-545019-files-4.jpg"
},
{
"server": "/C/3D_Scene/Max/jh/3d66Model-545019-files-6.JPG",
"local": "D:/houdini/CG file/jh/3d66Model-545019-files-6.JPG"
},
{
"server": "/C/3D_Scene/Max/jh/3d66Model-545019-files-8.jpg",
"local": "D:/houdini/CG file/jh/3d66Model-545019-files-8.jpg"
},
{
"server": "/C/Program Files/Autodesk/3ds Max 2018/maps/uvwunwrap/UV_Checker.png",
"local": "C:/Program Files/Autodesk/3ds Max 2018/maps/uvwunwrap/UV_Checker.png"
},
{
"server": "/D/houdini/CG file/jh/jh.max.7z",
"local": "C:/workspace/max/1593418445/jh.max.7z"
}
],
"scene": {
"hash": "8a0d163994a2361808b6f5390967a614",
"server": "/D/houdini/CG file/jh/jh.max.7z",
"local": "C:/workspace/max/1593418445/jh.max.7z"
},
"vrlmap": [],
"vrmap": []
}
upload.json
parameter | type | description | description | example |
---|---|---|---|---|
asset | list | Y | Asset path information to be uploaded | refer to asset |
scene | dict | Y | Information of scene compressed files to be uploaded | |
vrlmap | list | N | Light cache information to be uploaded | |
vrmap | list | N | The cache information of the luminous texture to be uploaded |
asset
parameter | type | description | example |
---|---|---|---|
local | string | Asset local path | "D:/chensr/scene/maya2016_multi_layers_cameras.ma" |
server | string | Server-side relative paths are generally consistent with local. | "/D/chensr/scene/maya2016_multi_layers_cameras.ma" |
3.tips.json¶
Description: Storage of analytical errors, warnings
{
"10035": [
"not activation camera"
],
"15031": [
"Missing_Render_Element_Plug_in",
"Missing_Render_Element_Plug_in",
"Missing_Render_Element_Plug_in",
"Missing_Render_Element_Plug_in",
"Missing_Render_Element_Plug_in",
"Missing_Render_Element_Plug_in",
"Missing_Render_Element_Plug_in"
]
}
Katana Configuration¶
Analyze katana scene and save the output as task.json, asset.json, tips.json.
1.task.json¶
File to save the analysis result of the scene, including scene name, cg software version, render settings, etc.
task.json
{
"scene_info_render": {
"rendernodes": {
"Render": {
"renderable": "1",
"denoise": "0",
"frames": "1-1[1]",
"aov": {
"aaa": "F:/cache/test.exr"
}
}
}
},
"additional_info": {},
"task_info": {
"enable_layered": "0",
"task_stop_time": "0",
"concurrent_tasks": "1",
"channel": "4",
"frames_per_task": "1",
"task_id": 34399251,
"project_name": "Project1",
"platform": "2",
"tiles": "1",
"is_picture": "0",
"project_id": "200953",
"job_stop_time": "259200",
"distribute_render_node": "3",
"stop_after_test": "1",
"clone_original_id": "",
"ram": "64",
"render_layer_type": "0",
"test_frames": "100",
"graphics_cards_num": "2",
"edit_name": "",
"pre_frames": "100",
"input_project_path": "",
"is_layer_rendering": "1",
"is_distribute_render": "0",
"tiles_type": "block",
"time_out": "43200",
"cg_id": "2016",
"user_id": 100150764,
"input_cg_file": "F:/cache/arnold_test.katana",
"os_name": "1"
},
"software_config": {
"plugins": {
"KtoA": "2.4.0.3"
},
"cg_version": "3.2v1",
"cg_name": "Katana"
},
"scene_info": {
"rendernodes": {
"Render": {
"renderable": "1",
"denoise": "0",
"frames": "1-1[1]",
"aov": {
"aaa": "F:/cache/test.exr"
}
}
}
}
}
task.json
parameter | type | description | example |
---|---|---|---|
software_config | object | environment(cg software, version and plugins, etc.) | refer to software_config |
task_info | object | render settings(priority frames, render range, etc.) | refer to task_info |
scene_info_render | object | analysis result(render node, output, etc.) | refer to scene_info_render |
software_config
parameter | type | Is it necessary | description | example |
---|---|---|---|---|
cg_name | string | Y | software | "Katana" |
cg_version | string | Y | software version | "3.2v1" |
plugins | object | Y | plugin{name, version} | {"KtoA": "2.4.0.3"} |
task_info
parameter | type | Is it necessary | description | default | example |
---|---|---|---|---|---|
graphics_cards_num | string | Y | 1: open single card rendering 2: open dual card rendering | "2" | |
enable_layered | string | Y | render layer mode,"0":off, "1":on | "0" | "1" |
cg_id | string | Y | software id."2016": Katana | "2016" | |
ram | string | Y | ram: 64 / 128 | "64" | "64" |
os_name | string | Y | Rendering machine operating system: "0":Linux; "1": Windows | "1" | "1" |
render_layer_type | string | N | render layer mode: "0":renderlayer "1":rendersetup | "0" | "0" |
is_distribute_render | string | N | distributed render mode,"0":off, "1":on | "0" | "0" |
input_cg_file | string | Y | input file path | "F:/cache/arnold_test.katana" | |
input_project_path | string | Y | project path, could be empty | " " | |
job_stop_time | string | Y | Set the frame timeout time, will only affect the current frame, unit seconds | "259200" | "28800" |
user_id | string | Y | user id | ||
pre_frames | string | Y | Priority rendering (priority frames are not recommended to customize multiple individual frames) | "000" | "000: 1,3-4 [1]" means: Priority rendering first frame: No Priority rendering middle frame: No Priority rendering last frame: No Priority rendering custom frame: 1,3-4 [1] |
platform | string | Y | submit platform : "2": "www2", "3": "www3", "6": "www4", "21": "gpu", | "2" | |
is_picture | string | Y | "0: Effect Chart "1": Animation Chart | "0" | "0" |
project_id | string | Y | project id | " " | "200953" |
project_name | string | Y | project name | "0" | "Project1" |
channel | string | Y | 1:Web local analysis (animation deduction); 2:web cloud analysis; 3:Rendering plugin submission; 4:API/SDK submission; 8:Animation plugin submission | "4" | "4" |
tiles_type | string | Y | "block, strip" | "block" | "block" |
tiles | string | Y | tile number, 1 for single node, greater than 1 for tiles rendering(multi-nodes) | "1" | "1" |
distribute_render_node | string | N | nodes number for distributed rendering | "3" | "3" |
frames_per_task | string | Y | frames per task | "1" | "1" |
stop_after_test | string | Y | "1":pause after priority render, "2":continue after priority render (default "2") | "2" | "2" |
task_id | string | Y | task id | ||
task_stop_time | string | Y | Large task timeout stops in unit seconds, "0" means unlimited | "0" | "86400" |
time_out | string | Y | Overtime reminder time, unit: sec | "43200" | "43200" |
Note:
- Katana do not support distributed rendering (is_distribute_render) and block rendering (tiles)
scene_info_render
parameter | type | Is it necessary | description | example |
---|---|---|---|---|
rendernodes | dict | Y | Render output nodes | refer to scene_info_render.rendernodes |
scene_info_render.rendernodes
parameter | type | description | example |
---|---|---|---|
Render | dict | Node names, which may have multiple different node names depending on the scenario | scene_info_render.rendernodes.Render |
scene_info_render.rendernodes.Render
parameter | type | Is it necessary | description | example |
---|---|---|---|---|
renderable | string | Y | Whether the node is active, "1" : active, "0" : inactive | |
denoise | string | N | Noise reduction (effective only on GPU platform), "0" : not on, "1" : on | "denoise": "0" |
frames | string | Y | Frame range of current node | "frames": "1-1[1]" |
aov | dict | Y | AOV must be the path in the scene, key: AOV name, value: output address |
2.upload.json¶
Katana does not analyze asset files, but has an Upload.json file that contains only scenario files
upload.json example
{
"scene": [
{
"local": "F:/cache/arnold_test.katana",
"server": "/F/cache/arnold_test.katana",
"hash": "41985d615b8e6d44ce7e7881c46971de"
}
],
"asset": [
{
"local": "F:/cache/arnold_test.katana",
"server": "/F/cache/arnold_test.katana"
},
]
}
upload.json
parameter | type | description | example |
---|---|---|---|
asset | object | Asset path information to be uploaded | refer to asset |
scene | object | Scene file information | refer to scene |
asset Parametric Interpretation
parameter | type | description | example |
---|---|---|---|
local | string | local path of asset | "F:/cache/arnold_test.katana |
server | string | Relative path on the server side, generally consistent with local | "/F/cache/arnold_test.katana" |
hash | string | hash value | "41985d615b8e6d44ce7e7881c46971de" |
3.tips.json¶
File to save errors, warnings
{
"50001":[
"Nodes: /obj/flattank_fluid/compressed_cache/file_mode File name: $HIP/geo/$HIPNAME.$OS.$F.bgeo.sc miss file: /geo/flip_test_slice4.compressed_cache.1.bgeo.sc ",
]
}
Arnold Standalone Configuration¶
1.task.json¶
File to save the analysis result of the scene, including scene name, cg software version, render settings, etc.
task.json
{
"software_config": {
"plugins": {},
"cg_version": "6.0.3.0",
"cg_name": "Arnold Standalone"
},
"task_info": {
"tiles": "1",
"graphics_cards_num": "2",
"edit_name": "arnord1111",
"job_stop_time": "86400",
"stop_after_test": "1",
"frames_per_task": "1",
"ram": "64",
"time_out": "43600",
"pre_frames": "100",
"task_id": "38226011",
"user_id": "100150764",
"project_name": "ff",
"project_id": "426731",
"input_cg_file": "E:/fang/ass_test/static_ass.ass",
"task_stop_time": "86400",
"cg_id": 2003
},
"additional_info": {},
"scene_info_render": {
"common": {
"frames": "1-10[1]"
}
}
}
task.json
parameter | type | Is it necessary | description | example |
---|---|---|---|---|
software_config | dict | Y | environment(cg software, version and plugins, etc.) | refer to software_config |
task_info | dict | Y | render settings(priority frames, render range, etc.) | refer to task_info |
scene_info_render | dict | Y | analysis result(render node, output, etc.) | refer to scene_info_render |
software_config
parameter | type | Is it necessary | description | example |
---|---|---|---|---|
cg_name | string | Y | software | "Arnold Standalone" |
cg_version | string | Y | software version | "6.0.3.0" |
plugins | dict | N | The SDK or kernel version of Arnold | {} |
task_info
parameter | type | Is it necessary | description | default | example |
---|---|---|---|---|---|
graphics_cards_num | string | Y | 1: open single card rendering 2: open dual card rendering | "2" | "2" |
ram | string | Y | ram: 64 / 128 | "64" | "64" |
input_cg_file | string | Y | Input file path,you have to use backslashes | "E:/fang/ass_test/static_ass.ass",or Serialized rendering: "E:/fang/ass_test/animation_ass.####.ass" | |
job_stop_time | string | Y | Set the frame timeout time, will only affect the current frame, unit seconds | "259200" | "28800" |
user_id | string | N | user id,not necessary, can be automatically obtained from the server | "100150764" | |
pre_frames | string | Y | Priority rendering (priority frames are not recommended to customize multiple individual frames) | "000" | "000: 1,3-4 [1]" means: Priority rendering first frame: No Priority rendering middle frame: No Priority rendering last frame: No Priority rendering custom frame: 1,3-4 [1] |
project_id | string | N | project id | "0" | "426731" |
project_name | string | N | project name | "ff" | |
tiles | string | N | tile number, 1 for single node, greater than 1 for tiles rendering(multi-nodes) | "1" | "1" |
stop_after_test | string | Y | "1":pause after priority render, "2":continue after priority render (default "2") | "2" | "2" |
task_id | string | N | task id,Not necessary, can be automatically obtained from the server | "38226011" | |
task_stop_time | string | N | Large task timeout stops in unit seconds, "0" means unlimited | "0" | "86400" |
time_out | string | Y | Overtime reminder time, unit: sec | "43200" | "43200" |
cg_id | int | Y | Arnold rendering cgid can only be 2003 | 2003 |
scene_info_render
parameter | type | Is it necessary | description | example |
---|---|---|---|---|
common | string | Y | Public parameters for rendering | |
frames | string | Y | Frame range for rendering | "1-10[1]" |
2.upload.json¶
File to save assets info
Warning:
- Please only use English letter, Number, and Underline in the file name and file path;
- Fox does not support A,B,C,D drives, we do not support shared shared directory (\share\project) and IP path like “\192.168.0.22”;
- Please make sure the folder structure at Fox is the same as your local;
- Root directories can’t exceed 22 folders;
upload.json example
{
"asset": [
{
"local": "E:/chensr/scene/maya2016_multi_layers_cameras.ma",
"server": "/E/chensr/scene/maya2016_multi_layers_cameras.ma"
}
]
}
upload.json
parameter | type | description | example |
---|---|---|---|
asset | object | Asset path information to be uploaded | refer to asset |
asset Parametric Interpretation
parameter | type | description | example |
---|---|---|---|
local | string | local path of asset | "E:/chensr/scene/maya2016_multi_layers_cameras.ma" |
server | string | Relative path on the server side, generally consistent with local | "/E/chensr/scene/maya2016_multi_layers_cameras.ma" |
Architecture overview¶
This document gives a brief introduction to the RenderBusSDK components.
Component¶
- rayvision_log and rayvision_api are root modules, to be invoked by other modules;
- rayvision_utils is a general module integrating functions to preprocessing CG configuration information calling rayvision_api when used;
- rayvision_sync provides transport-related functions, relys on rayvision_log and rayvision_api;
- rayvision_maya, rayvision_houdini, and rayvision_clarisse rely on rayvision_utils;
- rayvison_api
Core module, provides a lot of interfaces to be called.
- rayvison_utils
Provides some common functions required by other modules, integrating necessary rendering data preprocessing and customized exception management functions.
- rayvison_sync
Provides transporting functions, like uploading of CG configuration files and resource files, downloading of rendering result.
- rayvison_maya
Provides analysis functionality for Maya resource files
- rayvison_houdini
Provides analysis functionality for houdini resource files
- rayvison_clarisse
Provides analysis functionality for clarisse resource files
flow chart¶

General Parameter¶
PACKAGE_NAME¶
Set the log name and package name to deploy automatically with gitlab, for example:
PACKAGE_NAME = “rayvision_clarisse”
ID mapping of DCC software¶
DCC_ID_MAPPINGS = {
'maya': 2000,
'3ds Max': 2001,
'lightwave': 2002,
'arnold': 2003,
'houdini': 2004,
'cinema4d': 2005,
'softimage': 2006,
'blender': 2007,
'vr_standalone': 2008,
'mr_standalone': 2009,
'sketchup': 2010,
'vue': 2011,
'keyshot': 2012,
'clarisse': 2013,
'octane_render': 2014,
'katana': 2016,
}
HEADERS¶
HEADERS = {
'accessId': '',
'channel': '4',
'platform': '',
'UTCTimestamp': '',
'nonce': '',
'signature': '',
'version': '1.0.0',
'Content-Type': 'application/json'
}
task_info default parameters¶
TASK_INFO = {
'task_info': {
'input_cg_file': '',
'is_picture': '0',
'task_id': '',
'frames_per_task': '1',
'pre_frames': '000',
'job_stop_time': '86400',
'task_stop_time': '259200',
'time_out': '43200',
'stop_after_test': '2',
'project_name': '',
'project_id': '',
'channel': '4',
'cg_id': '',
'platform': '',
'tiles_type': 'block',
'tiles': '1',
'is_layer_rendering': '1',
'is_distribute_render': '0',
'distribute_render_node': '3',
'input_project_path': '',
'render_layer_type': '0',
'user_id': '',
'os_name': '1',
'ram': '64'
},
'software_config': {},
'scene_info': {},
'scene_info_render': {}
}
TASK END STATUS CODE LIST¶
TASK_END_STATUS_CODE_LIST = ['10', '20', '23', '25', '30', '35', '45']
TASK STATUS CODE¶
Code | Description | Memo |
---|---|---|
0 | waiting | WAITING |
5 | rendering | RENDERING |
8 | for preprocessing tasks, start preprocessing, state in preprocessing | PRE_RENDERING |
10 | stop | STOP |
20 | stop (arrears) | ARREARAGE_STOP |
23 | timeout to stop | TIME_OUT_STOP |
25 | finished | FINISHED |
30 | completed but failed frames | FINISHED_HAS_FAILED |
35 | abandon | ABANDON |
40 | test completion | FINISHED_TEST |
45 | ailed | FAILED |
50 | analyzing | ANALYSE |
100 | Status update | UPDATING |
Frame State Code¶
Code | Description | Memo |
---|---|---|
1 | Waiting for execution | WAITING |
2 | Being executed | STARTED |
3 | stop | ABORTED |
4 | carry out | DONE |
5 | Error (failure) | ERROR |
6 | Wait for preprocessing to complete | PREDONEWAITING |
7 | Wait for the photon frame rendering to complete | PHOTONDONEWAITING |
9 | Wait for the photon job to finish rendering | PREDONEJOBWAITING |
10 | Wait for the settlement job rendering to complete | GOPJOBWAITING |
11 | Task timeout | TIMEOUT |
Demo¶
Demo for maya, houdini and clarisse
### houdini, clarisse, maya Demo
Maya demo¶
from rayvision_api.core import RayvisionAPI from rayvision_maya.analyze_maya import AnalyzeMaya from rayvision_sync.upload import RayvisionUpload from rayvision_sync.download import RayvisionDownload from rayvision_api.task.check import RayvisionCheck from rayvision_api.utils import update_task_info, append_to_task, append_to_upload # API Parameter render_para = { "domain": "jop.foxrenderfarm.com", # If it doesn't work, you can use "task.foxrenderfarm.com" "platform": "2", "access_id": "xxxx", "access_key": "xxxx", } api = RayvisionAPI(access_id=render_para['access_id'], access_key=render_para['access_key'], domain=render_para['domain'], platform=render_para['platform']) # Step1:Analyze CG File analyze_info = { "cg_file": r"D:\files\CG FILE\muti_layer_test.ma", "workspace": "c:/workspace", "software_version": "2019", "project_name": "Project1", "plugin_config": { "mtoa": "3.2.1.1" } } analyze_obj = AnalyzeMaya(**analyze_info) analyze_obj.analyse() # step2: Add some custom parameters, or update the original parameter value update_task = { "pre_frames": "100", "stop_after_test": "1" } update_task_info(update_task, analyze_obj.task_json) custom_info_to_task = {} append_to_task(custom_info_to_task, analyze_obj.task_json) custom_info_to_upload = [] append_to_upload(custom_info_to_upload, analyze_obj.upload_json) # step3:Check json files check_obj = RayvisionCheck(api, analyze_obj) task_id = check_obj.execute(analyze_obj.task_json, analyze_obj.upload_json) # Step4: Transmission """ There are two ways to upload the transmission: Upload_method: 1: upload four json files and upload the resource file according to upload.json; 2: json files and resources are uploaded separately; """ CONFIG_PATH = { "tips_json_path": analyze_obj.tips_json, "task_json_path": analyze_obj.task_json, "asset_json_path": analyze_obj.asset_json, "upload_json_path": analyze_obj.upload_json, } upload_obj = RayvisionUpload(api) """ The default of the test demo is to upload json and resource files at the same time, and users can choose their own upload method according to the actual situation. """ upload_method = 1 if upload_method == 1: # step4.1:Json files are uploaded in conjunction with CG resources upload_obj.upload(str(task_id), **CONFIG_PATH) elif upload_method == 2: # step4.2:CG resource files and json are uploaded separately upload_obj.upload_asset(upload_json_path=CONFIG_PATH["upload_json_path"]) upload_obj.upload_config(str(task_id), list(CONFIG_PATH.values())) # Step5:Submit Task api.submit(int(task_id)) # Step6:Download download = RayvisionDownload(api) # All complete before the automatic start of uniform download. # download.auto_download_after_task_completed([task_id]) # Poll download (automatic download for each completed frame) download.auto_download([int(task_id)])
Houdini demo¶
from rayvision_api.core import RayvisionAPI from rayvision_houdini.analyze_houdini import AnalyzeHoudini from rayvision_sync.upload import RayvisionUpload from rayvision_sync.download import RayvisionDownload from rayvision_api.task.check import RayvisionCheck from rayvision_api.utils import update_task_info, append_to_task, append_to_upload # API Parameter render_para = { "domain": "jop.foxrenderfarm.com", # If it doesn't work, you can use "task.foxrenderfarm.com" "platform": "2", "access_id": "xxxx", "access_key": "xxxx", } api = RayvisionAPI(access_id=render_para['access_id'], access_key=render_para['access_key'], domain=render_para['domain'], platform=render_para['platform']) # Step1:Analyze CG File analyze_info = { "cg_file": r"D:\houdini\CG file\flip_test_slice4.hip", "workspace": "c:/workspace", "software_version": "17.5.293", "project_name": "Project1", "plugin_config": { 'renderman': '22.6' } } analyze_obj = AnalyzeHoudini(**analyze_info) analyze_obj.analyse() # step2: Add some custom parameters, or update the original parameter value update_task = { "pre_frames": "100", "stop_after_test": "1" } update_task_info(update_task, analyze_obj.task_json) custom_info_to_task = {} append_to_task(custom_info_to_task, analyze_obj.task_json) custom_info_to_upload = [] append_to_upload(custom_info_to_upload, analyze_obj.upload_json) # step3:Check json files check_obj = RayvisionCheck(api, analyze_obj) task_id = check_obj.execute(analyze_obj.task_json, analyze_obj.upload_json) # Step4: Transmission """ There are two ways to upload the transmission: Upload_method: 1: upload four json files and upload the resource file according to upload.json; 2: json files and resources are uploaded separately; """ CONFIG_PATH = { "tips_json_path": analyze_obj.tips_json, "task_json_path": analyze_obj.task_json, "asset_json_path": analyze_obj.asset_json, "upload_json_path": analyze_obj.upload_json, } upload_obj = RayvisionUpload(api) """ The default of the test demo is to upload json and resource files at the same time, and users can choose their own upload method according to the actual situation. """ upload_method = 1 if upload_method == 1: # step3.1:Json files are uploaded in conjunction with CG resources upload_obj.upload(str(task_id), **CONFIG_PATH) elif upload_method == 2: # step3.2:CG resource files and json are uploaded separately upload_obj.upload_asset(upload_json_path=CONFIG_PATH["upload_json_path"]) upload_obj.upload_config(str(task_id), list(CONFIG_PATH.values())) # Step5:Submit Task api.submit(int(task_id)) # Step6:Download download = RayvisionDownload(api) # All complete before the automatic start of uniform download. # download.auto_download_after_task_completed([task_id]) # Poll download (automatic download for each completed frame) download.auto_download([int(task_id)])
Clarisse demo¶
from rayvision_api.core import RayvisionAPI from rayvision_clarisse.analyse_clarisse import AnalyzeClarisse from rayvision_sync.upload import RayvisionUpload from rayvision_sync.download import RayvisionDownload from rayvision_api.task.check import RayvisionCheck from rayvision_api.utils import update_task_info, append_to_task, append_to_upload # API Parameter render_para = { "domain": "jop.foxrenderfarm.com", # If it doesn't work, you can use "task.foxrenderfarm.com" "platform": "2", "access_id": "xxxx", "access_key": "xxxx", } api = RayvisionAPI(access_id=render_para['access_id'], access_key=render_para['access_key'], domain=render_para['domain'], platform=render_para['platform']) # Step1:Analyze CG File analyze_info = { "cg_file": r"D:\files\CG FILE\clarisse_test1.project", "workspace": "c:/workspace", "software_version": "clarisse_ifx_4.0_sp3", "project_name": "Project1", "plugin_config": {} } analyze_obj = AnalyzeClarisse(**analyze_info) analyze_obj.analyse() # step2:Add some custom parameters, or update the original parameter value update_task = { "pre_frames": "100", "stop_after_test": "1" } update_task_info(update_task, analyze_obj.task_json) custom_info_to_task = {} append_to_task(custom_info_to_task, analyze_obj.task_json) custom_info_to_upload = [] append_to_upload(custom_info_to_upload, analyze_obj.upload_json) # step3:Check json files check_obj = RayvisionCheck(api, analyze_obj) task_id = check_obj.execute(analyze_obj.task_json, analyze_obj.upload_json) # Step4:Transmission """ There are two ways to upload the transmission: Upload_method: 1:upload four json files and upload the resource file according to upload.json; 2:json files and resources are uploaded separately; """ CONFIG_PATH = { "tips_json_path": analyze_obj.tips_json, "task_json_path": analyze_obj.task_json, "asset_json_path": analyze_obj.asset_json, "upload_json_path": analyze_obj.upload_json, } upload_obj = RayvisionUpload(api) """ The default of the test demo is to upload json and resource files at the same time, and users can choose their own upload method according to the actual situation. """ upload_method = 1 if upload_method == 1: # step4.1:Json files are uploaded in conjunction with CG resources upload_obj.upload(str(task_id), **CONFIG_PATH) elif upload_method == 2: # step4.2:CG resource files and json are uploaded separately upload_obj.upload_asset(upload_json_path=CONFIG_PATH["upload_json_path"]) upload_obj.upload_config(str(task_id), list(CONFIG_PATH.values())) # Step5:Submit Task api.submit(int(task_id)) # Step6:Download download = RayvisionDownload(api) # All complete before the automatic start of uniform download. # download.auto_download_after_task_completed([task_id]) # Poll download (automatic download for each completed frame) download.auto_download([int(task_id)])
3ds Max demo¶
from rayvision_max.analyse_max import AnalyseMax from rayvision_api.core import RayvisionAPI from rayvision_api.task.check import RayvisionCheck from rayvision_api.utils import update_task_info, append_to_upload, append_to_task from rayvision_sync.download import RayvisionDownload from rayvision_sync.upload import RayvisionUpload # API Parameter render_para = { "domain": "jop.foxrenderfarm.com", # If it doesn't work, you can use "task.foxrenderfarm.com" "platform": "2", "access_id": "xxxx", "access_key": "xxxx", } api = RayvisionAPI(access_id=render_para['access_id'], access_key=render_para['access_key'], domain=render_para['domain'], platform=render_para['platform']) analyze_info = { "cg_file": r'D:\houdini\CG file\jh\jh.max', "software_version": "2018", "project_name": "Project1", "workspace": r"C:\workspace\max", "plugin_config": {}, "renderable_camera": ["Camera001"], # Render all cameras by default without specifying the required cameras } analyze_obj = AnalyseMax(**analyze_info) analyze_obj.analyse() # step2: Add some custom parameters, or update the original parameter value update_task = { "pre_frames": "100", "stop_after_test": "1" } update_task_info(update_task, analyze_obj.task_json) custom_info_to_task = {} append_to_task(custom_info_to_task, analyze_obj.task_json) custom_info_to_upload = [] append_to_upload(custom_info_to_upload, analyze_obj.upload_json) # step3:Check json files check_obj = RayvisionCheck(api, analyze_obj) task_id = check_obj.execute(analyze_obj.task_json, analyze_obj.upload_json) # Step4: Transmission """ There are two ways to upload the transmission: Upload_method: 1: upload four json files and upload the resource file according to upload.json; 2: json files and resources are uploaded separately; """ CONFIG_PATH = { "tips_json_path": analyze_obj.tips_json, "task_json_path": analyze_obj.task_json, "asset_json_path": analyze_obj.asset_json, "upload_json_path": analyze_obj.upload_json, } upload_obj = RayvisionUpload(api) """ The default of the test demo is to upload json and resource files at the same time, and users can choose their own upload method according to the actual situation. """ upload_method = 1 if upload_method == 1: # step4.1:Json files are uploaded in conjunction with CG resources upload_obj.upload(str(task_id), **CONFIG_PATH) elif upload_method == 2: # step4.2:CG resource files and json are uploaded separately upload_obj.upload_asset(upload_json_path=CONFIG_PATH["upload_json_path"]) upload_obj.upload_config(str(task_id), list(CONFIG_PATH.values())) # Step5:Submit Task api.submit(int(task_id)) # Step6:Download download = RayvisionDownload(api) # All complete before the automatic start of uniform download. # download.auto_download_after_task_completed([task_id]) # Poll download (automatic download for each completed frame) download.auto_download([int(task_id)])
Katana demo¶
from rayvision_api.core import RayvisionAPI from rayvision_sync.upload import RayvisionUpload from rayvision_katana.analyse_katana import AnalyzeKatana from rayvision_sync.download import RayvisionDownload from rayvision_api.task.check import RayvisionCheck from rayvision_api.utils import update_task_info, append_to_task, append_to_upload # API Parameter render_para = { "domain": "jop.foxrenderfarm.com", # If it doesn't work, you can use "task.foxrenderfarm.com" "platform": "2", "access_id": "xxxxxxxxxxx", "access_key": "xxxxxxxxxxxxx", } api = RayvisionAPI(access_id=render_para['access_id'], access_key=render_para['access_key'], domain=render_para['domain'], platform=render_para['platform']) # Step1:Analyze CG File analyze_info = { "cg_file": r"F:\cache\arnold_test.katana", "workspace": "c:/workspace", "software_version": "3.2v1", "project_name": "Project1", "plugin_config": { "KtoA": "2.4.0.3" } } analyze_obj = AnalyzeKatana(**analyze_info) analyze_obj.analyse() # step2: Add some custom parameters, or update the original parameter value update_task = { "pre_frames": "100", "stop_after_test": "1" } update_task_info(update_task, analyze_obj.task_json) custom_info_to_task = {} append_to_task(custom_info_to_task, analyze_obj.task_json) custom_info_to_upload = [ r"F:\cache\add.png", r"F:\cache\ass.jpg", r"F:\cache\back3.jpg", r"F:\cache\back10.jpg", r"F:\cache\cizhuan.jpg", r"F:\cache\plane.abc", r"F:\cache\plane.abc", ] append_to_upload(custom_info_to_upload, analyze_obj.upload_json) # step3:Check json files check_obj = RayvisionCheck(api, analyze_obj) task_id = check_obj.execute(analyze_obj.task_json, analyze_obj.upload_json) # Step4: Transmission """ There are two ways to upload the transmission: Upload_method: 1: upload four json files and upload the resource file according to upload.json; 2: json files and resources are uploaded separately; """ CONFIG_PATH = { "tips_json_path": analyze_obj.tips_json, "task_json_path": analyze_obj.task_json, "asset_json_path": analyze_obj.asset_json, "upload_json_path": analyze_obj.upload_json, } upload_obj = RayvisionUpload(api) """ The default of the test demo is to upload json and resource files at the same time, and users can choose their own upload method according to the actual situation. """ upload_method = 2 if upload_method == 1: # step3.1:Json files are uploaded in conjunction with CG resources upload_obj.upload(str(task_id), **CONFIG_PATH) elif upload_method == 2: # step3.2:CG resource files and json are uploaded separately upload_obj.upload_asset(upload_json_path=CONFIG_PATH["upload_json_path"]) upload_obj.upload_config(str(task_id), list(CONFIG_PATH.values())) # Step5:Submit Task api.submit(int(task_id)) # Step6:Download download = RayvisionDownload(api) # All complete before the automatic start of uniform download. # download.auto_download_after_task_completed([task_id]) # Poll download (automatic download for each completed frame) download.auto_download([int(task_id)])
Arnorld Standalone demo¶
Warning
Arnorld Standalone does not have an automatic asset analysis function and requires customers to analyze asset files themselves
from rayvision_api.core import RayvisionAPI from rayvision_sync.upload import RayvisionUpload from rayvision_sync.download import RayvisionDownload from rayvision_api.task.check import RayvisionCheck from rayvision_api.utils import update_task_info, append_to_task, append_to_upload # API Parameter render_para = { "domain": "jop.foxrenderfarm.com", # If it doesn't work, you can use "task.foxrenderfarm.com" "platform": "6", "access_id": "xxxxx", "access_key": "xxxxx", } CONFIG_PATH = { "task_json_path": r"D:\test\task.json", "upload_json_path": r"D:\test\upload.json" } api = RayvisionAPI(access_id=render_para['access_id'], access_key=render_para['access_key'], domain=render_para['domain'], platform=render_para['platform']) # step1: Add some custom parameters, or update the original parameter value # Step1 can also be set without setting update_task = { "pre_frames": "000:2,4,6-10[1]", "stop_after_test": "1" } update_task_info(update_task, CONFIG_PATH['task_json_path']) custom_info_to_task = {} append_to_task(custom_info_to_task, CONFIG_PATH['task_json_path']) custom_info_to_upload = [ r"E:\fang\ass_test\static_ass.ass", r"E:\fang\ass_test\animation_ass.0060.ass" ] append_to_upload(custom_info_to_upload, CONFIG_PATH['upload_json_path']) # step2:Check json files check_obj = RayvisionCheck(api) task_id = check_obj.execute(CONFIG_PATH['task_json_path']) # Step3: Transmission """ task.json files and resources are uploaded separately """ upload_obj = RayvisionUpload(api) # step3.1: Upload resource file(upload.json) upload_obj.upload_asset(upload_json_path=CONFIG_PATH["upload_json_path"]) # step3.2: Upload task.json upload_obj.upload_config(str(task_id), list(CONFIG_PATH.values())) # Step4:Submit Task api.submit(int(task_id)) # Step5:Download download = RayvisionDownload(api) # All complete before the automatic start of uniform download. download.auto_download_after_task_completed([task_id]) # Poll download (automatic download for each completed frame) download.auto_download([int(1484947)], local_path=r"E:\test", download_filename_format="false")
FAQ¶
1. What versions of Python does the RenderBus SDK support?¶
RenderBus SDK currently supports Python 2.7 and Python 3.6
2. How to download the SDK package with pycharm?¶
Please refer to Installation Guide
3. To download only the first frame, how to set?¶
from rayvision_api.utils import update_task_info update_task = { "pre_frames": "100", } update_task_info(update_task, task_path=r"C:\workspace\1586932339\task.json")
4. After the priority frame rendered, how to set to automatically render at full speed?¶
from rayvision_api.utils import update_task_info update_task = { "stop_after_test": "1" } update_task_info(update_task, task_path=r"C:\workspace\1586932339\task.json")
For details, please refer to Detailed Parameter Configuration
5. How to set to download the rendering result immediately after current rendered frame rendered?¶
We provide 2 downloading methods:
- Download after all frames finish rendering
- Download after current frame finishes rendering
For details, please refer to SDK Usage
6. What is the easiest way to use?¶
If you want to use it directly without customization, you can download the corresponding rendering package directly, then select the corresponding [common full process sample] to experience the full process rendering. For details, please refer to the SDK Getting Started Tutorial
Exception code¶
code | symbol | description |
---|---|---|
100 | FAIL | failed |
200 | SUCCESS | returns successfully |
301 | NEED_REDIRECT | need to redirect to other addresses |
400 | APIError | error request |
403 | FORBIDDEN | no permission |
404 | RESOURCE_NOT_FOUND | resource does not exist |
500 | INTERNAL_ERROR | server processing failed |
513 | USER_CACHE_NOTFOUNT | user_message_find_fail |
600 | PARAMETER_INVALID | illegal parameter |
601 | PARAMETER_CANT_BE_EMPTY | missing required parameters |
602 | NEED_USER_LOGIN | requires user login |
603 | ILLEGAL_PROTOCOL | illegal request |
604 | VALIDATE_CODE_ERROR | mobile verification code error |
605 | VINSUFFICIENT_PERMISSIONS | insufficient permissions |
606 | VALIDATE_COMMOM_CODE_ERROR | verification code error |
607 | VALIDATE_SEND_CODE_ERROR | verification code failed to send |
608 | USER_AREA_ERROR | customer’s domestic and foreign regions do not match |
610 | SIGNATURE_EXPIRED | signature expired |
611 | SIGNATURE_INVALID | invalid signature |
700 | DO_NOT_HAVE_ANY_MORE_RECORD | no more records |
800 | ACCOUNT_BINDING_USER_NULL | account does not exist |
801 | ACCOUNT_NOT_BINDING | device not bound |
802 | ACCOUNT_BINDING_FAIL | device binding failed |
804 | ACCOUNT_LOCKED | account disabled |
805 | ACCOUNT_USERNAME_PASSWORD_FAIL | username/password invalid |
806 | ACCOUNT_UNIONID_FAIL | account is not bound to a third-party user |
807 | ACCOUNT_PHONE_FAIL | phone number is not bound to a third-party user |
808 | ACCOUNT_UNIONID_PHONE | phone number is already bound to other user |
809 | ACCOUNT_WEIXIN_FAIL | Wechat login failed |
810 | ACCOUNT_WEIBO_FAIL | Weibo login failed |
811 | ACCOUNT_LOGOUT_FAIL | logout failed |
812 | ACCOUNT_LOGIN_IPLIMITFAIL IP | address is prohibited |
813 | ACCOUNT_QQ_FAIL QQ | login failed |
814 | NOREPEAT_SELECT_SOFTWARE | unable to select common software repeatedly |
815 | ACCOUNT_UNIONID_EXISTS UNIONID | already exists |
900 | VALIDATE_PHONE_FAIL | phone number already exists |
901 | VALIDATE_EMAIL_FAIL | mailbox already exists |
902 | VALIDATE_USERNAME_FAIL | username already exists |
903 | ACCOUNT_EMAIL_FAIL | mailbox is not bound to an account |
904 | CURRENCY_NOT_SUPPORT | unsupported currency |
905 | AGENT_NOT_SUPPORT | unsupport agent |
906 | AMOUNT_NOT_SUPPORT | please enter a reasonable recharge value |
908 | COUPONNO_NOT_SUPPORT | coupon code is not supported |
909 | PAYMETHOD_NOT_SUPPORT | unsupported payment method |
910 | NO_INVOICE_ORDER | invoice order unavailable |
911 | NO_INVOICE_ADDRESS | invoice order address unavailable |
912 | SUBUSER_EXISTS_TASKS | unable to delete a sub-user with executing tasks |
913 | SUBUSER_ARREARAGE | sub-user is overdue |
914 | DELSUBUSER_EXISTS_BALANCE | there is balance for the sub-user to be deleting |
915 | NO_INVOICE_TEMPLATE | invoice information unavailable |
916 | RECEIPT_TYPE_ERROR | invoice type not match |
920 | NO_LATEST_VERSION | no latest client version |
1000 | REDIS_CACHE_FAIL | redis cache exception |
20004 | JSON_FILE_UPLOAD_FAILED | Uploading json file has failed many times, please check the network environment |
200024 | ARGUMENT_FORMAT_INVALID | The transfer parameter name is set incorrectly. Please check the transfer CMD command |
200025 | NON-UPLOADABLE FILES | Unable to upload the file, check if the file exists or if the file is damaged |
1000000 | RayvisionError | python exception |
Release notes¶
0.1.0 (2019-11-10):¶
- First edition
1.1.0 (2020-04-06):¶
- Major update:
- rayvision_api: Partially passed parameters were updated to check for functional refactoring
- rayvision_clarisse: Added independent native analysis. Clarissa analysis supports python2
- rayvision_maya: Added independent local analysis capability
- rayvision_houdini: Added independent local analysis capability
- rayvision_sync: Support to upload json configuration and resource files, download support to customize the server file path, support whether to use local comparison function
1.2 (2020-05-21):¶
- The fix section describes the error.
- Add the upload json file interface and instructions on how to use it.
1.3 (2020-09-10):¶
- The fix section describes the error.
- Update the API interface to API2.0.
- Add katana-related documentation.
1.4 (2020-11-12):¶
- rayvision_log(tag 1.1.2):
- Compatibility Problem python2 Version Log Module in Fix Part.
1.5 (2020-11-24):¶
- rayvision_sync(tag 2.0):
- Update Transmission aspera Engine.
- Support raysync engine transmission.
1.6 (2020-12-16):¶
- rayvision_api(tag 2.4.5):
- Add new interface;
- Fixes an insanity in the name of the main sub-account query item;
Contribute to the RenderBusSDK¶
Important
Please check carefully, you are https://renderbus.readthedocs.io/en/latest/index.html
on reading the latest version of this document.
There are many ways to contribute to the RenderBusSDK, and here are some of them:
- Report errors and requests in the problem tracker, and try to follow the guidelines detailed in reporting errors below.
Report error¶
- Please check the FAQ first in case that your issue is resolved already.
- Check unresolved issues to see if the problem’s been reported. If yes, review comments to get more info.
- Submit complete reports including platform, software_version, error log, etc. Try to provide a small test scene with which our engineers could position your problem.