closing the render view ?

41 views
Skip to first unread message

Aleks Berg-Jones

unread,
Dec 19, 2013, 11:34:43 PM12/19/13
to python_in...@googlegroups.com
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)

   
....


Ricardo Viana

unread,
Dec 20, 2013, 2:53:30 AM12/20/13
to python_in...@googlegroups.com
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
--
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_m...@googlegroups.com.
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
Reply all
Reply to author
Forward
0 new messages