Jump to content

get @group from selection, not point number


MENOZ

Recommended Posts

hello, I'm pretty sure someone already asked this question but I cannot find the answer.

let's try with a practical example.

Is there a way to select some points in the viewport, and delete them, but not by their point number, but by some attriibute group.

like @index=10-35 

I can  alreafy filter in the viewport the groups of attributes i want, with that search box in top right, but once i press delete I only get a list of point numbers in the blast node group field. I'd like to get the filtered groups i am selecting from the viewport to be directly put in the group field of my blast node.

I know i can maybe convert it later, but it's not always a handy solution, sometimes i want to delete some points by id which are in a special branch of my sop network, because it makes it easier to filter and see only what i want for example, and delete the same points on antoher branch of the network. I just need to get the same id, It seems the functionality is there but I can't find a way to use it.<_<

Link to comment
Share on other sites

I don't think you can do exactly this (if I understand correctly what you want to do). you can blast the whole group, obviously, but there is no way to blast only some points in the group, without referring to @ptnum. what you can do is select points in the viewport, make a group out of them and then blast that group.

Edited by davpe
Link to comment
Share on other sites

I don't want to blast some points in the group. I want to blast the entire group, but i want the string filter to blast it, not the point list.

when i write @myattribute=15 in the blast node group field, it deletes all the points that have "myattribute" = to 15. which is what i want. 

If i open the "group and attribute list", the box in the viewport, I can type the same thing or just the name of the attribute, @myattribute, and it will divide every different value for my attribute in a separate "virtual" group. I can then do my selection based on this filtering, and in the right click menu I see "copy group name", which is the value of my attribute,  but i can only copy one by one, not the whole current selction. That list is what i need.

There's another entry in the right click menu, "copy selection as string", which returns me the list of point numbers from the current group selection.

I would like something that returns me the filtered attribute (@myattribute), and the list of the selected groups. something like @myattribute=10,15,80

 group.png

 

 

Another example could be, when I import an alembic geometry and I want to clean and separate some parts by the path attribute( by its original hierarchy) to keep it procedural, I usually do @path=*Leg in a blast node. But I don't always know what is the path of all the parts, and i don't really care. I could just select them in viewport, blast and keep working. But i want to put in the blast the @path=.... or i will loose the procedurality. So I always have to blast and isolate what i need first, then go in the spreadsheet to find out what is the path string value I need, and use that to write my expression in the blast node. 

I think it's an info that is already there, but there's no a direct way to access it, or I can't find it.

Link to comment
Share on other sites

I'm not sure to understand exactly what you mean in your second post but in the first one you were asking about deleting something like  @index=10-35  .

In the delete sop you can delete by expression :

@index>10 && @index<35

it will remove all the point(if it's a point attribute) having the @index value between 10 and 35.

Was it what you were asking for ? 

Now i realize that for sure it wasn't :-D

It seems like a difficult problem you have there , hope you will find a workaround ...

Edited by benjo
Link to comment
Share on other sites

well first of all, if you delete something from viewport, it will always delete the element you have selected. so if you select points and hit delete it will yield in removing points by its numbers. if you select a group in the viewport and hit delete, it will delete the group by it's name (not points that are members). check the picture.

but anyway i think you are mixing up groups and attributes. you start talking about groups and in the next sentence you are talking about an attribute. @attribute=10, as you mentioned in your example, is closest to an expression that assigns number 10 to an attribute. it's not a string, it's not a group, and you can't select anything this way. if you want to delete points that has 10 as a value of an attribute, you can delete by expression (as benjo mentioned) that will look like this: @attribute == 10 (that returns a boolean). but this is a completely different topic than groups.

screen.jpg

Link to comment
Share on other sites

well, the attribute pattern or any pattern basically is one of the most common ways to define a group. the fact you can put it directly into a blast node is just a shortcut (which doesn't actually create a group, it will only run the operation on that pattern). to me it doesn't seem to be related to what are you trying to do (if I understand your question at all :)

in your hip file, both ways to blast a selection are non-procedural. you are creating id attribute  by ptnum so if the input model is changed, your id will change too. it's nothing more procedural than just typing in point numbers. you just have one more step in between...

 

Edited by davpe
Link to comment
Share on other sites

Well, the hip file is meant as an example to show the use of the pattern in the group field. What I want is that when I delete a pattern of points of prims specified in the  "group and attribute list" box, it will use that syntax in the group field of the blast node. I am using the blast example, but can be really any operation.

Anyway if you change the point order or number after the Id is created you can still blast the same points with the pattern without doing anything. that's the idea of having an Id.

 

I'll submit this as RFE to sidefx, as it seems there is no way of doing what I want out of the box. maybe in H16!

Link to comment
Share on other sites

On 2/10/2017 at 4:53 PM, MENOZ said:

...

I'll submit this as RFE to sidefx, as it seems there is no way of doing what I want out of the box. maybe in H16!

not sure what's the problem here

if you enter the selection mode by an attribute, any viewport selection will be converted to group mask using that attribute automatically, are you saying that that is not working for you?

 

like in your picture in this post, you are in seletion mode by id attribute, now just select some points in viewport and hit delete, the string put into blast will automatically be something like: @id=5,8,11

 

 

Edited by anim
Link to comment
Share on other sites

Wow I didn't know you could do this, this is great! Before I usually timeshifted to a frame, deleted points, created an attribute and copied this attribute back by id - and then deleted the live points based on this attribute. This is a lot more straightforward to directly delete points by id. Thanks!

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...