Hello!
I’m creating a UI which basically has 2 elements. The top is always constant (contains buttons and such) and the bottom is dynamically created depending on which of the referenced rigs the user(animator) wants to work on.
On the top part there’s a drop down menu that contains all refrenced rig, when the user selects a different character in the drop down menu, the bottom part of the UI gets re-created.
the two part are split into 2 seperate defs:
- def build_window :
- def build_child_panel
Here’s what I’m trying to do:
I want to attach the bottom part (of build_window) to the top part (of child_panel), so when I stretch the window vertically the 2 elements stick together.
What happens now:
| element 1 |
|_____________|
crappy spacing
| element 2 |
|_____________|
What I want:
| element 1 |
||
| element 2 |
||
I’m using a formLayout in the “build_window” def:
with formLayout(‘fb_mainLayoutForm’,nd=100) as main_form :
blah, blah, build buttons…
At the top of the “build_child_panel” def:
with frameLayout(‘tools_frame’,lv=0,bs=‘etchedOut’,mh=5) as tools_frame :
blah, blah, build check-boxes and such…
Then at the bottom of my “build_child_panel” def:
edit main form
formLayout(main_form, e=1, ac=([tools_frame,‘top’,5,self.icon_buttons]))
–It finds main_form
–but doesn’t find tools_frame
I get this error:
RuntimeError: Object ‘FlipbookCC|tools_frame’ not found.
(FlipbookCC = window name)
I even tried doing:
self.tools_frame = tools_frame
but same error.
I’ve dug into google a bit and people are saying that using “with…as” statements with layouts brake things.
Any help with this would be much appreciated!