Closed davidlatwe closed 4 years ago
Thanks @tokejepsen ❤️ For testing, hope that @BigRoy can have a test on Houdini, and @jasperges or @jezscha able to test on Nuke ☺️
Also, I don’t have fusion here, so the tools still unparented in fusion.
Also, I don’t have fusion here, so the tools still unparented in fusion.
There's no Qt in Fusion so I think that will have to remain as is unfortunately.
For testing, hope that @BigRoy can have a test on Houdini
Very nice! I wonder how I missed doing this at the time. Anyway, nice work!
I did notice the styling felt a bit off as it seems to be using the Houdini font as opposed or something? For example:
I wonder if there's a way to patch that up too.
The Work files tool however pops up this error on opening:
Traceback (most recent call last):
File "D:\git_pipeline\avalon\development\git\core\avalon\tools\workfiles\app.py", line 344, in <lambda>
QtCore.QTimer.singleShot(100, lambda: self.list.scrollToItem(item))
RuntimeError: Internal C++ object (PySide2.QtWidgets.QListWidgetItem) already deleted.
Additionally it seems that the Work Files tool does not have the Avalon styling whatsoever. Or does it look so different solely due to the font being so different?
Also I did recall this comment in Shotgun's toolkit regarding styling Qt widgets inside houdini which calls the method here. Maybe we should try and just apply the stylesheet globally in Houdini? Sounds a bit hacky though.
Maybe we should try and just apply the stylesheet globally in Houdini? Sounds a bit hacky though.
Haha, and it says here..
NOTE: Except for 16+. It's no longer safe and causes lots of styling problems in Houdini's UI globally.
So hacky indeed !
Anyway, I finally resolved the font size and QSplitter
issue by adding some entry in style.qss
, the Loader and Creator tools should now look almost the same as in other DCC.
Furthermore, I also moved the line window.setStyleSheet
after window.show
in every tool, so their appearance should all aligned now.
Houdini Work files error
The Work files tool however pops up this error on opening:
Traceback (most recent call last): File "D:\git_pipeline\avalon\development\git\core\avalon\tools\workfiles\app.py", line 344, in <lambda> QtCore.QTimer.singleShot(100, lambda: self.list.scrollToItem(item)) RuntimeError: Internal C++ object (PySide2.QtWidgets.QListWidgetItem) already deleted.
Originally, this issue was fixed in https://github.com/getavalon/core/pull/472/commits/1b2e9add741848c3e933fe03ccd74374ca8045e3, but after a few more search, I find that keeping the Houdini's main window instance in a place which can have a longer lifespan is a better solution, which fixes in a higher scope (based on this post). So I revert the previous commit and add https://github.com/getavalon/core/pull/472/commits/5907a80bcd2e0ff6457be3e0617d054cd127ebe9.
Note that the Segmentation fault
error described in top comment can still exists after this change.
And for removing duplicated main window getting logic plus having same function for each host, I also add get_main_window
in maya.pipeline
in https://github.com/getavalon/core/pull/472/commits/49687febcb7cc5072b4203f4ba6f7ecd85d95954.
Just noticed as well that the Loader is not parent to the Maya window.
@tokejepsen, really !? Loader did get parented in Maya here in my end. :astonished:
@tokejepsen, really !? Loader did get parented in Maya here in my end. 😲
Ok, I'm not on the latest core, so it could just be something with my fork. Nvm :)
Will merge this tomorrow if no other objections :)
I've scanned through the code and couldn't find anything I didn't like. Nice work. :)
Problem
Avalon tools like Loader, Creator, Scene Manager, Context Manager, Workfile were not parented in Houdini and Nuke's main window.
And the Workfile app's
show()
wasn't acceptparent
arg at all.Changes
parent
flag toavalon.tools.workfiles.show()
While I was working on Houdini, I encountered two problems:
Segmentation fault
fatal error.On problem 1, the Loader has become:
See Image
![image](https://user-images.githubusercontent.com/3357009/68201708-428f3100-fffd-11e9-9f33-ea7cc88287d3.png)And the Context Manager:
See Image
![image](https://user-images.githubusercontent.com/3357009/68201798-6c485800-fffd-11e9-9330-41e91a770c15.png)Which looks cool but I love Avalon flavor more. Interestingly, Creator and Scene Manager did not have this issue, not sure why :(
See Image
![image](https://user-images.githubusercontent.com/3357009/68202029-dcef7480-fffd-11e9-9322-db3442f1ce7a.png)On problem 2, it was because of directly connecting
QtWidgets.QTreeView.selectionModel()
to the handler, and leads to aSegmentation fault
error and crash Houdini.The only useful info I could find was this tweet.