I am very new to blender and I am trying to move a cube in an environment. I have a csv file with a list of coordinates designated by columns, each column is the X, Y, or Z coordinates with n rows. From this list, I am trying to read the file in blender and move the cube to the coordinates in each row. Any python coding help or tips would be fantastic.
Assuming you need only the first 3 columns of each row and you need to iterate over, one way of doing could be this. you need to have your object selected
""" Example csv: 1.1, 1.3, 1.1 2.2, 2,1, 2.3 """ import bpy import csv csv_path = "path_to_your_csv" with open(csv_path) as file: csv = csv.reader(file, delimiter=",") # iterate over each rows assuming you need only # the the first 3 columns (if there are more) for row in csv: # row is a list with strings elements so must be converted in float x, y, z, *_ = [float(value) for value in row] bpy.ops.transform.translate(value=(x, y, z))