def execute(self, context):
import os
folder_path = bpy.path.abspath("//img")
for file in os.listdir(folder_path):
if file.lower().endswith(('.psd', '.kra')):
import sys
import subprocess
file_path = folder_path + "/" + file
if sys.platform.startswith('darwin'):
subprocess.call(('open', file_path))
elif os.name == 'nt':
os.startfile(file_path)
elif os.name == 'posix':
subprocess.call(('xdg-open', file_path))
return {'FINISHED'}
simple_operations.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录