Got a simple script that gives me errors.
First time in C4D so maybe it is a simple API call mistake, but it does not seem so.
the error isReferenceError: could not find 'main' in generator 'Python Generator'
My thanks for helping out, looking forward to building cool stuff in C4D
import numpy as np
n = 10
y = 0
grid = np.random.choice([1, 0], n * n).reshape(10, 10)
for i in range(n):
for j in range(n):
if grid[i, j] == 1:
vec = c4d.Vector(i * 230, j * 230, y)
obj = c4d.BaseObject(c4d.Ocube) # Create new cube
obj.SetRelPos(c4d.Vector(vec)) # Set position of cube
doc.InsertObject(obj) # Insert object in document