Skip to content

Commit

Permalink
Merge pull request #2 from renderbus/zwy
Browse files Browse the repository at this point in the history
feat: Modify the demo example
  • Loading branch information
foxrenderfarm committed Aug 3, 2021
2 parents 02339cb + d123e94 commit 84804f8
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions help/examples/blender_demo.py
Expand Up @@ -27,16 +27,16 @@
"workspace": "c:/workspace",
"software_version": "2.81",
"project_name": "Project1",
"plugin_config": {}
"plugin_config": {},
"platform": render_para['platform']
}
analyze_obj = AnalyzeBlender(**analyze_info)
analyze_obj.analyse(exe_path=r"C:\Program Files (x86)\Blender Foundation\Blender\blender.exe")

# step2:Add some custom parameters, or update the original parameter value
# Step2:Add some custom parameters, or update the original parameter value
update_task = {
"pre_frames": "100",
"stop_after_test": "1",
"hardwareConfigId": "5",
"stop_after_test": "1"
}
update_task_info(update_task, analyze_obj.task_json)

Expand All @@ -49,14 +49,20 @@
custom_info_to_upload = [
r"D:\houdini\cg_file\PRAM RENDER 1.blend"
]

append_to_upload(custom_info_to_upload, upload_json_path)

# step3:Check json files
# Step3: Set platform hardware configuration information
hardware_config = {
"model": "Default", # Platform CPU: Default or Platform GPU: 1080Ti or 2080Ti
"ram": "128GB", # memory: 64GB or 128GB
"gpuNum": None # GPU platform requires input like 2*GPU, if CPU platform it is None
}

# Step4:Check json files
check_obj = RayvisionCheck(api, analyze_obj)
task_id = check_obj.execute(analyze_obj.task_json, analyze_obj.upload_json)
task_id = check_obj.execute(hardware_config, analyze_obj.task_json, analyze_obj.upload_json)

# Step4:Transmission
# Step5: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;
Expand All @@ -75,10 +81,10 @@
upload_obj.upload_asset(upload_json_path=upload_json_path)
upload_obj.upload_config(str(task_id), list(CONFIG_PATH.values()))

# Step5:Submit Task
# Step6:Submit Task
api.submit(int(task_id))

# Step6:Download
# Step7:Download
download = RayvisionDownload(api)
# All complete before the automatic start of uniform download.
# download.auto_download_after_task_completed([task_id])
Expand Down

0 comments on commit 84804f8

Please sign in to comment.