Hi, I am wondering if when I'm creating a group of selected points ths group is “remembering” only the numbers of selected points.
When I've got particle simulation and particles are dying, then particle numbers are changing and the IDs are the same. So when I select group I want to delete it simply doesn't work.
Is there any simple method to group BY IDs NOT BY NUMBERS?
(i found video about hscripts in which lector was selecting points, locking selection, blasting another points and with help of foreach node was making looong expression - which ids should be deleted … then he used this expression to delete by expression points. is it the only method?)
Thank you
grouping based on point's IDs
12048 11 2- danilo2
- Member
- 277 posts
- Joined: July 2006
- Offline
- anon_user_40689665
- Member
- 648 posts
- Joined: July 2005
- Offline
- danilo2
- Member
- 277 posts
- Joined: July 2006
- Offline
Thank you , but I've got additional question too:
(I've got LOCKED node with selected particles, I want to delete, -> delete everything appart from points -> attrib_create .. and which expression?)
cpbWhat expression should it be? (best in python)
use a point() expression in an attribute_create sop to get at the ID.
(I've got LOCKED node with selected particles, I want to delete, -> delete everything appart from points -> attrib_create .. and which expression?)
cpbI think so too.
sops should use persistent IDs by default, but they don't.
- edward
- Member
- 7734 posts
- Joined: July 2005
- Online
- danilo2
- Member
- 277 posts
- Joined: July 2006
- Offline
- old_school
- Staff
- 2540 posts
- Joined: July 2005
- Offline
- old_school
- Staff
- 2540 posts
- Joined: July 2005
- Offline
- danilo2
- Member
- 277 posts
- Joined: July 2006
- Offline
jeff
you can do this directly in the Group parameter field using this syntax:
@id=1
Yes I know it. The problem appears when I want to delete 10 000 000 particles, which id's are not “one after another” - they're misched (f.e. 1,50, 900 , 901, 905, 1140, … etc)
Writing it “by hand” is impossible.
What to do in this situation - I can simply select them in viewport and then … ?
- old_school
- Staff
- 2540 posts
- Joined: July 2005
- Offline
I wrote an hscript .cmd script that will replace point numbers with id's if they are present.
Obviously this script has to be run on the same frame you made your point selection or else it won't work as points can come and go while id's are persistent.
You can put this script in your $HOME/houdini10/scripts directory and then in a textport type:
source pointlist_to_id.cmd /obj/my_object/my_blast_sop
which will turn your point list in to a list of @id= string.
You can incorporate this in to a callback button on an HDA, add to the RMB menu for one or more SOPs, put it on the shelf to work on a point selection specifically, etc. The guts are there for you.
I use hscript because it is a bit faster and I know that pointpattern() works to exapnd the string and don't know if there is a HOM equivalent as of yet.
I can see this being useful if you wanted to knock out a few thousand particles but 10 million? I think you should be using a point group for that or try a different approach.
Obviously this script has to be run on the same frame you made your point selection or else it won't work as points can come and go while id's are persistent.
You can put this script in your $HOME/houdini10/scripts directory and then in a textport type:
source pointlist_to_id.cmd /obj/my_object/my_blast_sop
which will turn your point list in to a list of @id= string.
You can incorporate this in to a callback button on an HDA, add to the RMB menu for one or more SOPs, put it on the shelf to work on a point selection specifically, etc. The guts are there for you.
I use hscript because it is a bit faster and I know that pointpattern() works to exapnd the string and don't know if there is a HOM equivalent as of yet.
I can see this being useful if you wanted to knock out a few thousand particles but 10 million? I think you should be using a point group for that or try a different approach.
There's at least one school like the old school!
- danilo2
- Member
- 277 posts
- Joined: July 2006
- Offline
- old_school
- Staff
- 2540 posts
- Joined: July 2005
- Offline
- danilo2
- Member
- 277 posts
- Joined: July 2006
- Offline
-
- Quick Links