--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/c6627371-a7b9-403b-b13f-fa51eaf0cef4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I've never used resource files without compiling them via rcc. When you use them in Designer, as you know, it will put a reference to them in your UI file. When you convert them to python via uic, it will expect the qrc to have also been compiled. I don't even know of there is a dynamic rcc operation that you can run which is similar to the uic you perform at runtime.
Maybe that boilerplate thing can be extended to suit your workflow and detect and perform the rcc at runtime before the uic happens. This would not be suitable for production, since it would be slower, and still require all the images to be present and the pathing to be correct. But it could at least suit the prototyping workflow you have chosen.
@Marcus, another benefit of compiled qrc files is that you don't have to deploy any of the source images or deal with path locations. You only need to deploy one python file as standard code in the python path.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOA-AMMHqrV_Jqq5pg3Nxtduet-6O%3Dh-U8-%3DmDG0sdZkoQ%40mail.gmail.com.
> @Marcus, another benefit of compiled qrc files is that you don't have to deploy any of the source images or deal with path locations. You only need to deploy one python file as standard code in the python path.Yeah, but I don't buy it.This only really makes sense if you separate between development and deployment directory. With Python, this distinction isn't made and you end up deploying the development directory. Meaning paths don't change as they do during deployment of compiled Qt.
Let's say your right, wouldn't it still mean keeping the source images in the development directory, and still deploying them? You'd end up with qrc and source images. I suppose you could selectively exclude them via some packaging mechanism like pip, but why bother?
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOC_rMZZaAi-_TVuh47eFV1xDwQM83evwUU-xDnkSGbdZw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA13O5GTLi8ODhE%2BPJBeMcCas35qTjkxeKv3JPuBpkM9Bg%40mail.gmail.com.
Be realistic, when have you ever had to do this beyond just experimenting and learning about qrc? Yes, it's possible to make this separation and yes, somewhere there probably are those that do. But the question isn't whether it's possible, the question is why jump through these hoops?
If the OP is developing within a production environment then all the more reason to avoid qrc where deployment could be as simple as pushing to a central repo.
I'm questioning the practice of qrc in the context of Python, I think those that use it do so from reading about it in a C++ context.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCYP06m6UB%2BSB1bVt5sueG4HiKN23iA6NWjB5iko46hcg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA028yZNyR-_V7j8-GAwHfjKx3VUw5yj%2BiJQV1G9DhdrEw%40mail.gmail.com.
> And when that application has to be deployed to other locations, it doesn't matter if the source images go with it.But it does matter whether resources.py goes with it?
I don't see it. Setting up any automated system or having anyone do anything manually is hoops to me, especially when it isn't necessary. The problems of debugging a build system is greater than the problems of debugging plain files.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAoJTJpFqRyFvtCC%2BnAbC67an_DPobYEdJ4YVN%2BZVPEyQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3Sxz1WsF4FeCr8Jd3i7bvL3EV4gVX3L-RX%2BzS_NQWAsQ%40mail.gmail.com.
On Tue, 8 Sep 2015 9:16 PM Marcus Ottosson <konstr...@gmail.com> wrote:
Yes, we are probably picturing different scenarios. Not everyone works at WETA. I'd argue that most don't and what you speak of are edge-cases in the context of Python, Maya and this mailing list. Wouldn't you agree?
I don't understand what Weta has to do with this. Is it not relevant for someone to want to deploy a Maya UI tool that is as simple as two files? A main.py, and a resource.py which may contain, say 50 icons? If it made it easier for someone to just download these two files and rely only on the package being in the python path to work... isn't that valuable?
I don't see it as an edge case, or something reserved for big companies with massive deployment efforts. I just see it as a way for someone to be able to distribute a tool or library that may need a few last minute preparations.
Before Weta I was at a small studio (SouthPark), and we made heavy use of py2app to make tools available to artists and production. That is a build system.
--
Marcus Ottosson
konstr...@gmail.com
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBBLEijwy73oeGVL%2B%2By7n_1JpBPKqo_rs%2BmCF10VL3JEg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2_1pGbUjbLiEDGrRfSpN_KiLAS1jovgeFyCa7z8C26Xg%40mail.gmail.com.
Justin wrote: Maybe that boilerplate thing can be extended to suit your workflow and detect and perform the rcc at runtime before the uic happens. This would not be suitable for production, since it would be slower, and still require all the images to be present and the pathing to be correct. But it could at least suit the prototyping workflow you have chosen.
On Wed, 9 Sep 2015 1:07 AM Nico Klaassen <klaass...@gmail.com> wrote:
...
Also, the deployment
Justin wrote: Maybe that boilerplate thing can be extended to suit your workflow and detect and perform the rcc at runtime before the uic happens. This would not be suitable for production, since it would be slower, and still require all the images to be present and the pathing to be correct. But it could at least suit the prototyping workflow you have chosen.
@Justin: Yeah, ideally it would only be for prototyping. Seeing as I just recently started as a Jr. TD, I'm still trying to figure out a lot of stuff. This is one of those things. Deployment would, ideally imho, only consist of main.py + main.ui + main.qrc (in one form or another). Do I understand correctly that you always compile the ui-file and qrc-file both? (While implementing the result of the pysideuic in directly into the main.py & NOT load the UI file at runtime?)
Back when I *was* using Designer, my preference was always to compile ui/qrc files ahead of time, and only deploy:
main.py + main_UI.py + main_rc.py
Nowadays since I don't use designer, I just deploy python with hand written UI code, and optionally an rc python file, if I have static resources and it makes sense to do so.
Marcus, is correct that you have the option to ditch the rc and set the image paths directly in your code. And I understand that you are, at this time, choosing to do it up front in Designer so that you can have visual feedback while you design. If you do that, as we have established, you will need to convert it before runtime. If you choose to not do images in Designer, then you now have the option of whether using an rc file makes sense to you and can either use direct paths in code, or a hand written qrc.
Thanks again for everybody's time and input, really insightful!
EDIT: Sorry for the double post yesterday. This google-groups thing is very unlike other boards online.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/752df3dd-10e8-4573-a03e-2e5cecdd2443%40googlegroups.com.