I'm new to Blender and I'm trying to create a 3d scene starting from a csv file. I explain my problem: I have some 3d objects that I append in the scene with this function:
import bpy
bpy.ops.wm.append(
directory= "C:/Users/Valentina/Desktop/ku/stadium.blend\\Object\\" ,
filepath= "stadium.blend" ,
filename= "stadium")
stadium
is the 3d element that I have to put in the virtual scene.
If I create a csv file like this:
name; path
stadium; directory= "C:/Users/Valentina/Desktop/ku/stadium.blend\\Object\\" , filepath= "stadium.blend" , filename= "stadium"
cinema; directory= "C:/Users/Valentina/Desktop/ku/cinema.blend\\Object\\" , filepath= "cinema.blend" , filename= "cinema"
...
...
Will I be able to import the 3d object in the scene by reading the csv file? For example:
import csv
with open ('my_file.csv', 'r') as f:
r= csv reader(f, delimiter =';')
for row in r:
bpy.ops.wm.append(row[1])
Am I totally wrong?