1
0
mirror of https://gitlab.com/MisterBiggs/SADC.jl.git synced 2025-07-28 00:51:30 +00:00

added script to import sim to blender for viz

This commit is contained in:
2021-08-02 02:44:50 -07:00
parent aeb8b828f5
commit 00c2cb08cb
2 changed files with 216 additions and 0 deletions

15
blender.py Normal file
View File

@@ -0,0 +1,15 @@
import bpy
import csv
f = start_frame = 1
frames_per_row = 1 / 100
csv_path = "C:\Coding\SADC.jl\ypr.csv"
ob = bpy.context.object
with open(csv_path) as file:
rows = csv.reader(file, delimiter=",")
for row in rows:
ob.rotation_euler = [float(v) for v in row[1:4]]
ob.keyframe_insert("rotation_euler", frame=float(row[0]))