スクリプト情報メモ
Blender2.5向けのスクリプト情報。
主に
http://wiki.blender.org/index.php/Doc:2.5/Manual/Extensions/Python
から辿れるところ。
Scripting examples
Blending Into Python/2.5 quickstart
Context + Operation = Result
オブジェクト(ObjectとかMesh)のメソッドを呼ぶのではなくて、操作対象を選択状態にしてからOperation(bpy.opt下の関数)を呼ぶスタイルになった件について。
ちなみにOperationには引数も返り値も無いそうな。
http://en.wikibooks.org/wiki/Blender_3D:_Blending_Into_Python/2.5_quickstart
Addons
パネルやメニューの登録について
http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Addons
.blender/scripts/uiにあるproperties_*.pyが「Properties」の表示を定義していて、space_*.pyが各ビューのProperties(Nキーで表示をトグルする部分)の表示を定義しているようだ。
Python API Introduction
いろいろ有用な情報が書いてある。
http://wiki.blender.org/index.php/Dev:2.5/Py/API/Intro
Script Initialization
All scripts in known directories scripts/ui, scripts/io, scripts/op are imported (not run) on startup. Use F8 to reload these scripts.
F8でスクリプトの初期化
Reference
http://www.blender.org/documentation/250PythonDoc/bpy.types.html
()の中は継承元。
Hoge(ID)となっているものがデータブロック(Armature, Mesh, Material...)。
MainXXXs(bpy_struct)となっているものがbpy.data.XXXsに対応する。
Context(bpy_struct)がモードやウインドウエリアなどの制御。