Make the workfiles app work in Blender#465
Conversation
avalon/tools/workfiles/app.py
Outdated
| messagebox.setStandardButtons( | ||
| messagebox.Yes | messagebox.No | messagebox.Cancel | ||
| self._messagebox.setStandardButtons( | ||
| self._messagebox.Yes | self._messagebox.No | self._messagebox.Cancel |
There was a problem hiding this comment.
line too long (80 > 79 characters)
Although I personally think the readability suffers from this. https://www.youtube.com/watch?v=wf-BqAjZb8M&t=1s
|
Nice one @jasperges !
What is your Blender integration? Is Avalon missing something, or are you talking about your Avalon config? |
I'm adding Blender 2.80 as a supported host to Avalon. |
|
Ahh, I see. This PR is part of a future bigger PR. |
|
Yes, this is in preperation of that one. But I felt a seperate PR is in place here, because apart from giving problems with Blender it also is not consistent with the other tools. But I also wouldn't mind to incorporate it into the the 'blender PR'. |
|
Nice and consistent, thanks! |
|
@jasperges Could this have been fixed by explicitly setting the parent on those widgets to |
# Conflicts: # avalon/tools/workfiles/app.py Note this changes the fix from getavalon#465 to not store the widgets as explicit variables but by setting the parent widget
|
@BigRoy I have no idea... Let's find out! 🤓 |
For this I didn't make an issue, because it seems easier to discuss the changes when looking at the code itself. Questions, concerns or suggestions are more then welcome!
There are basically 2 things needed to make it work:
module.windowis now used. This also has the advantage of making it consistent with the other tools which do this already.exec_()for the main window, because this blocks Blender and creates conflicts between the Qt event loop and Blender event loop (if I'm not mistaken). Instead justshow()the window and keep it responsive by triggeringprocessEvents()all the time from within Blender. This last part is not shown here, because it's part of my Blender integration. This also makes it consistent with the other tools which also just runshow(). For themessageboxandname_windowit seems fine to runexec_(), they are not working if you runshow(). To be honest I'm not completely sure why.I hope this doesn't cause any problems with other DCC's, but I suspect it's fine because the other tools also do this.