Open enzyme69 opened 6 years ago
To Load Multiple TXT Files Into Memory: (run this once, specify the folder name)
import os
import bpy
# put the location to the folder where the objs are located here in this fashion
# this line will only work on windows ie C:\objects
path_to_obj_dir = os.path.join('/Users/jimmygunawan', 'TXTOUT')
# get list of all files in directory
file_list = sorted(os.listdir(path_to_obj_dir))
# get a list of files ending in 'obj'
obj_list = [item for item in file_list if item.endswith('.txt')]
# loop through the strings in obj_list and add the files to the scene
for item in obj_list:
path_to_file = os.path.join(path_to_obj_dir, item)
#bpy.ops.import_scene.obj(filepath = path_to_file)
#print(path_to_file)
#bpy.ops.text.open(filepath = path_to_file, internal=True)
loaded_text_file = bpy.data.texts.load(filepath = path_to_file, internal=False)
loaded_text_file.use_fake_user = False
print("DONE...")
To Load Weight Data into another BLEND:
All the Blends used: [Uploading reaction_diffusion_load_013.blend.zip…]() import_many_003.blend.zip reaction_diffusion_007_save.blend.zip
To Save Weight Data: