Skip to content

Instantly share code, notes, and snippets.

@Andrej730
Andrej730 / random_object_colors.py
Created June 4, 2023 19:24
random_object_colors operator for blender
bl_info = {
"name": "Random Object Colors",
"author": "@Andrej730",
"version": (1, 0),
"blender": (2, 90, 0),
"location": "F3 -> Random Object Color",
"description": "",
"warning": "",
"category": "Objects"
}
# minimal shader example to create smoothed polylines on Metal
import bpy
import gpu
from gpu_extras.batch import batch_for_shader
polyline_vert_glsl = """
// emits 6 vertex per each line
// see: https://projects.blender.org/blender/blender/issues/107332