{"action":"created","issue":{"url":"https://api.github.com/repos/mottosso/maya-capture/issues/11","labels_url":"https://api.github.com/repos/mottosso/maya-capture/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/mottosso/maya-capture/issues/11/comments","events_url":"https://api.github.com/repos/mottosso/maya-capture/issues/11/events","html_url":"https://github.com/mottosso/maya-capture/pull/11","id":94492846,"number":11,"title":"Implement `snap()` for single frame capture","user":{"login":"BigRoy","id":2439881,"avatar_url":"https://avatars.githubusercontent.com/u/2439881?v=3","gravatar_id":"","url":"https://api.github.com/users/BigRoy","html_url":"https://github.com/BigRoy","followers_url":"https://api.github.com/users/BigRoy/followers","following_url":"https://api.github.com/users/BigRoy/following{/other_user}","gists_url":"https://api.github.com/users/BigRoy/gists{/gist_id}","starred_url":"https://api.github.com/users/BigRoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BigRoy/subscriptions","organizations_url":"https://api.github.com/users/BigRoy/orgs","repos_url":"https://api.github.com/users/BigRoy/repos","events_url":"https://api.github.com/users/BigRoy/events{/privacy}","received_events_url":"https://api.github.com/users/BigRoy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-11T17:23:50Z","updated_at":"2015-07-11T22:21:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mottosso/maya-capture/pulls/11","html_url":"https://github.com/mottosso/maya-capture/pull/11","diff_url":"https://github.com/mottosso/maya-capture/pull/11.diff","patch_url":"https://github.com/mottosso/maya-capture/pull/11.patch"},"body":"Implementation of `snap()` method for single frame capture. It defaults to format `image` and compression `png`. To keep functionality in sync with `capture()` it uses a direct call to capture.\r\n\r\n#### Example\r\n\r\n```python\r\nimport capture\r\n\r\n# simple and quick\r\ncapture.snap()\r\n\r\n# with viewport options saving an image of a specified frame with padding\r\nview_opts = capture.ViewportOptions()\r\nview_opts.nurbsCurves = True\r\nview_opts.nurbsSurfaces = True\r\ncapture.snap(filename='D:/test_with_padding.png', \r\n             overwrite=True, \r\n             viewport_options=view_opts, \r\n             frame=5)\r\n\r\n# with viewport options saving an image of a specified frame without padding (exact filename)\r\nview_opts = capture.ViewportOptions()\r\nview_opts.nurbsCurves = True\r\nview_opts.nurbsSurfaces = True\r\ncapture.snap(complete_filename='D:/test_no_padding.png', \r\n             overwrite=True, \r\n             viewport_options=view_opts, \r\n             frame=5)\r\n``"},"comment":{"url":"https://api.github.com/repos/mottosso/maya-capture/issues/comments/120665850","html_url":"https://github.com/mottosso/maya-capture/pull/11#issuecomment-120665850","issue_url":"https://api.github.com/repos/mottosso/maya-capture/issues/11","id":120665850,"user":{"login":"BigRoy","id":2439881,"avatar_url":"https://avatars.githubusercontent.com/u/2439881?v=3","gravatar_id":"","url":"https://api.github.com/users/BigRoy","html_url":"https://github.com/BigRoy","followers_url":"https://api.github.com/users/BigRoy/followers","following_url":"https://api.github.com/users/BigRoy/following{/other_user}","gists_url":"https://api.github.com/users/BigRoy/gists{/gist_id}","starred_url":"https://api.github.com/users/BigRoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BigRoy/subscriptions","organizations_url":"https://api.github.com/users/BigRoy/orgs","repos_url":"https://api.github.com/users/BigRoy/repos","events_url":"https://api.github.com/users/BigRoy/events{/privacy}","received_events_url":"https://api.github.com/users/BigRoy/received_events","type":"User","site_admin":false},"created_at":"2015-07-11T22:21:43Z","updated_at":"2015-07-11T22:21:43Z","body":"Maybe set `viewer` to False by default for `snap()` but don't disable it. Doesn't the `maya.cmds.playblast` have an argument to override the default viewer being used?\r\n\r\nAlso I was thinking about the returned string from `snap`. When it contains padding in the name it returns the file name with #### in it. It would be better if it returned the exact name of the created frame since it'll always be one. What do you think?"}}