How to refresh images from the script?
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)
Comments
You can use this http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/start#actions to find the Classname "Action Trigger"
Thanks Richard;
For someone needing the same; the name of the action is: "DzRefreshImagesAction".
I will test it shortly.
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