WillIt
Blender
Catalog
My assets
Connect an agent
Pricing
Sign in
Blend new
Catalog
My assets
Connect an agent
Pricing
Blend a new
asset
Your script runs in headless Blender 4.2 on a fresh machine. We export a GLB and render a preview.
import bpy # Scene starts empty. Build geometry + materials; export & preview are automatic. bpy.ops.mesh.primitive_cylinder_add(vertices=48, radius=0.5, depth=0.08, location=(0, 0, 0.75)) top = bpy.context.object for x, y in [(-0.3, -0.3), (0.3, -0.3), (-0.3, 0.3), (0.3, 0.3)]: bpy.ops.mesh.primitive_cylinder_add(radius=0.03, depth=0.72, location=(x, y, 0.36)) wood = bpy.data.materials.new("Wood") wood.use_nodes = True bsdf = wood.node_tree.nodes["Principled BSDF"] bsdf.inputs["Base Color"].default_value = (0.45, 0.25, 0.12, 1) bsdf.inputs["Roughness"].default_value = 0.55 for obj in bpy.context.scene.objects: obj.data.materials.append(wood)
Run in Blender