1. #1
    New Member Follow User Gallery
    Join Date
    Oct 2012
    Posts
    13

    Default Question: Saving out render passes gives error

    I'm attempting to create a script that will cycle through a number of render passes and save the render between each pass.

    I started by recording a script;

    //RECORDED ZSCRIPT 4.73
    [IButton,Play,"Press to play this ZScript. ZScript can be aborted at anytime by pressing the ëescí key.",
    [IConfig,4.73]
    [IPress,Render:Render Properties:Shadows]
    [IPress,Render:Render Properties:AOcclusion]
    [FileNameSetNext,"C:\Lights\Default_Lights.ZLI"][IPress,Light:Load]
    [IPress,Material:BasicMaterial]
    [IPress,Render:BPR RenderPass:Render Best Preview]
    [FileNameSetNext,"C:\Renders\BPR_Depth.psd"][IPress,Render:BPR RenderPassep]
    [FileNameSetNext,"C:\Renders\BPR_Shadow.psd"][IPress,Render:BPR RenderPass:Shdw]
    [FileNameSetNext,"C:\Renders\BPR_AO.psd"][IPress,Render:BPR RenderPass:AmOc]
    [FileNameSetNext,"C:\Renders\BPR_Mask.psd"][IPress,Render:BPR RenderPass:Mask]
    ]/*End of ZScript*/


    When I attempt to run the script I get an error

    ZScript Note: Interface item could not be found.
    ERROR: Render:BPRRenderPassep
    IN: [IPress,Render:BPRRenderPassep]

    This is what the program recorded, so I'm at a loss as to what the issue is...

  2. #2
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    Yes, as the names of the buttons change when they have images you have to edit the code so that the interface numerical IDs are used instead:

    //RECORDED ZSCRIPT 4.73
    [IButton,Play,"Press to play this ZScript. ZScript can be aborted at anytime by pressing the ëescí key.",
    [IConfig,4.73]
    [IPress,Render:Render Properties:Shadows]
    [IPress,Render:Render Properties:AOcclusion]
    [FileNameSetNext,"C:\Lights\Default_Lights.ZLI"][IPress,Light:Load]
    [IPress,Material:BasicMaterial]
    [IPress,Render:BPR RenderPass:Render Best Preview]
    [FileNameSetNext,"C:\Renders\BPR_Depth.psd"][IPress,2220]
    [FileNameSetNext,"C:\Renders\BPR_Shadow.psd"][IPress,2221]
    [FileNameSetNext,"C:\Renders\BPR_AO.psd"][IPress,2222]
    [FileNameSetNext,"C:\Renders\BPR_Mask.psd"][IPress,2223]
    ]/*End of ZScript*

  3. #3
    New Member Follow User Gallery
    Join Date
    Oct 2012
    Posts
    13

    Default

    How do I determine the numerical ID of a particular button, and why doesn't the script recorder record so that it can play back? Seems like a pretty major oversight.

    Thank you for the quick reply.

  4. #4
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    You can find out the interface item ID by putting the cursor over the item and looking at the Preferences>Utilities>View Window Id slider. If you need them, the IDs for the other passes are:

    Image - 2219
    SSS - 2302
    Floor - 2303

    For many operations ZScript recording will record & play back without problems. But it is something of a legacy feature these days. Some things, such as ZModeler, are completely beyond it. Others, such as the render passes, can be got to work with some editing.

  5. #5
    New Member Follow User Gallery
    Join Date
    Oct 2012
    Posts
    13

    Default

    Once I docked that menu, I found the slider you were referring to. Thank you for all this. Now I can move onto the next phase of the script.


    Chris

  6. #6
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    Great! Let us know if you run into any more problems.

  7. #7
    New Member Follow User Gallery
    Join Date
    Oct 2012
    Posts
    13

    Default

    I probably will, as I delve into getting user input, like for selecting the save directory. !)

  8. #8
    New Member Follow User Gallery
    Join Date
    Oct 2012
    Posts
    13

    Default

    Well, I plugged in the ID numbers, but the error persists...

    Nevermind. Bad syntax...

    I can't seem to find anything on opening up the folder navigation dialogue. Basically, I want to prompt the user for a folder location to save all the renders.

  9. #9
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    You have to use [FileNameAsk]. The user would have to give an initial file name which you can then use to get the folder path using [FileNameExtract].

Posting Permissions

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