anicg Posted May 28, 2020 Share Posted May 28, 2020 (edited) What options do I have to automatically save individual results of a for each loop?. Edited May 28, 2020 by anicg Quote Link to comment Share on other sites More sharing options...
anim Posted May 29, 2020 Share Posted May 29, 2020 (edited) File SOP for example as that can automatically write when cooked or if you have enough ram for the geo you are processing you can gather the results and split them out as individual frames or wedges Edited May 29, 2020 by anim Quote Link to comment Share on other sites More sharing options...
anicg Posted May 29, 2020 Author Share Posted May 29, 2020 (edited) Do you mean a file cache? just by setting the file mode to write files? how do I add the iteration number in the file name? Edited May 29, 2020 by anicg Quote Link to comment Share on other sites More sharing options...
anim Posted May 29, 2020 Share Posted May 29, 2020 I meant File SOP, but sure File Cache SOP has file SOP inside so as long as the mode is promoted should work as well you add iteration number the same way as you vary any parameter based on iteration, for example creating spare input referencing Block Begin in Fetch Metadata mode and adding something like this in the filename: $HIP/geo/$HIPNAME.$OS.`detail(-1, "iteration", 0)`.$F.bgeo.sc Quote Link to comment Share on other sites More sharing options...
anicg Posted May 29, 2020 Author Share Posted May 29, 2020 I did exactly that and I have an error Quote Link to comment Share on other sites More sharing options...
anicg Posted May 29, 2020 Author Share Posted May 29, 2020 (edited) forget it, it's working, I forgot to add the ` at the end. thank you. Edited May 29, 2020 by anicg Quote Link to comment Share on other sites More sharing options...
anim Posted May 29, 2020 Share Posted May 29, 2020 but also judging from your screenshot you may be able to do it easier by just Blast SOP, keeping a single piece per frame, do your processing and save the sequence using $F, so that each frame will be different piece processed Quote Link to comment Share on other sites More sharing options...
anicg Posted May 29, 2020 Author Share Posted May 29, 2020 (edited) I was hoping to leave the frames for the animation, the initial example for the question is an animation with 240 frames and I want to save each animation coming out of each item in the loop. But now I realise that the File SOP doesn't have the option to save frame ranges. Edited May 29, 2020 by anicg Quote Link to comment Share on other sites More sharing options...
anim Posted May 29, 2020 Share Posted May 29, 2020 (edited) 10 minutes ago, anicg said: I was hoping to leave the frames for the animation, the initial example for the question is an animation with 240 frames and I want to save each animation coming out of each item in the loop. But now I realise that the File SOP doesn't have the option to save frame ranges. oh, if it's animated then yes, you can keep the For Each Setup, it will save any frame that cooks, so make sure you have $F somewhere in the path name but this is all because you asked directly about foreach loop way to do it, which is more workaround than production solution what you should really look at is TOPs and wedging, that's the way to go Edited May 29, 2020 by anim Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.