Difference between revisions of "Start coding for Blender"

From Wiki.OSArch
(Add bpy stubs)
(Undo revision 1596 by Cyril (talk))
Tag: Undo
Line 16: Line 16:
 
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===
 
 
Blender Python API documentation has a special [https://docs.blender.org/api/current/info_tips_and_tricks.html Tips and Tricks] chapter including external editor usage, inserting a python interpreter etc…
 
Blender Python API documentation has a special [https://docs.blender.org/api/current/info_tips_and_tricks.html 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](https://github.com/nutti/fake-bpy-module). It also provide type hints for python >= 3.7 which should allow to perform type checking (eg. mypy).
 
 
  
 
[[Category:Blender]] [[Category:BlenderBIM Add-on]]
 
[[Category:Blender]] [[Category:BlenderBIM Add-on]]

Revision as of 14:46, 9 October 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 :

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

Tips and Tricks

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