Difference between revisions of "Start coding for Blender"

From Wiki.OSArch
(Add bpy stubs)
Line 13: Line 13:
  
 
<youtube>https://youtu.be/XqX5wh4YeRw</youtube>
 
<youtube>https://youtu.be/XqX5wh4YeRw</youtube>
 +
 +
Useful resource on creating custom UI with Python in Blender:
 +
 +
https://blender.stackexchange.com/questions/57306/how-to-create-a-custom-ui
 +
 +
 +
The Scripting for Artists tutorial series by Sybren Stuvel is another useful resource for learning to script with Python in Blender:
 +
 +
[https://www.youtube.com/watch?v=opZy2OJp8co&list=PLa1F2ddGya_8acrgoQr1fTeIuQtkSd6BW Scripting for Artists]
 +
 +
Ditto the series by Darkfall:
 +
 +
[https://www.youtube.com/watch?v=cyt0O7saU4Q&list=PLFtLHTf5bnym_wk4DcYIMq1DkjqB7kDb- Tutorial Series by Darkfall]
 +
  
 
To learn more checkout the [https://docs.blender.org/api/current/index.html Blender Python API documentation] especially Quickstart part.
 
To learn more checkout the [https://docs.blender.org/api/current/index.html Blender Python API documentation] especially Quickstart part.
 +
 
==Tips and Tricks==
 
==Tips and Tricks==
 
===From Blender Python API doc===
 
===From Blender Python API doc===

Revision as of 00:58, 27 December 2020

Blender core is coded in C. Some part like Cycles are coded in C++. Python is widely used for extending Blender functionalities with scripts and addons.

(For BlenderBIM Addon specific code see BlenderBIM Add-on code examples)

C/C++

Blender foundation made a video to present code structure :

Dive Into The Code (peertube)

python

Introduction

Good introduction to python use in Blender from Curtis Holt :

Useful resource on creating custom UI with Python in Blender:

https://blender.stackexchange.com/questions/57306/how-to-create-a-custom-ui


The Scripting for Artists tutorial series by Sybren Stuvel is another useful resource for learning to script with Python in Blender:

Scripting for Artists

Ditto the series by Darkfall:

Tutorial Series by Darkfall


To learn more checkout the Blender Python API documentation especially Quickstart part.

Tips and Tricks

From Blender Python API doc

Blender Python API documentation has a special Tips and Tricks chapter including external editor usage, inserting a python interpreter etc…

bpy stubs for auto-completion

Main known project which provide stubs for auto-completion is fake-bpy-module. It also provide type hints for python >= 3.7 which should allow to perform type checking (eg. mypy).