avak Posted April 16, 2019 Share Posted April 16, 2019 Hello, one question, I created a fore each loop network and for each iteration I want it simulate one peiece from input and write the result on hard disk...seems easy but for me not too easy, please give me some guide I already created a meta data node and used its iteration number included the file name output in a rop node (inside the loop) but it seems it always record the first input result. how to do it ? Quote Link to comment Share on other sites More sharing options...
kiryha Posted April 16, 2019 Share Posted April 16, 2019 (edited) Can you post a hip file? I am not sure about ROP node, but if you will create fileCache SOP (file mode = Save to Disc) and set the path to Geometry file to something like this (should work) $JOB/geo/myGeo_`detail("../foreach_begin1_metadata1/","iteration", 0)`.$F.bgeo.sc Edited April 16, 2019 by kiryha 1 Quote Link to comment Share on other sites More sharing options...
Andrea Posted April 16, 2019 Share Posted April 16, 2019 Usually in this cases the wedge ROP is the way to go. Without a foreach loop, you need first to delete all the pieces except for the one that you are iterating on and then save it to disk. The wedge ROP will help you to do this for each piece 1 Quote Link to comment Share on other sites More sharing options...
avak Posted April 18, 2019 Author Share Posted April 18, 2019 @Kiryha, Thanks I will try that way, @Andrea, I am using that network inside a digital asset, can I use wedge method inside an HDA ? Quote Link to comment Share on other sites More sharing options...
Andrea Posted April 18, 2019 Share Posted April 18, 2019 I have never tried so don't quote me on this but you should be able to do it. You can put down a "render node network" inside of your HDA and then create the wedge node inside of this one. This way you will carry the wedge setup with your digital asset 1 Quote Link to comment Share on other sites More sharing options...
anim Posted April 18, 2019 Share Posted April 18, 2019 also TOPs can provide easy wedging within an asset if you can use 17.5 1 Quote Link to comment Share on other sites More sharing options...
Neon Junkyard Posted April 18, 2019 Share Posted April 18, 2019 in a python sop you can use the pressButton() argument pointing to your file cache "save to disk" parameter (might have to use evalparm as well) that will in essence physically press the save to disk button on every cook. combine that with the detail attribute filepath variables and that should be all you need also you can set a global variable holding your detail expression (under edit menu > aliases and variables > variables), say $CACHE = `detail(blahblah)`, then use $CACHE in your filepath instead of that expression, allowing you to read everything back in as packed prims in a single node using the filemerge sop utilizing that variable (similar to how you can load back in multiple wedge passes) 1 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.