Delete a group using an expression

   3890   4   1
User Avatar
Member
177 posts
Joined: Nov. 2015
Offline
OK, so I have a group named piece_318 that I want to delete at a specific frame number.

I put down a delete SOP and enabled the Delete by Expression.

I tried this, but it's not working: @piece_name = “piece_318” && $F > 10;

There is probably something I'm missing.

Any help would be appreciated.

Jim
Reel Inpsirations
Houdini Work in Progress [vimeo.com]
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
Hi
If you put:
piece_318
in the “Group” field of the delete SOP and
$F > 10
in the filter expression field, it will work.

-b
http://www.racecar.no [www.racecar.no]
User Avatar
Member
177 posts
Joined: Nov. 2015
Offline
I wish it did work.
Here is an example of what I'm trying to do.

Attachments:
delete_piece_on_frame.hiplc (101.8 KB)

Reel Inpsirations
Houdini Work in Progress [vimeo.com]
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
Hi
Initially i though you could use @name=piece0 in the Group field, but it doesn't work the way I expected which was to only target “piece0”. It deletes everything after frame 2.

Another solution would be to use a Primitive Wrangle:
if(@name == "piece0" && @Frame > 2){
    removeprim(0, @primnum, 1);
}

-b
http://www.racecar.no [www.racecar.no]
User Avatar
Member
177 posts
Joined: Nov. 2015
Offline
Thanks!

That's actually a more elegant way to do it anyway as I have multiple pieces I want to remove at various frame rates.

Jim
Reel Inpsirations
Houdini Work in Progress [vimeo.com]
  • Quick Links