Jump to content

Some Selection questions


Recommended Posts

I have selection questions:

-I have a scene with many assets nested into each other. I want to prevent some of those assets to be selectable. It doesn't seem to work from the top level. Instead I have to dive down into the nodes until I reach the desired nodes, unflag them (sometimes more than one). How can I do that from the topmost level (say, everything in a subnet)?

-Selecting objects always dives into the network by default. what preference prevents this?

Link to comment
Share on other sites

I have selection questions:

-I have a scene with many assets nested into each other. I want to prevent some of those assets to be selectable. It doesn't seem to work from the top level. Instead I have to dive down into the nodes until I reach the desired nodes, unflag them (sometimes more than one). How can I do that from the topmost level (say, everything in a subnet)?

The parameter spreadsheet is great for this, check it out!

(select things in the tree, or use the pattern to automatically slect things; then right click for some settings or use the parm thingy to the right to set more specific stuff)

-Selecting objects always dives into the network by default. what preference prevents this?

If you don't want a network view or scene view to change with selction, use the pin button (next to the context dropdown on scene and netwrok view).

Link to comment
Share on other sites

Im not sure about how to make all the children unselectable, but there would be several scripting routes for this if all else fails...

There seems to be a preferance under the Objects and Geometry Tab ... "Select Entire Digital Asset By Default", or according to the help "Select Entire Subnet by Default", however in the build im using I dont see any result to toggling it on with a subnet at the obj level filled with nodes or an previously created HDA... I could be misinterperting what this does or it could be busted in the somewhat older build Im using, but you might want to give it a try....

Link to comment
Share on other sites

If you don't want a network view or scene view to change with selction, use the pin button (next to the context dropdown on scene and netwrok view).

Pinning the pane as far as i know will keep if from displaying the child node on selection... but I dont think will select the parent node instead...

Link to comment
Share on other sites

I have selection questions:

-I have a scene with many assets nested into each other. I want to prevent some of those assets to be selectable. It doesn't seem to work from the top level. Instead I have to dive down into the nodes until I reach the desired nodes, unflag them (sometimes more than one). How can I do that from the topmost level (say, everything in a subnet)?

How about a shelftool script which dsiables selction on nodes picked in the viewport

import toolutils
a=toolutils.sceneViewer()
a.enterCurrentNodeState()
selected = hou.selectedNodes()
#print selected

for node in  selected:
    node.setSelectableInViewport(0)

Link to comment
Share on other sites

Depending on how much control you want and where you want to be able to control from, I'd probably use a simple recursive function that just kept disabling the selection of child objects.

def recursiveDisableObjectSelection(obj_node):
    """ Disable the ability to select an object node and any of
        its children in the viewport.
    """
    # Skip manager nodes.
    if obj_node.type().isManager():
        return

    if not isinstance(obj_node, hou.ObjNode):
        raise hou.TypeError("Node is not an object.")

    obj_node.setSelectableInViewport(False)

    if obj_node.childTypeCategory() == hou.objNodeTypeCategory():
        for child in obj_node.children():
            recursiveDisableObjectSelection(child)

Such a function could easily be further extended to filter based on node types or names so as to only disable certain nodes. You could then run the function from a shelf tool or OPmenu wrapper.

Edited by graham
Link to comment
Share on other sites

  • 8 years later...

I have a scene with many assets nested into each other. I want to prevent some of those assets to be selectable. It doesn't seem to work from the top level. Instead I have to dive down into the nodes until I reach the desired nodes, unflag them (sometimes more than one). How can I do that from the topmost level (say, everything in a subnet)?



i keep running into the same issue. i already asked there https://www.sidefx.com/forum/topic/69865/ and got no reply at all.
hard to believe houdini fails at such a basic task.
Link to comment
Share on other sites

oh please, by all means, do reply. all i'm looking for is a way to recursively select objects. gui or script is both fine.
to illustrate, in maya that's as simple as:

select -r "*bolt*"



or even simpler, i can just use the textfield in the upper right corner.

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