0
0

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.

BlenderPoly アドオンを Blender 2.8 対応するにあたって引っかかったところ

Posted at

 Blender 2.8 の正式リリースが近づいて来たのを自作の BlenderPoly アドオンを 2.8 に対応させました。その際に引っかかったところをまとめました。

参考になるドキュメント

対応差分

 今回の対応の差分は https://github.com/satoyuichi/BlenderPoly/pull/17/files の通りです。 2.8 対応とは直接関係ない部分や上記のドキュメントで済んでしまった部分に関しては割愛します。

user_preferences の書き換え

 BlenderPoly の場合は API キーをアドオンの設定から保存できるようになっているのですが、それの保存先を user_preferences から preferences に書き換えました。

.obj ファイルのインポート API の変更

 bpy.ops.import_scene.obj() のキーワード引数 global_clamp_sizeglobal_clight_size に変更しました。

アイコンの変更

 SAVE_PREFS アイコンが廃止されたようなので、 PREFERENCES に変更しました。適当なアイコンを探す際には Icon Viewer が便利です。アドオンを有効にして Icon Viewer ボタンをクリックします。
スクリーンショット 2019-07-23 15.07.36.png

 するとアイコンが列挙されるので、それっぽいキーワードで絞り込むか、適当なアイコンをクリックして名前を調べましょう。

スクリーンショット 2019-07-23 15.09.07.png

まとめ

 こう書いてみると大したことやってないですね…。時間を取られたのはむしろ既出のもので、単純に自分が読み落としてただけというものが多かったです。(bl_region_type = 'TOOLS'bl_region_type = 'UI' にするとか)

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?