Jump to content

delete group of primitives based on bound box volume


Recommended Posts

hey!

I have thousands of primitives and I need to filter them and delete the ones that has a bounding box volume bigger than a certain value, I tried the measure sop but no luck, at the moment what I'm doing is a very tedious procedure of playblasting one for each frame based on their name and review the playblast to spot the bigger ones, but I know there must be something smarter...

Link to comment
Share on other sites

// Delete all prims with area bigger than a threshold
if(primattrib(0, "area", @primnum, 0) >= chf('Threshold')){
            removeprim(0, @primnum, 1);}

This primitive wrangle will delete all primitives which have an area bigger than a certain number. Do you need to use BBOX volume instead of the area or this will work fine?

deletePrimBySize_001.hiplc

Edited by kiryha
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...