Postby dlparisi » Sun Aug 28, 2022 2:32 pm
Thanks Grant. The "rpmdata.getindexfromunique rpmdata.passthenumb" worked great and did exactly what I needed. I am using the new "Store and restore Vray Layers" option to restore the layers but what I'm trying to enable is for the new VFB to behave in the same manner as Vray Next where each pass has it's own VFB that doesn't get destroyed when you render a different pass. I'm trying to script that If you switch to a different pass it will pull up the saved last rendered image from that pass that get's stored (and overwritten) on each render completion. I'm doing a vrimg save via a postrender callback and loading up the image via a "before" script in the RPManager rollout (see below). I've disabled "auto load layers" in the vray history settings and I'm still relying on the "Store and Restore Vray layers" to load all of the correct layers for each pass. This is because the vrimg is only stored after the render is complete and if you change the layers after the render is complete and you switch to a new pass all of these changes would be lost. I'm sure my scripting is way messier than it should be but it seems to be working for me although I need to do a bit more testing before I start using for production scenes. One unforeseen benefit of this too is that if I close a scene and open it again the passes all load up as if nothing was ever closed. Of course this also means I'm saving out additional files but they're pretty small and not too impactful overall.
Somewhat off topic - were you able to look into being able to access the saved VFB exposure, WB, etc info from old Vray Next VFB scenes while opening them in Vray 5/6? For example, I have scenes with 20+ passes made in Vray Next, each with different exposure, highlight burn, WB, etc in the VFB. When I open this in vray 6 none of the old VFB settings get transferred into the new layer system, they are essentially lost. It does seem though that the information is still contained in each pass, I just don't know how to access it.
Last question, for the Before/After scripts rollout what does "before" mean and what does "after" mean? Why would I place a script in one versus the other? Is it "before" the pass is restored, before it's rendered via the Selected or Checked buttons, something else. Same for "after", does it run when you switch to to new pass, after a render is complete, etc? I cant find clarification on this in the docs.
Thanks,
David