IDEA Improvement: Need Help to recursively import RDCs from a Folder and store each element into a Collection #128
Labels
discussion
This is not really an issue but a thread for the users to exchange about teh software
As written in the title and kindly need @eliemichel help, my script is almost ready but I have some troubles because it stores only the first element on the collection under its named from file.
Hope it can help:
import bpy
import os
import sys
import glob
directory_im = 'C:/Users/fcapp/Desktop/LowPoly2/'
files = glob.glob(directory_im + ".rdc")
for f in files:
head, tail = os.path.split(f)
collection_name = tail.replace('.rdc', '')
bpy.ops.import_rdc.google_maps(filepath=(f), filter_glob=".rdc", max_blocks=-1)
myCol = bpy.data.collections.new(collection_name)
bpy.context.scene.collection.children.link(myCol)
for ob in bpy.context.selected_objects:
myCol.objects.link(ob)
Where am I wrong? Need to solve that...
Current Configuration:
Blender 2.91, Maps Model Importer 0.3.5, RenderDOC 1.10, Chrome X64 on Windows Pro 87.0.4280.141( 64 bit)
The text was updated successfully, but these errors were encountered: