How to refresh images from the script?

Dolce SaitoDolce Saito Posts: 148

Hello;

I have a script which updates cutout/displacement images for the next frame. This is intended for image series render post script.

The scene has lots of items that can use those images. The image name is always the same like: "current figure A torso displacement.png"

When my script updates this image as post process script, on the next frame, I notice the render is not showing the changes as expected even though the image is updated successfully by the script.

I want to fix this behavior by invoking the same functionality which is available at right clicking Surfaces -> Refresh Images (Ctrl + I). How can I invoke this command from the end of my post-process script? (So, I hope studio will refresh caches with the new state of the images)

Post edited by Dolce Saito on

Comments

  • Dolce SaitoDolce Saito Posts: 148

    Thanks Richard;

    For someone needing the same; the name of the action is: "DzRefreshImagesAction".

    I will test it shortly.

  • Dolce SaitoDolce Saito Posts: 148
    edited May 2023

    It worked, however, only when I execute by hand (clicking "execute" in script ide). The post process script is literally being ignored during image series render even though I select it in the render settings. Is there a way to debug this behavior? I also don't see anything regarding post process script being called within log file neither.

     

    Edit: Wow, I found another bug relating this. Going to report a ticket now: "Post process script doesn't get triggered during image series render, unless user presses cancel during rendering". It triggered after I press cancel, and it worked for the cancelled frame :S

    Post edited by Dolce Saito on
Sign In or Register to comment.