Jump to content

Recommended Posts

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,

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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.

 

 

Share this post


Link to post
Share on other sites
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 by jonidunno

Share this post


Link to post
Share on other sites
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.

  • Like 1

Share this post


Link to post
Share on other sites
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!  

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×