PySide maya workflow

61 views
Skip to first unread message

Arjun Thekkummadathil

unread,
Jul 7, 2014, 11:50:39 PM7/7/14
to python_in...@googlegroups.com
Hi
   Am just trying to get around some good workflow for pyside and maya, it would be nice to to have some suggestions

I have designed a ui in the designer and i know how to load that ui in maya also, how to i change the of access the ui inside those UI files if i have to make some dynamic updates

-Arjun

Justin Israel

unread,
Jul 7, 2014, 11:57:03 PM7/7/14
to python_in...@googlegroups.com
Hi Arjun,

Could you maybe add some more focused and specific details to your question? It is very broad and vague. Currently it sounds like you need help accessing components that have been defined in your UI file? How far have you gotten and where are you stuck?

Also I am not clear on what you mean specifically by "dynamic updates". An example of what you are doing, where you are stuck, and what you are expecting would be extremely helpful for any of us to start offering focused support.

-- justin




--
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/CAJrOGy86GBL_GWPw1yVfrfVYxfDL4%2B5_msYPhLzXOf8FfZNSKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Arjun Thekkummadathil

unread,
Jul 8, 2014, 12:01:23 AM7/8/14
to python_in...@googlegroups.com
sure i have been actually converting the .ui to python files and inheriting that base class, am trying to switch the workflow to use the UI files directly so that i manage lesser files.

Am not sure this the best way. but it would be nice if someone can suggest me a better option if am going wrong.

Now with this workflow am trying to do am stuck trying to access the components from ui file

-Arjun


Arjun Thekkummadathil

unread,
Jul 8, 2014, 12:02:15 AM7/8/14
to python_in...@googlegroups.com
dynamic loading i mean for eg depending on the scene file say 3 / 5 camera in the scene... it should load into a listwidget

Justin Israel

unread,
Jul 8, 2014, 4:31:26 AM7/8/14
to python_in...@googlegroups.com
Have you looked at the documentation for using UI files using PyQt? It is pretty much the same thing aside from the difference in how you actually use the uic module. But once you have the designer file loaded and have a class type, the rest is the same:

This gives you the different variations of how you can use the designer file, either by subclassing it, or by composing it and accessing it through a ui namespace. You should then have access to all the components you had defined in your designer. 
Come to think of it, if you were previously manually converting the ui files to python files, then everything should be exactly the same. You had said you already are able to load the ui file at runtime but you are stuck on accessing the components. Nothing should actually be different at this step, if I understand you correctly.

So, regardless of whether you are manually converting a ui to py, or if you are loading it dynamically at runtime, once you have it as a loaded class type, you should be able to access your listwidget. Populating a listwidget is no different regardless of whether it came from a ui designer file or one that you created purely in code. You just access the listwidget and call its methods to add item.

At this stage, I think you are going to need to provide a minimal example of where you are really stuck. Because right now what we are doing it going over a large amount of information: converting ui files, loading ui files, subclassing/composing the loaded ui class, adding items to a list widget.

If you can manage to really ask specific questions, with examples, I can guarantee you will get more specific and useful answers. But I don't think I want to continue stabbing in the dark with answers that may or may not cover what you are really trying to do. 




Fredrik Averpil

unread,
Jul 8, 2014, 10:29:22 AM7/8/14
to python_in...@googlegroups.com
You could have a look at my old boilerplate:
Reply all
Reply to author
Forward
0 new messages