Incorrect...

You can grab the pixmap of the viewer if you do it correctly.

On Tue, Oct 25, 2016 at 12:40 PM, Mads Lund <madshl...@gmail.com> wrote:

> The viewer is a seperate GL thing if i remember correctly so in python it
> just appears all black sadly.
>
> On Tue, Oct 25, 2016 at 6:49 PM, Fredrik Averpil <
> fredrik.aver...@gmail.com> wrote:
>
>> I’m trying to figure out how I can find the viewer’s widget (and if you
>> have more than one viewer, I’ll just settle with the first one).
>>
>> Does anyone have an idea on how it can be fetched?
>>
>> I’ve tried to loop over all widgets in QtGui.qApp.topLevelWidgets(),
>> identified which ones are layouts and then iterated through their contents…
>> but I haven’t found anything resembling a viewer.
>>
>> I need the widget object, as my goal is to be able to grab a screenshot
>> of it using QtGui.QPixmap.grabWidget(widget):
>>
>> screenshot = QtGui.QPixmap.grabWidget(widget)
>> filepath = os.path.expanduser("~/screenshot.png")
>> screenshot.save(filepath, 'png')
>>
>> Any ideas?
>>
>> Regards,
>> Fredrik
>> ​
>>
>> _______________________________________________
>> Nuke-python mailing list
>> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>
>>
>
> _______________________________________________
> Nuke-python mailing list
> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to