Why dont you use postrender script? In render global settings there is
section at the bottom where you give it a command a prerender or post
render.
Best
Ricardo
On Friday, December 20, 2013, Aleks Berg-Jones wrote:
> I have a method where I need to save a small image and then convert it to
> a texture within the same loop. I found that the easiest way to do this is
> to save it directly from the maya render view. This should save the most
> recent image that I just rendered but only works for the first try. On the
> second try it will save the first image again unless I close the render
> view window(how to do this in script?) or render the image twice which is
> possible for this limited application but makes the intended sequence more
> difficult.
>
> refresh(f=1) has no affect and moving something to make the dg dirty ?
> then doing refresh(f=1) has no effect
>
>
> sel = cmds.ls(sl=1)
>
> for i in sel:
> getInput = raw_input();
>
> myMap = z_TEX_dir + getInput + '.png '
> self.render_choice()
> cmds.renderWindowEditor('renderView', e=1, writeImage = myMap)
>
> ....
>
>
> --
> 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 [email protected]<javascript:_e({},
> 'cvml',
> 'python_inside_maya%[email protected]');>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/f9b625c3-7697-45b9-b786-9b2b36281455%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
Sent from Mobile
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CAK%2Bp0%3Da0wZULoM%2B5RAGP4Pk2_-bh89_%3DAwWd8kO9e5h7Que4KA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.