Open links in new tab
  1. Blender’s Python API (bpy) allows you to create, modify, and automate almost anything you can do in the UI — including generating objects, animations, and custom tools. You can run scripts directly inside Blender or from the command line.

    Setting Up

    • Open Blender and switch to the Scripting workspace.

    • In the Text Editor, create a new script or open an existing .py file.

    • You can also use the Python Console for quick testing with auto-completion.

    Creating Objects via Python

    Here’s an example that generates a cube and applies transformations:

    import bpy

    # Delete all existing objects
    bpy.ops.object.select_all(action='SELECT')
    bpy.ops.object.delete(use_global=False)

    # Add a cube
    bpy.ops.mesh.primitive_cube_add(size=2, location=(0, 0, 0))
    cube = bpy.context.active_object
    cube.name = "MyCube"

    # Move and scale the cube
    cube.location.z = 1
    cube.scale = (1.5, 1.5, 1.5)

    # Add a material
    mat = bpy.data.materials.new(name="MyMaterial")
    mat.diffuse_color = (0.2, 0.6, 0.8, 1) # RGBA
    cube.data.materials.append(mat)
    Copied!
    Feedback
  2. Quickstart - Blender Python API

    Learn how to use the Blender Python API to edit data, create user interface, run tools, and access custom properties. This document covers the basics of data access, creation, removal, and context.

  3. Blender Python API Guide for 3D Automation - PyTutorial

    Jan 30, 2026 · Learn how to use the Blender Python API to automate 3D modeling, animation, and rendering tasks with practical Python scripting examples.

  4. Using Python in Blender: For Beginners – Talstra Net

    May 7, 2024 · Learn how to use Python to automate and customize your 3D projects in Blender. This tutorial covers the basics of Blender's Python API, creating and …

  5. Blender & Python Scripting – Step-by-Step Guide | Coursera

    In this course, you will learn Blender scripting with Python. You'll start by learning the basics of Python programming, setting up Blender, and understanding the Blender …

  6. Tutorial - Python Scripting in Blender 3D - Peq42

    Mar 2, 2025 · By following this tutorial, you should be able to start scripting in Blender with Python fairly easily. Remember that practice is key to becoming …

  7. Mastering the Blender Python API: A Comprehensive Guide

    Apr 2, 2025 · Whether you're a 3D artist looking to streamline repetitive workflows or a developer interested in creating new Blender add-ons, understanding the Blender Python API is essential.

  8. Blender Python simple basics - YouTube

    Beginner Blender Python Tutorial: Assigning materials to faces of a mesh (Part 1) 7K views

  9. Learn Blender Python - Canopy Games

    Familiarize yourself with Blender’s interface and core functionality. Understand the basics of Python scripting within Blender. Learn to write simple but powerful …

  10. A Beginner's Guide to Blender Python Scripting

    A Beginner's Guide to Blender Python Scripting Are you new to scripting and eager to create your own Blender add-on? In this tutorial, we will walk you through the basics of setting up your scripting …

  11. Add-on Tutorial - Blender 5.1 Manual

    This tutorial is designed to help technical artists or developers learn to extend Blender. An understanding of the basics of Python is expected for those working …

  12. People also ask
    Loading
    Unable to load answer