建模程序 多个定时程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

22 lines
542 B

import subprocess
import sys
blender_cmd = "blender"
blender_script = "fill_dm_code.py"
blender_process = subprocess.Popen([blender_cmd,"-b","-P",blender_script],stdout=subprocess.PIPE,stderr=subprocess.PIPE,text=True)
#实时读取输出
while True:
output_line = blender_process.stdout.readline()
if output_line == "" and process.poll() is not None:
break
if output_line:
print(output_line.strip())
error = blender_process.communicate()[1]
if error:
print("Error",error.strip())
blender_process.wait()