For Each Loop with Attribute Promote and Detail Issues

   3858   3   1
User Avatar
Member
177 posts
Joined: Nov. 2015
Offline
Hi,

I am going crazy trying to figure out why this isn't working as I think it should.

What I'm doing is splitting a box in half using a boolean, then ‘marking’ some of the primitives on one of the pieces using a group SOP. Then, I create an attribute and assign it a 1 for all the prims that are in the group.

This works fine.

Next, I loop through each piece (2 in this case) and have an attributepromote SOP in the loop where I promote the maximum value of my attribute to the detail.

This appears to work fine, but then I attempt to create a new attribute and set it to the value from the detail attribute and it's not working.

Any ideas?

Attachments:
front_issue.hipnc (98.3 KB)

Reel Inpsirations
Houdini Work in Progress [vimeo.com]
User Avatar
Member
118 posts
Joined: Feb. 2016
Offline
Hello, it seems that you're trying to get the attribute from the metatada node, which doesn't hold such attribute.

Can't you just use another attribute promote, this time from detail to primitives?
Edited by Andr1 - Sept. 13, 2017 05:00:41
User Avatar
Member
177 posts
Joined: Nov. 2015
Offline
OK, that worked, thanks.
But what I'm trying to figure out is why wouldn't my wrangle code work if I simply changed the input to 0 instead of 1.

i@myFront = detail(0,“frontPiece”,0);

Isn't that how you access the detail information?

Thanks,

Jim
Reel Inpsirations
Houdini Work in Progress [vimeo.com]
User Avatar
Member
118 posts
Joined: Feb. 2016
Offline
Mhhmm, the code works fine if you change the input to 0: the “tempFront” attribute is being set to 1 for every prim.
Maybe you're looking at points in geometry spreadsheet?
  • Quick Links