Blenderはcontext と呼ばれる仕組みでパネルの管理がされているようだ(?)
PySideなどで独自でWindowなどを作成する際は context の継承などを行う必要があるらしい
PySideで作成したGUI内で選択しているオブジェクトを取得しようと以下のコマンドを実行したらエラーが出た。
selected_objects = bpy.context.selected_objects
dirでbpy.contexを調べるてみると、selected_objects アトリビュートが無いようだ。
dirで contexを調べてみると selected_objectsが無い
メインGUIから同じコードを実行した場合
調べてみた
bpy.context.selected_objects: Context object has no attribute "selected_objects"
The context is dependent on quite a number of things, and not every context holds the scene's set of selected_objects. A safer and more consistent way to get the selected objects is this:
PySideの場合、アトリビュートが継承されない??