Results 1 to 2 of 2

Thread: Looking for simple commands for python scripting an IRay IPR render in Maya

  1. #1
    Join Date
    Dec 2017
    Posts
    1

    Default Looking for simple commands for python scripting an IRay IPR render in Maya

    I'm searching for python commands for Iray for Maya to do a few things. I have found code necessary to switch the renderer to IRay Photoreal(2017). Beyond this point, I'd like to:

    A) Set a specified duration for an IPR Render using IRay Photoreal.
    B) Set name and destination of the rendered image
    C) Start the IPR render.
    D) If possible call a post render script

    Can I do this with Python through Maya commands (or with the Iray Python API which I don't think exists), and if so how might I go about it? I can't seem to find anything online about this so I'm wondering if it's even possible. Any help/sample code/links would be greatly appreciated! Thanks, Ben

  2. #2
    Join Date
    Oct 2015
    Posts
    21

    Default

    Hi Ben!

    Don't know exactly want you try to achieve. However, I will write down my thoughts and hints.

    A) Set a specified duration for an IPR Render using IRay Photoreal.
    Either you can set the max render time in the Iray settings and do a usual render instead of IPR or ...
    it should be possible to use a timer in pyhton to stop the rendering. To start IPR (camera persp) use the MEL command
    Code:
    renderWindowRenderCamera iprRender renderView persp
    and to stop
    Code:
    stopIprRendering renderView
    B) Set name and destination of the rendered image
    Set the file options of the Common tab of the Render Settings. I can't tell you how to do it exactly, you have to figure out the Maya mechanism behind it ("Echo All Commands" of Script Editor). The image(s) are only written when you stop IPR rendering.
    If you want to keep IPR running for doing scene changes and rendering a further image, you have to use the save mechansim of the Render View. Again you have to figure out the corresponding MEL commands.

    C) Start the IPR render.
    see A)

    D) If possible call a post render script
    If you start and stop IPR yourself, you could add further commands after stopping IPR.

    Hope this helps a bit.
    -Thomas

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •