Addition to callbacks & custom UIs - Python
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 45/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
リンクされている callbacks とカスタム UIs のドキュメントページから始め、周辺の例を確認してください。UI で制御される値を保存する、示されている Python モジュールベースのアプローチを、global と nonlocal に関する既存の説明に加えてください。例には variables.py と main.py を使用します。ページでこの代替方法が明確に説明され、例が callback API と一貫していれば完了です。
索引モデルが issue の本文から書いたものです。
説明
https://polyscope.run/py/features/callbacks_and_UIs/#creating-custom-uis
#If we want to use local variables & assign to them in the UI code below,
# we need to mark them as nonlocal. This is because of how Python scoping
# rules work, not anything particular about Polyscope or ImGui.
# Of course, you can also use any other kind of python variable as a controllable
# value in the UI, such as a value from a dictionary, or a class member. Just be
# sure to assign the result of the ImGui call to the value, as in the examples below.
#
# If these variables are defined at the top level of a Python script file (i.e., not
# inside any method), you will need to use the `global` keyword instead of nonlocal`.
If you want to avoid using declarations global or nonlocal,
you can also use different module to store these values and call it on main module as below
variables.py
is_true: bool = False
main.py
import variables as vr
def callback()
change, vr.is_true = psim.Checkbox("Selection box", vr.is_true)
- 主要言語
- C++
- スター
- 2.2k
- フォーク
- 242
- 平均マージ
- 11分
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nmwsharp/polyscope のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
-
Rust Version オープン
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
nmwsharp/polyscope の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
ros2/message_filters#338 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
subsurface/subsurface#4984 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
google-ai-edge/LiteRT-LM#3739 ·