Re: [Maya-Python] Python screenshot

2016-10-24 Thread Arjun Thekkummadathil
I did figure out a way using PyQt, where I launch the UI in full screen and
100% transparent and use QRubberband for selection region
https://github.com/cgarjun/utilities/blob/master/screenshot.py

On Mon, Oct 24, 2016 at 6:18 PM, Fredrik Averpil 
wrote:

> I knew I needed to take a look at taking screenshots when this was
> originally posted and had saved Marcus’ excellent snippet for now. I just
> noticed Pixmap.grabWindow has been replaced by QScreen.grabWindow in Qt5
> (PySide2/PyQt5).
>
> So since Pixmap.grabWindow has been marked as “obsolete” you may want to
> take not of that: http://doc.qt.io/qt-5/qpixmap-obsolete.html
>
> // Fredrik
> ​
>
> --
> 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_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/python_inside_maya/CAD%3DwhWMyU9bpNYo8m4H5kJsoFPW_
> FPppJsEgWuMqsns%2BgwBSvQ%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAJrOGy9p2yC3Gc4qy-WxPdknBPsujYsNSk5HSh39W2sx9hoDUw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] Python screenshot

2016-10-24 Thread Fredrik Averpil
I knew I needed to take a look at taking screenshots when this was
originally posted and had saved Marcus’ excellent snippet for now. I just
noticed Pixmap.grabWindow has been replaced by QScreen.grabWindow in Qt5
(PySide2/PyQt5).

So since Pixmap.grabWindow has been marked as “obsolete” you may want to
take not of that: http://doc.qt.io/qt-5/qpixmap-obsolete.html

// Fredrik
​

-- 
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_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAD%3DwhWMyU9bpNYo8m4H5kJsoFPW_FPppJsEgWuMqsns%2BgwBSvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] Python screenshot

2016-10-06 Thread Marcus Ottosson
There’s always trusty old Qt.

# From within Mayaimport osfrom PySide.QtGui import QPixmap, QApplication

app = QApplication.instance()
screenshot = QPixmap.grabWindow(app.desktop().winId())
screenshot.save(os.path.expanduser("~/screenshot.jpg"), "jpg")

It can do regions too.
​

On 6 October 2016 at 10:00, Arjun Thekkummadathil <3dar...@gmail.com> wrote:

> Hi
>Anyone knows any existing library or quick method to do a screenshot
> using python. I should be able to select a region to be screen grabbed. Am
> looking for an option on windows.
>
> thanks
>
> Arjun
>
> --
> 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_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/python_inside_maya/CAJrOGy9tEcVdFsyQsn8OvRAiC6bXs
> 854nDjFCdS_C2qGb-140A%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Marcus Ottosson*
konstrukt...@gmail.com

-- 
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_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAEpePwGgqpnyhzuTYk8pQup-E%3DdF4JZrEMP0K0tPHJ3w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.