6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Blender で python スクリプトを指定したディレクトリから読む

Posted at

漢なら git で Blender python スクリプト(addon)を管理したいですよね!

Blender では, なんと! 指定したパスから .py モジュールを呼んでくれる機能があります.

User Preferences から, File タブの Scripts にパスを記載します.

blender.PNG

これにより, たとえば C:\Users\syoyo\MyAwesomeScript 以下のスクリプトを読むようになります.

注意事項

Blender では, addons ディレクトリを含んでいないとスクリプトを読んでくれないので気をつけましょう.
たとえば, 上記の設定では,

C:\Users\syoyo\MyAwesomeScript\addons\yourmodule\*.py

のようなディレクトリとファイル構成にする必要があります.

まとめ

これで毎回 Blender の指定したディレクトリに .py をコピーせずとも, git 管理化のディレクトリを Script s パスに指定することで効率的な Blender python スクリプト開発ができるようになります.

Happy Blender python scripting!

参考情報 

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?