Skip to content

Instantly share code, notes, and snippets.

@zeffii
Created February 13, 2015 12:11
Show Gist options
  • Save zeffii/1dafe9847c2ab42c551e to your computer and use it in GitHub Desktop.
Save zeffii/1dafe9847c2ab42c551e to your computer and use it in GitHub Desktop.
import bpy
from mathutils import Vector, Color
from random import random as rnd
curves = (c for c in bpy.data.objects if c.type == 'CURVE')
mat = bpy.data.materials['curve_material']
for c in curves:
c.data.bevel_depth = 0.00
c.active_material = mat
c['first_vertex'] = Vector(c.data.splines[0].points[0].co[:3])
c['tcol'] = Color((rnd(), rnd(), rnd()))
c['tcol_r'] = rnd()
c['tcol_g'] = rnd()
c['tcol_b'] = rnd()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment