hampuseh Posted September 17, 2019 Share Posted September 17, 2019 Greetings! I have a system that creates an x amount of layers, I also apply a integer attribute value to each layer. 0-x For example I may have done a 10 layer thing. which will give me 0-9 attribute. My question is; How do I procedurally always delete the last layer with the highest attribute value? Quote Link to comment Share on other sites More sharing options...
j00ey Posted September 17, 2019 Share Posted September 17, 2019 Easiest way is to promote your attribute to detail, set to maximum - set the new name to eg max_layer and don't delete original attribute - then do something like the following in a wrangle: [assuming it's a prim integer attribute called 'layer', set the wrangle to run over prims] if(i@layer == detail(0, "max_layer", 0)) removeprim(0, @primnum, 1); Quote Link to comment Share on other sites More sharing options...
hampuseh Posted September 18, 2019 Author Share Posted September 18, 2019 Thank you, that worked perfectly! 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.