Jump to content

How to get the selected edges in a python sop?


magneto

Recommended Posts

I am trying to write some basic SOPs using python. I want to get the selected edges in the current geometry. I looked at this page where I am handed a Geometry instance of the cooked OP, but it seems like there are no edge related functions present:

http://www.sidefx.com/docs/houdini11.0/hom/hou/Geometry

I want to do it in the way of other OPs like Dissolve where it uses the currently selected geometry that's handed to it.

Thanks.

Link to comment
Share on other sites

Edges don't really have an object type representation that is available to the user in Houdini. They have functionality for doing such things in the HDK, but not so much other ways. Edges are just a connection between two points, so given a list of certain points, you could perform various actions on "edges". There are some examples around of people creating faux edge based tools with points in SOPs which might prove informative.

Link to comment
Share on other sites

Thanks graham. Do you know if thouse faux edge examples are here or just all over? I would appreciate a link if it's handy.

It seems like whenever an edge selection is made so a point and primitive selection too. I imagine I can utilize these to "find" the edges.

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