Python 在混合器中加载烘焙粒子系统缓存

Python 在混合器中加载烘焙粒子系统缓存,python,blender,particle-system,Python,Blender,Particle System,我正在尝试以编程方式加载blender中粒子系统的烘焙文件。我成功地加载了流体模拟的文件,但粒子系统使用了不同的烘焙/缓存系统,因此我在加载时遇到了困难 以下是我正在使用的代码: pts = [] for i in scn.objects: for j in i.modifiers: if j.__class__.__name__ == "ParticleSystemModifier": pts.append(j.particle_system)

我正在尝试以编程方式加载blender中粒子系统的烘焙文件。我成功地加载了流体模拟的文件,但粒子系统使用了不同的烘焙/缓存系统,因此我在加载时遇到了困难

以下是我正在使用的代码:

pts = []

for i in scn.objects:
    for j in i.modifiers:
        if j.__class__.__name__ == "ParticleSystemModifier":
            pts.append(j.particle_system)


file_start_particle = 'tt'
file_index = '00'

for m in pts:
    m.point_cache.filepath = bake_file_path
    m.point_cache.name = file_start_particle
    m.point_cache.index = int(file_index)
    m.point_cache.use_external = True
    m.point_cache.use_disk_cache = True
但是,这会产生黑色图像。控制台上没有显示错误,渲染似乎正在进行

知道如何加载缓存文件以便使用它们和渲染工作吗

谢谢