GithubHelp home page GithubHelp logo

nikogoli / blender_compare_contexts Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 681 KB

streamlit を利用した Blender の context.copy() の結果を比較するためのアプリケーション

Python 100.00%

blender_compare_contexts's Introduction

streamlit を利用して Blender の context.copy() の結果を比較する

結果だけ見たい人用の見本 (※更新していないので古い)

streamlit run https://gist.githubusercontent.com/nikogoli/0819ef7c026a6f50786518822549f25f/raw/10a667ec5d6c91ab14c39643dde0908c7b8954b8/contexts_table.py

注意

  • 手作業が多い
  • streamlit が必要
  • 付属の blend ファイルは、ワークスペース"Scripting"のエリア分割を派手に変更している
    → ワークスペース"Scripting"の内容を変更したくない場合は、自分で blend ファイルを用意することを推奨する
  • Mac での動作確認はしていない

全体の流れ

  1. Blender にアドオンをインストールする
  2. 各エディターごとに context.copy()を json ファイルで保存する (アドオンの機能1)
  3. 保存した json ファイルを1つにまとめる (アドオンの機能2)
  4. dataframe に変換した json を streamlit を利用して表示し、他のファイルと比較する

具体的な作業の流れ

  1. show_contexts.pyがあるところに移動し、以下を実行してブラウザで context の表を眺める
streamlit run show_contexts.py
  1. 付属の blend ファイルか、適当な blend ファイルを開く
  2. export_context_addont.py を読み込む (C:\Users\〇〇\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addonsの方に入るはず)
  3. プリファレンスのアドオンのタブを「テスト中」に切り替え、「Custom: Export Context.copy()」を有効化する
  4. アドオンのパネルを開くと以下の設定パネルが出るので、必要に応じてパスを変更する
    • 初期設定では、カレントディレクトリ/tempが個別の json の保存先、カレントディレクトリ/outcomeが結合した json の保存先となっている
      アドオンの画像
  5. 各エディタのヘッダーの一番左にボタンが表示されるので、押しやすいようにエディタを並べる
    (エリア分割状態が保存されていれば、以下のようになる)
    ウィンドウの画像
  6. 調べたい状況になるように、右側のエリアで Blender を操作する
  7. 16個のエディタの「CTX」ボタンを1つずつ押し、個別の json ファイルを保存する
  8. アドオンの設定パネルで適当な名前を設定し、「Combine Json File」を押して json ファイルを結合する
  9. ブラウザを更新すると左側の表示候補に結合したファイルが追加される

blender_compare_contexts's People

Contributors

nikogoli avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.