Jump to content
Macha

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?

Share this post


Link to post
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).

Share this post


Link to post
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....

Share this post


Link to post
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...

Share this post


Link to post
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)

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Posted (edited)

sorry, I read your sidefx forum post after replying... ignore me :lol:

Edited by bunker

Share this post


Link to post
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.

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

×