jmhannu Posted March 17, 2018 Share Posted March 17, 2018 (edited) Hi all, I have a for loop with feedback inside a for loop with feedback, I'll include a picture of my subnetwork so you can get an idea. The problem is that I need to use the current number of iteration from the outside for loop (the loop which starts with repeat_begin1 and ends with end1) in my attribute wrange. I created the "repeat_begin_attributes", which should fetch metadata and has iterations as an attribute. My idea was that I should be able to read that with the detail() function but can't get it to work. I tried this in the attribute wrange: int iteration = detail("../repeat_begin_attributes/", "iteration", 0); This only returns 0 atm so I'm not sure if it's a problem of syntax or just a bad idea. So do anyone knows why this isn't working or have any other idea how I can access the current iteration? Edited March 17, 2018 by jmhannu SOLVED Quote Link to comment Share on other sites More sharing options...
Atom Posted March 17, 2018 Share Posted March 17, 2018 Try using the full path to the node instead of relative referencing. int iteration = detail("/obj/geo1/Layered_generations/repeat_begin_attributes/", "iteration", 0); Quote Link to comment Share on other sites More sharing options...
jmhannu Posted March 17, 2018 Author Share Posted March 17, 2018 Thanks, tried this and doesn't seem to work, still only returns 0. Any other ideas? Quote Link to comment Share on other sites More sharing options...
StepbyStepVFX Posted March 17, 2018 Share Posted March 17, 2018 (edited) Try int iteration = detail("op:../repeat_begin_attributes","iteration"); You need to put op: before your path, full or relative. Edited March 17, 2018 by StepbyStepVFX 1 2 Quote Link to comment Share on other sites More sharing options...
jmhannu Posted March 17, 2018 Author Share Posted March 17, 2018 (edited) Thanks!! This worked: int iteration = detail("op:/obj/geo1/Layered_generations/repeat_begin_attributes/", "iteration"); Seems like it need to be in full for some reason, the relative still didn't work Edited March 17, 2018 by jmhannu 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.