
问题



常用代码
import c4dimport redshiftfrom os.path import joinfrom c4d import documentsfrom c4d import guiimport json
import c4dimport osdef main():if __name__=='__main__': main() c4d.EventAdd()
文件保存
def creatJsonFile( msg,savePath1): #创建json文件 if savePath1[-5:] == ".json": full_path = savePath1 else: full_path = savePath1+ '.json' file = open(full_path,'w') file.write(msg) file.close() print('Done')
文件读取
def creatJsonFile( msg,savePath1): #创建json文件 if savePath1[-5:] == ".json": full_path = savePath1 else: full_path = savePath1+ '.json' file = open(full_path,'w') file.write(msg) file.close() print('Done')
参考