Jump to content

obj selection through phyton shell


traiano

Recommended Posts

viewer = toolutils.sceneViewer()
objsel = viewer.selectObjects("Select objects and press Enter",
        use_existing_selection=False,
        allow_multisel = True,
        quick_select=True,
        allowed_types = ('cam','hlight','null','geo','subnet'))

I can select my geo container node but how do i reach what I have inside the container through the phyton shell?

Link to comment
Share on other sites

There is a method for each node called children(). That is how you inspect what is inside.

for node in objsel:
    for n in node.children():
        t = str(n.type())
        print n.name()

 

Edited by Atom
Link to comment
Share on other sites

  • 4 months later...

this command shows me the texture im using on my material for the geometry:

print hou.node(“./mat/clay”).parm(“basecolor_texture”).eval()

i can change to a new texture:
hou.node(“./mat/clay”).parm(“basecolor_texture”).set(“path_to_the_new_texture”)

I would like to create a dynamic texture in the shell by giving a color and write letters and numbers on it, all inside houdini so i can feed this to a neural network that has to learn. any ideas?

Edited by traiano
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...