Get the Widget containing the renderd Image from Mayas Render View

28 views
Skip to first unread message

Simon Weck

unread,
Jun 26, 2022, 4:07:14 PM6/26/22
to Python Programming for Autodesk Maya
Hello everyone, 

I am trying to make an experimental tool that modifies the existing Maya Render View and swaps out the current rendered Image. I want to get the widget that contains the rendered image and change it. 

I got the Render View Dialog through MQtUtil with this code: 
Unbenannt.JPG

I looked through all children of the Render View and tracked the widget that seems to contain the rendered image down to a QWidget. The problem ist that this widget has no children and there is no QImage or a similar widget that actualy displays the rendering. 

I also removed all of the widgets in the dialog that wont remove the rendered image to make sure I dont miss anything. Unbenannt2.JPG

These are the widgets that are left in the dialog:
Unbenannt3.JPG

I also have a tool that prints the hirarchy of the widgets when hovering over it. When I hover over the renderd image I get this hirarchy. The widget at the top that has no Object name set is the widget that seems to contain the rendered image
Unbenannt4.JPG

Am I missing something or how can I get the widget that displays the rendered image?

Thanks in advance

TTw TTa

unread,
Jun 27, 2022, 2:14:59 AM6/27/22
to Python Programming for Autodesk Maya
```
C:\Program Files\Autodesk\Maya2020\scripts\others\renderWindowPanel.mel
```

you could find some UI code in there

Simon Weck

unread,
Jun 27, 2022, 12:58:38 PM6/27/22
to Python Programming for Autodesk Maya

Thanks for that idea.

I already looked through that file but its really huge and I dont really understand mel that well. 
So I didnt find the ui code that generates the image in there.

I noticed that most of the widgets in the  Render View are just of type QWidget, maybe these arent just QWidgets but Maya native UI controls?
I am not sure about this but Maya native UI controls are also created with PySide right? That means that the Render View should definitely contain more different widgets than QLayouts and QWidgets....

I dont really have any other idea here and the tool I try to make kinda lives and dies with the acces to the widget that contains the renderd Image
Reply all
Reply to author
Forward
0 new messages