jonidunno Posted October 3, 2019 Share Posted October 3, 2019 I'm running into an issue where I'm trying to assigning Prim attributes inside a "for-each count" with a wrangle. I'm aware they made changes to how for-each loops work since 16.5. but is there a way to promote the attributes some how? I saw that some one made some example in the past... but it doesn't work for what I need. using a name mask before the loop won't work with my set up. Is there a way to assign id's a in a wrangle inside the for-loop? Thanks, Quote Link to comment Share on other sites More sharing options...
woodenduck Posted October 3, 2019 Share Posted October 3, 2019 You can assign any attribute, id's or anything you like inside a foreach with any of the usual tools. Wrangle, attribute sop, vop sop etc... What exactly are you trying to do? Do you have an example of it not working? Cheers, WD Quote Link to comment Share on other sites More sharing options...
jonidunno Posted October 4, 2019 Author Share Posted October 4, 2019 1 hour ago, woodenduck said: You can assign any attribute, id's or anything you like inside a foreach with any of the usual tools. Wrangle, attribute sop, vop sop etc... What exactly are you trying to do? Do you have an example of it not working? Cheers, WD Your right it looks like i have an error "metadata cooked outside its block, so it's not generating the expected attributes." But in a nutshell, I'm creating attributes on incoming and out coming points, promoting to prim attributes then assigning "direction" attributes to separate pieces to each prim. Now I have to figure why it's cooking outside the block. Quote Link to comment Share on other sites More sharing options...
woodenduck Posted October 4, 2019 Share Posted October 4, 2019 If you post a hip file, I'm sure someone will help you out. Quote Link to comment Share on other sites More sharing options...
jonidunno Posted October 4, 2019 Author Share Posted October 4, 2019 (edited) 8 minutes ago, woodenduck said: If you post a hip file, I'm sure someone will help you out. Tried to simplify as much as possible... just follow the yellow subnets. Thanks, ForEach_Help_JL_001.hip Edited October 4, 2019 by jonidunno Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted October 4, 2019 Share Posted October 4, 2019 11 hours ago, jonidunno said: Tried to simplify as much as possible... just follow the yellow subnets. Thanks, ForEach_Help_JL_001.hip I noticed you are using expression nprims(opinputpath(".", 0)) in many places on "block end" nodes inside parameter "Iterations" and in this manner you refer to node itself. I think it should be nprims(opinputpath("..", 0)), then you refer to parent node. Tray to check this and maybe it helps you resolve your problem. 1 Quote Link to comment Share on other sites More sharing options...
jonidunno Posted October 4, 2019 Author Share Posted October 4, 2019 4 hours ago, vicvvsh said: I noticed you are using expression nprims(opinputpath(".", 0)) in many places on "block end" nodes inside parameter "Iterations" and in this manner you refer to node itself. I think it should be nprims(opinputpath("..", 0)), then you refer to parent node. Tray to check this and maybe it helps you resolve your problem. lol.. derp, that's exactly what was happening thanks for the extra eyes! 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.