FIXED: 099 Win10 build 2020.20625 - Python Pane Class bugs

Hi!
I’m building a toolbar component which is intended to be displayed in a dynamically created pane.
As I was working on the Python part, I encountered several bugs/inconsistencies with the Panes Class and the Pane Class.

  • calling pane.ratio in a floating pane opened with ui.panes.createFloating() makes TouchDesigner crash
  • calling pane.close in a pane opened with ui.panes.createFloating() close the window but doesn’t update properly the ui.panes list
  • pane.ratio seems to be inverted when splitting top or bottom, but not when splitting left or right
  • if operators are referencing ui.panes[“pane_name”], they are not automatically cooking when ui.panes changes, maybe it’s a normal behaviour, but it would be very convenient to have some dependency there :slight_smile:

I made an example for each mentioned case in the attached project file. I also joined the crash dump I’m having with pane.ratio in floating pane

ui_panes_debug.zip (38.6 KB)

I hope it will help !

Cheers,

1 Like

Thanks for the thorough report and example file, we’ll look into it.

2 Likes

@FM64 The crash will be fixed in the next posted build, however the other issues will take us a bit longer to get to.

I’m also having inconsistencies with ui.panes not wanting to update in any dependable way, with ui.panes.current being especially frustrating because it does not refresh or stay consistent between saves, sometimes getting stuck until destroyed and recreated.

Sounds like you’re aware of the problem but we might not see a fix for a while, let me know if there are any other ways to consistently get the selectedChildren[0] of a current panel

Small observation while we investigate:

You’ll want COMP.current instead of COMP.selectedChildren[0], as the order of the selection doesn’t guarantee the position of the current.

You are just trying to access the last selected operator right?
If this selection changes, do you need to be made aware of it, or are you polling after another event?

My use case had ui.panes.current in an eval dat driving a parameter comp to create a parameter inspector not unlike the one in the network editor, but accessible from the ui. Ideally selecting a node in any pane returns the most recently selected operator. For now I can get there by forcing a cook on click, but I wouldn’t have to do that if ui.panes.current was dependable

Thanks for the extra info.
Builds 2020.24240 and later will now have panes.current update expressions reliably.
Cheers.

2 Likes

It seems the rest of the ui.panes class still suffers from the same cook dependency issues; I can’t get len(ui.panes) or ui.panes[1] etc. to update reliably

1 Like