Wednesday, September 26, 2012

Venturing into the world of PyQt and Model-View design

This semester I'm taking a course called "Communication and UIs" (alongside multivariable calculus and "Design"). I've taken this opportunity to venture into the world of Python, PyQt and Model-View design by making a little asset viewer/mini-manager for Maya.

Huge thanks to Yasin Uludag for making the PyQt4 Model View tutorial series (available on his youtube channel).




Asset Viewer

  • Reads/writes to an XML file to store the asset metadata
  • Asset status
  • Asset preview image (with viewport snap option)
  • Filter (semi-broken atm)

The reasoning for making this little tool was to demonstrate the benefits of having the tools that permits the user to deal with the important stuff and not manual file labor, because everyone knows how messy that can get even if it's just a little personal project. I bet if I take a look around some old stuff I've worked on I will find wonderful examples like "robot_v212_final_reallyFinal_shitisbroken.ma".
A simple structure from the beginning goes a long way, especially when it comes to eventually move to a more complex and feature filled management.


There is still some things that needs working on, but since the focus of the course is really just UI design I won't be adding any more features that takes it beyond a "concept of asset management". I'll upload the full source etc when it's "done".

PS. Any comments concerning the UI design is greatly appreciated! I will eventually be graded on this, and my professor will not be taking all that beautiful Model-View design into consideration. Thanks!

3 comments:

  1. Hi, the dropdown menu items in the blog is not in English, so it makes it a tiny bit harder to know what to press to submit the comment. Anyway, thanks for sharing this, I would love to see the underlying model-view implementation as well as someone who also have gone through Yasin's tutorials but have questions on implementation of these... as for the UI, Iteration is a subset of Asset, which in turn is a subset of Library right? I am confused to why these tabs are next to each other, categorized in a similar way, when they are not logically equivalent. Otherwise very good work. Cheers.

    ReplyDelete
    Replies
    1. Thanks a lot for the feedback! I changed the language to English now, I hope that fixes the issue, sorry for that.
      I'll eventually upload all of it (hopefully in the coming week), right now some parts of the code is just downright ugly and it needs cleaning up.
      The model-view implementation is very similar to Yasin's, along with the read/write XML methods.

      Delete
    2. Hey Fredrik, I know this post is quite old now but I was wondering if you ever released this code? It looks really interesting and I think I could learn a lot from it. Cheers.

      Delete