注解
为任务设置资产信息和一般配置信息
任务模块(RayvisionTask)¶
Generating tasks.
Set asset information and general configuration information for the task.
-
class
rayvision_api.task.handle.
RayvisionTask
(domain, platform, access_id, access_key, local_os, software_version, render_software, workspace, cg_file, plugin_config=None, project_name=None)¶ 基类:
object
Build task.
-
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.
参数: project_name (str) -- The name of the tag to be added. 返回: Tag id. 返回类型: int
-
static
ckeck_and_mk
(dir_path)¶ Check if the file exists,create if it does not.
-
get_task_id
()¶ Get task id.
Example:
task_id_info = { "taskIdList": [1658434], "aliasTaskIdList": [2W1658434], "userId": 100093088 }
Returns: str
-
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: str
-
preparatory_analyse
(cg_file, project_dir='')¶ Set the scenario and project path before analysis.
Handling the path and project path of the scene.
参数:
-
set_render_config
()¶ Add the configuration of the rendering environment in task_info.
- Raises: RayvisionError
- if the software name is not supported software or if the cg_id is
- null.
-