Jump to content
Sign in to follow this  
breadbox

group range combine

Recommended Posts

how to write the proper syntax for combining a range of groups in a combine group node.

i tried this:

copyGroup1-10

copyGroup[1-10]

neither worked.

here is my test scene.

GroupCombine.hipnc

Share this post


Link to post
Share on other sites

still trying to figure the syntax on this one.

tried a couple more options in this file.

any syntax help on this would be appreciated. tried to look up in the help but was unable to find anything that led me down the right path.

the "[]" seemed like it was useful but its not quite doing what i need it to do.

GroupCombine_V2.hipnc

Share this post


Link to post
Share on other sites

In the Group SOP that just uses wildcards (copyGroup*), you have the "Not Equal" icon selected. If you change that to the "Equal" option does that not do what you want? If I do that then it matches your manually constructed group string.

Share this post


Link to post
Share on other sites

In the Group SOP that just uses wildcards (copyGroup*), you have the "Not Equal" icon selected. If you change that to the "Equal" option does that not do what you want? If I do that then it matches your manually constructed group string.

Bah dumb mistake on my part. I think that does it. But would still be interested in ranges of groups. so the wildcard might not work in that case. say I had 100 groups and wanted to only group 20-50. would the brackets be the way to do that?

Share this post


Link to post
Share on other sites

Yes square brackets with number ranges is the way to go:

copyGroup[20-50]

Share this post


Link to post
Share on other sites

I took your example and bumped it up to 100 groups as you mentioned then did that. :)

In your existing file trying copyGroup[1-3] should work as expected.

Share this post


Link to post
Share on other sites

I took your example and bumped it up to 100 groups as you mentioned then did that. :)

In your existing file trying copyGroup[1-3] should work as expected.

I dunno I'm sure its just me.. coming from such a respected source as yourself.

but here is a screen of whats happening. I hate to bother people with such simple questions. I'm trying I promise.

Groups.png

Share this post


Link to post
Share on other sites

Hate to bump this ancient thread but as mentioned, using "group[10-40]" only gives you group 1, 0 and 4

If you're lucky that is...It seems unreliable so I suppose it's not the right method.

So, How do you use a range of groups?

I have group0 to group100 and I want to blast 0-49.

Or could opdigits be used here...how do you set a range for that?

Cheers.

Share this post


Link to post
Share on other sites

"using "group[10-40]" only gives you group 1, 0 and 4"

I have the same problem! 

 

- Rasmus

Share this post


Link to post
Share on other sites
Guest mantragora

If you can promote group membership into attribute, than maybe you could use string matching to select groups?

 

For example, below will group every group from 20-69 but not 23 or 40:

strmatch("2?, 3?, 4?, 5?, 6?, ^23, ^40", $CLASS)

if you put it into Group by Expression field.

 

EDIT: This seems to work too:

strmatch("[2346]?, ^23, ^40", $CLASS)
Edited by fântastîque Mântragorîè

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×