Skip to main content

Type stubs for Blender 5.1 Python API

Project description

blender-python-stubs

Type stubs for Blender 5.1 Python API.

Provides autocomplete, type checking, and inline documentation for bpy, mathutils, bmesh, gpu, freestyle, and all other Blender Python modules.

Installation

pip install "blender-python-stubs>=5.1,<5.2"

Features

  • Full Blender API coverage (bpy, mathutils, bmesh, gpu, gpu_extras, bpy_extras, freestyle, aud, blf, bl_math, imbuf, idprop)
  • Accurate collection types (BlendDataObjects instead of generic bpy_prop_collection)
  • Readonly @property decorators for RNA attributes
  • Typed context members (bpy.context.active_object, selected_objects, etc.)
  • Constructor signatures for mathutils, gpu, and other C extension types
  • Literal enum types instead of plain str
  • Zero typing.Any usage
  • 0 errors in basedpyright strict mode

Usage

import bpy

obj = bpy.context.active_object
assert obj is not None
obj.location.x = 1.0

bpy.data.objects.new("Cube", bpy.data.meshes.new("Mesh"))

Disclaimer

This project was coded with assistance of AI.

License

MIT


Generated by blender-python-stubs.

Made with ❤️ at Autour de Minuit (ADV) blender

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blender_python_stubs-5.1.0.1.tar.gz (516.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blender_python_stubs-5.1.0.1-py3-none-any.whl (545.9 kB view details)

Uploaded Python 3

File details

Details for the file blender_python_stubs-5.1.0.1.tar.gz.

File metadata

File hashes

Hashes for blender_python_stubs-5.1.0.1.tar.gz
Algorithm Hash digest
SHA256 04cd83135347908ace66c6702f217bd3e0d34deea03c8b2e6a60dacbee0ed33a
MD5 3764d3dd7fb60d58fa715a2fe08e92d1
BLAKE2b-256 ee8174f9915cbd399facb325e7e5a072bb60f403f48e0ee9c4c1046d6d288f13

See more details on using hashes here.

File details

Details for the file blender_python_stubs-5.1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for blender_python_stubs-5.1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 68d45a57f1ff5980644df62e83440c9e0bea559476662c841f961e70871882a9
MD5 31b70bf11eb0919527a6e51cc304427b
BLAKE2b-256 37f06d886be4dce42625dd562529204ee88fd480ecec00138e6d2d3abf75b21d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page