Nemiko Posted November 7, 2020 Share Posted November 7, 2020 Guys, please help, I can’t understand how to write the conditions for creating groups, so that after deleting a primitive, a group is created for primitives that have been deleted and those that have not been deleted Quote Link to comment Share on other sites More sharing options...
RogerW Posted November 11, 2020 Share Posted November 11, 2020 Hi Nemiko, Just from your example, In the first line of your code you are comparing a string to and int which wont work, You also cant add a primitive to a group if it doesnt exist, So to simplify things I would first add the prims that you want to delete to a group then delete them outside of thte wrangle. In your second if statement you are also using @ptnum where the function is expecting a primitive number (@primnum). There also seems to be a mixture of incorrect attribute types. Not knowing the full context, I would say that your wrangle should look more like ths : if ( @name == "-1") { setprimgroup(0,"myprimgroup",@primnum,1,"set"); } this will add any prim to the the group "myprimgroup" that has an attibute value of "-1" for the name attribute. Then you can just delete it after the wrangle. Hope this helps R 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.