连接外螺纹

2024-10-03 00:18:08 发布

您现在位置:Python中文网/ 问答频道 /正文

下面的代码应该创建两个线程。第一个1,然后在另一个完成第二个之后。你知道吗

import bpy
import os
import subprocess
import texturechange1
import texturechange2
import threading



#run texture changes and save files 
t1 = threading.Thread(target = texturechange1)
t2 = threading.Thread(target = texturechange2)
t1.start()
t1.join()
t2.start()
t2.join()

texturechange1texturechange2是python脚本,用于更改给定对象的纹理并保存blender文件。你知道吗

它们都有命令bpy.ops.export.sketchfab(),该命令创建一个单独的线程上传到sketchfab。你知道吗

错误在于,texturechange1texturechange2更改纹理并保存各自的文件,而texturechange2是唯一上载到sketchfab的文件。texturechange1的给定错误为:

please wait till current upload is finished

有没有办法将join()应用于其他线程创建的所有线程?你知道吗


Tags: 文件importtarget线程threadstartt1threading