Jump to content

Outlawed

Members
  • Content count

    13
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Outlawed

  • Rank
    Peon

Personal Information

  • Name
    David
  • Location
    Canada
  1. Python getting a node name vs getting an instance?

    Argh so simple. Thanks Tomas!
  2. Python getting a node name vs getting an instance?

    Okay, I converted it to a tuple, but it still throws an error. you can see that when it prints the type, they both say <type 'tuple'> but mytup has quotation marks when it prints - is this what's causing it to not successfully run the hou.copyNodesTo command? if(hou.selectedNodes()): selected = hou.selectedNodes() nodeToCopy = repr(hou.node('/obj/geo1')) a = [nodeToCopy] mytup = tuple(a, ) w = type(selected) x = type(mytup) print selected print w print mytup print x #print "Selected is " + str(selected) #print "Node to copy is " + str(mytup) objlevel = hou.node("/obj") low = hou.copyNodesTo(mytup, objlevel)
  3. Python getting a node name vs getting an instance?

    Looks like I need to somehow convert the nodeToCopy to a tuple. Is that correct?
  4. Python getting a node name vs getting an instance?

    That is EXACTLY what I was after! Thanks Tomas! Although one returns a tuple, and the other returns a single instance Taking it the next step however, gives an error: if(hou.selectedNodes()): selected = hou.selectedNodes() nodeToCopy = repr(hou.node('/obj/geo1')) print "Selected is " + str(selected) print "Node to copy is " + str(nodeToCopy) objlevel = hou.node("/obj") low = hou.copyNodesTo(nodeToCopy, objlevel)
  5. Ok, this is a simple question, but I've been out of python for so long, I've lost touch. I have a node called geo1. When I run the following script, i'd like the "Node to copy is" to give the same result of "Selected is" ( I think one is called 'getting an instance', and the other is just returning the node name). Noob question I know. if(hou.selectedNodes()): selected = hou.selectedNodes() nodeToCopy = hou.node('/obj/geo1') print "Selected is " + str(selected) print "Node to copy is " + str(nodeToCopy) Instead it returns: Selected is (<hou.ObjNode of type geo at /obj/geo1>,) Node to copy is geo1 How do I get the same return when giving an explicit node path?
  6. hython command to execute a TOP Network?

    Is there a button on the node to execute the operation? You might need something like pressButton() For example, if I was executing a ROP to press the 'Render to Disk' button: hou.parm('/out/mantra/execute').pressButton() I don't have Hou 17 in front of me to test
  7. Custom Shortcuts for a specified Node

    Here's something I wrote a while ago, should be what you're looking for ####################################################################### ## Create a node and connect it to the selected node ## ####################################################################### ''' "xform" is the node().type().name() "transform" is what I want to call the name. ''' if(hou.selectedNodes()): sopnode = hou.selectedNodes()[0] # print sopnode parentpath = sopnode.parent().path() myxform = hou.node(parentpath).createNode('xform','transform') next_input = sopnode.outputs() orig_pos = sopnode.position() new_pos = (orig_pos[0]-1, orig_pos[1]-1) # print next_input for i in next_input: file_node = i.inputs() for p in file_node: myxform.setFirstInput(sopnode) myxform.setPosition(new_pos) #xform.moveToGoodPosition() #######################################################################
  8. Run script in Command Line tools with Python

    You can write a .py file to load a hipfile, set render frame ranges etc, and execute the ROP ( pressButton() command ). Save that .py file on disk, then just run: hython /path/to/your/file.py Hython is the non-gui python version of Houdini. Just like how hbatch is the Hscript non-GUI version of Houdini.
  9. Script to select visible geometry

    This will select the OBJ-level nodes that have their Display Flag set to True" OBJ = hou.node("/obj") objnodes = OBJ.children() mylist = [] for n in objnodes: print n if n.isDisplayFlagSet() == True: mylist.append(n) print mylist for i in mylist: hou.ObjNode.setSelected(i, 1)
  10. Drag your network view pane tab into the python shell. It will say something like hou.ui.findPaneTab('panetab7') Something like the following should get you started: a = hou.ui.findPaneTab('panetab7') b = hou.NetworkEditor.screenBounds(a) hou.NetworkEditor.setVisibleBounds(a, b, transition_time=0.0, max_scale=0.0, set_center_when_scale_rejected=False)
  11. How to find Node name for createNode in Python

    hou.node("/obj/geo1/file1").type().name() Drop that in the python shell. it will return the operator type name. Or just hou.node("/obj/geo1/file1").type()
  12. Solaris Reveal

    But the USD issue still stands. Or can it take .abc and internally convert it on the fly?
  13. Solaris Reveal

    Correct me if I'm wrong, but when Solaris is released, the only studios who can use it are ones that have a USD-based pipeline (Animation, not just assets), and intend to use Renderman? Mantra hasn't had any development, Karma will be in Beta, and any other Houdini-supported render engines will need to have their Hydra delegates working in Solaris. Am I getting this wrong?
×