Jump to content

CinnamonMetal

Members
  • Content count

    855
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by CinnamonMetal

  1. Parent as Selected

    I wanted the hierarchy selection. inputs() retrieves the the parent node, which I thought was the node above, the PythonSOP. The parent node is the first node in the hierarchy. How do I get the node which in this case is the node one up before the PythonSOP ? As well setInput() doesn't accept index number ?
  2. Parent as Selected

    paren = thisNode.parent() if paren == 0: print(paren) else: paren.setSelected(on,clear_all_selected=True) If the current node has a parent, set the parent as the current selected node; it's unfortunately not working ?
  3. Set Parent node as current node

    Same Question. paren = thisNode.parent() if paren == 0: print("complete") else: paren.setSelected(on,clear_all_selected=True) Error 'on' is not defined ? This is for setting the node which is connected to the current node ?
  4. Set Parent node as current node

    if thisNode.parent(): thisNode.setCurrent() How do I set the current node to the parent node; or must I use setSelected ?
  5. Clarisse iFX ?

    Thanks for the info; with that, I'll stay with Fusion
  6. Set Parent node as current node

    I have a variable set to hou.pwd(); I want to set the parent node as the active node rather then the current node ? If the current node has a parent, set it to the parent ?
  7. It would be great to have a solved for threads which are solved. Most importantly to delete posts, there are times you may ask for help when a few hours later, maybe the next day; you solve your problem and now the post is irrelevant.
  8. Find point number ?

    I'm looping over all the points on a mesh, although how can I find a point number's on a mesh (python) ?
  9. Iterate over points to setPosition

    del
  10. Iterate over points to setPosition

    I want to set the position of the points of a object in python. I've looked in the HOM Python cookbook although I don't understand the error; SopNode is not iterable, when I attempt to iterate over them and setPosition() ?
  11. Index of class on empty string

    If I make an infinite loop when the user enters some text instead of the rest of the script executing; the else statement is executed and the variable = nodeName does an infinite loop completely ignoring to execute the script ? I want the infinite loop strictly for the OK button, although not for the CANCEL button.
  12. Index of class on empty string

    I'm hung on a problem, with python. hou.ui.readInput() produces a tuple; I have a while loop but I can't get the index item of the tuple which is the "OK" button of the class not to disappear if the string is empty ? In other words, if the user clicks "OK" the dialog should not disappear.
  13. Index of class on empty string

    I one more question. How do I get the "OK" button to loop repeatedly if strictly the "OK" button is pressed ? I'm hacking away at this and I hope, that I solve this before hopefully your reply.
  14. del

    del
  15. Index of class on empty string

    nodeName = hou.ui.readInput("what do you want",buttons=('OK',"Cancel"),default_choice=0,title="Name the sphere",close_choice=1) if nodeName[0] == 0 and nodeName[1] !="": intro = hou.node("/obj").createNode("geo","geometryA") superGeo = intro.createNode("sphere",nodeName[1]) superGeo.setPosition([2.3,4.5]) superGeo.setParms({"radx":2.3,"radz":4.2,"type":"bezier","rows":54}) fileNode = hou.node("/obj/geometryA/file1") fileNode.destroy() superGeo.setRenderFlag(True) else: while not nodeName[0] == nodeName[0]: hou.ui.displayMessage("You must supply a valid node name") break
  16. Iterate over points to setPosition

    This is helpful.
  17. Invalid node name in while loop ?

    Thank you, that solved it.
  18. Invalid node name in while loop ?

    Hi, I'm a newbie at understanding scripting within Houdini so I hope all will understand. (Python) nodeName = hou.ui.readInput("what do you want",buttons=('OK',"Cancel"),default_choice=0,title="Name the sphere",close_choice=1) print(nodeName) if not nodeName[0] or nodeName[1] !="": intro = hou.node("/obj").createNode("geo","geometryA") superGeo = intro.createNode("sphere",nodeName[1]) superGeo.setParms({"radx":2.3,"radz":4.2,"type":"bezier","rows":54}) else: while nodeName[0] == "": print("you must supply a valid node name") get__input() I'm getting an invalid node name error when the user clicks on the OK button with an empty string rather then strictly the print statement ?
  19. Invalid node name in while loop ?

    nodeName = hou.ui.readInput("what do you want",buttons=('OK',"Cancel"),default_choice=0,title="Name the sphere",close_choice=1) if not nodeName[0] or nodeName[1] !="": intro = hou.node("/obj").createNode("geo","geometryA") superGeo = intro.createNode("sphere",nodeName[1]) superGeo.setParms({"radx":2.3,"radz":4.2,"type":"bezier","rows":54}) else: if nodeName[0] == 0 and nodeName[1] !="": print("you must supply a valid node name") I tried most combinations except; nodeName[0] == 0 which I was hoping would solve this. Except before when clicking `cancel` the print statement happened; the print statement isn't happened when clicking cancel and when clicking `ok` I get the same error; invalid node type ?
  20. Invalid node name in while loop ?

    nodeName = hou.ui.readInput("what do you want",buttons=('OK',"Cancel"),default_choice=0,title="Name the sphere",close_choice=1) if not nodeName[0] or nodeName[1] !="": intro = hou.node("/obj").createNode("geo","geometryA") superGeo = intro.createNode("sphere",nodeName[1]) superGeo.setParms({"radx":2.3,"radz":4.2,"type":"bezier","rows":54}) else: while not nodeName[0] == "": print("you must supply a valid node name") break No matter what I try for the while loop. When the user clicks "OK" I get a invalid node error instead of "you must supply a valid name" ?
  21. Invalid node name in while loop ?

    I got it, thanks @f1480187
  22. remove_double

    remove_double
×