Iraklo Posted September 20, 2017 Share Posted September 20, 2017 Hi guys, is it possible to get an attribute value from loop before current in foreach loop? Quote Link to comment Share on other sites More sharing options...
Follyx Posted September 20, 2017 Share Posted September 20, 2017 Did you tried it via the detail from the metadata? Thus if the metadata node is active in the forloop go to the dateilview in you geo spreadsheet. You will fin there different attributes. Maybe you could use onr of them... Sorry, cant give you an exact way for it. Interested in it as well but maybe its a good starting point. Quote Link to comment Share on other sites More sharing options...
Iraklo Posted September 20, 2017 Author Share Posted September 20, 2017 @Follyx thanks for reply. as far as I know metadata gives current iteration and number of iterations and I want position of primitive. Quote Link to comment Share on other sites More sharing options...
Follyx Posted September 20, 2017 Share Posted September 20, 2017 (edited) hm.. why you dont use a sopsolver inside the loop to write the wanted data in an attribute for further use? But maybe the for loop is a closed system where the solvers prevoius frame wont work. In case you want the posdata from the previous frame. Dont know. Dont sit on the PC. Edited September 20, 2017 by Follyx Quote Link to comment Share on other sites More sharing options...
Iraklo Posted September 20, 2017 Author Share Posted September 20, 2017 sop solver works only during animation right? So after every change I have to re simulate again. I don't think that that's the way I want to go. Quote Link to comment Share on other sites More sharing options...
Follyx Posted September 20, 2017 Share Posted September 20, 2017 hmm... a wrangle with the iteration from @currentframe -1 metadata and ask for the pos...? can you up a file for it? Quote Link to comment Share on other sites More sharing options...
Iraklo Posted September 20, 2017 Author Share Posted September 20, 2017 8 hours ago, Follyx said: hmm... a wrangle with the iteration from @currentframe -1 metadata and ask for the pos...? can you up a file for it? The scene is very basic: I have randomly sized, randomly positioned boxes. Some of them are intersecting, some do not. I want to stack them one after another like books on shelf. This is what I have now. Quote Link to comment Share on other sites More sharing options...
Nebucadnezar Posted September 25, 2017 Share Posted September 25, 2017 (edited) Hello Iraklo My guess would be to use a sop solver as Folly suggested. It is really close to a for loop actually if you think about it, and you can more easily store the data you need IMHO. You can simply use a timeshift after the solver if you wish to have the result on frame 1, a for loop would also have to recook if you make changes anyway. Edited September 25, 2017 by Nebucadnezar Quote Link to comment Share on other sites More sharing options...
Follyx Posted September 25, 2017 Share Posted September 25, 2017 That was my intention 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.