Jump to content

[solved] Does SOP_Node::select() work?


Recommended Posts

Nothing is being selected in the viewport.

 

Also tried the SOP_Star example that uses select(GU_SPrimitive); and it doesn't work as well.

 

H14/H13

Edited by ayidi
Link to comment
Share on other sites

Did you put it down from the viewport? Selections show only when the highlight flag is enabled, which is off when you put a SOP down from the network view.

 

I was doing it from the Network View.

 

Now that I'm setting the highlight flag manually it works in both situations.

 

Perfect, thank you for clarifying. Is there any documenation of this behavior?

setHighlight(true); // make sure to set it in the constructor
select(*group);
Edited by ayidi
Link to comment
Share on other sites

I'm not sure if there's any documentation, I haven't looked. I would assume so though since this has been the way for all SOPs since H5. If you can't find any, please submit docs bug.

 

I didn't find any documentation but the behavior is caused by toolutils. Houdini calls toolutils.genericTool when the node is a manager or the current pane is not a scene view, toolutils.genericTool doesn't set the highlight flag of the node.

 

Example:
 
Custom SOP (Other)
 
- SceneViewer: soptoolutils.genericSopNodeFilterTool
- NetworkEditor: toolutils.genericTool
 
Box SOP (Generator)
 
- SceneViewer: soptoolutils.genericSopNodeGeneratorTool
- NetworkEditor: toolutils.genericTool
 
Placing nodes from the scene viewer has better default behaviors such as automatically connecting nodes among many other features depending on the node type (faster). However, the toolutils.generictool allows the user for more control such as node placement and connections (slower).
 
I should starting placing nodes from the scene viewer more often.
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...