Jump to content

View/Inspect userData?


Atom

Recommended Posts

Hi All,

 

I have a NULL object that I have added userData to using a python node.

userData does not show up in the geometry spreadsheet because it is not an attribute.

 

 

Is there any way to view the user data in the Houdini interface?

Link to comment
Share on other sites

You can put your userData content in a string parameter.

Or display it via shelf button or customized right-click menu entry. Here the shelf tool:

def userdata(selected_nodes):
    '''Display user-defined data stored on selected node.'''
    if len(selected_nodes) != 1:
        hou.ui.setStatusMessage('Select one node to use this tool.')
        return

    node = selected_nodes[0]
    data = node.userDataDict()
    data = [(k + ': ' + v) for k, v in data.items()]
    data = '\n'.join(sorted(data))

    msg = 'Displaying user-defined data stored on %s node.' %node.name()
    hou.ui.displayMessage(msg, details=data, details_expanded=True)

userdata(hou.selectedNodes())
It will show newline-separated selectable string:

Ga6ASDK.png

  • Thanks 1
Link to comment
Share on other sites

That is kind of neat. But it makes me think of going back to storing my userData in the text field of a stick note. Then I can see and edit it and if I don't want it anymore I can easily delete it. It looks like userData stores only strings anyway.

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