Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

1 Neutral

About animknight

  • Rank

Personal Information

  • Name
  • Location

Recent Profile Visitors

1,596 profile views
  1. Confirm ui message

    Please refer to displayConfirmation/displayMessage. '''Prompt the user if they want to overwrite a file, and save it if they choose OK.''' if hou.ui.displayConfirmation("Overwrite the current hip file?", suppress=hou.confirmType.OverwriteFile): hou.hipFile.save() '''Prompt the user if they want to save, and save the hip file if they choose Yes.''' if hou.ui.displayMessage("Save the current hip file?", buttons=("Yes", "No")) == 0: hou.hipFile.save() -J
  2. Export (import) object to file issue

    I was testing this and running into the same error. It's weird why Houdini wouldn't allow us to open a proper hip file. May be it's meant to be like that but it could be misleading at times. Anyway good to know. Thanks!
  3. Open UV View (Uv Editor ) in Python

    import hou desktop = hou.ui.curDesktop() pane = desktop.createFloatingPane(hou.paneTabType.SceneViewer) # Assuming your newly created pane index is 1 cur = hou.ui.paneTabOfType(hou.paneTabType.SceneViewer, 1) viewport = cur.curViewport() viewport.changeType(hou.geometryViewportType.UV) Hope this helps
  4. Hey man, Did you try to use the node.copyItems ? # Get all the selected nodes including dots sel_items = hou.selectedItems() # Get the node to copy the selected items to copy_to_node = hou.node("/obj/geo1") # To copy the selected items to your node copy_to_node.copyItems(sel_items) This should copy all the selected nodes including the dots on to whichever node you specify. Hope this helps Cheers -J
  5. Hey man, What are you trying to achieve exactly ? Do you want to just show the mini menu drop down or do you want to set the value of the mini menu with a specified token ? -J
  6. Loop over primitives based on their position etc ?

    Hey man, Assuming you have access to all the meshes, could you construct a transformation matrix from the values of Translate, Rotate etc that you have and compare with the transformation matrix of all your meshes and get the ones that match and loop over the prims then ? You could use the maketransform function to construct the matrix from the Translate, Rotate values you have. http://www.sidefx.com/docs/houdini/vex/functions/maketransform.html I'm just making a wild guess here -J
  7. Event firing when a node is Deleted ( not HDA )

    You don't need to call your function inside your event callback n.addEventCallback( [hou.nodeEventType.BeingDeleted] , hou.session.a) Also you might need to add **kwargs arguments to your function depending on the event type as specified in the documentation. Please refer the example given here: http://www.sidefx.com/docs/houdini/hom/hou/Node.html#addEventCallback Hope it helps Cheers -J
  8. Ofcourse you meant Python. How did I miss that ? Here you go # Get the file cache node cacheNode = hou.node("/obj/geo1/filecache1") # Get the param template group for the file cache node parmTempGrp = cacheNode.parmTemplateGroup() # create a button param template myButton = hou.ButtonParmTemplate('myrender', 'Render') # Insert my button param template after the Save to Disk -(execute) parameter parmTempGrp.insertAfter('execute', myButton) # Set the updated param template group to the cache node cacheNode.setParmTemplateGroup(parmTempGrp) Cheers -J
  9. Hi there! You can add spare parameters using the Edit Parameter Interface option in the FileCache node settings (the little gear icon). Please note that it will only be available in your current scene file. If you want it available across all scenes, then you need to save it as a permanent default. Hope it helps Cheers -J
  10. Using custom Python modules

    Sorry I couldn't reply to your other thread. Did you try to install yt using the pip install method ? I didn't have conda installed so I just tried to install using pip real quick and I was able to import yt fine in Houdini. Could you give that a try and see if it works ? -J
  11. Adding Python paths to Houdini on launch [Ubuntu]

    Hi there! You need to add the ytini install path to the PYTHONPATH variable instead so that houdini recognizes and loads them. Cheers -J
  12. Descriptive Parameter to Node

    This doc does say that it won't override the descriptive parm on certain nodes. http://www.sidefx.com/docs/houdini/network/options.html But I just tried it on an object level ROP network node and it worked. Did you try to get the userDataDict() on the node ? n = hou.node('/obj/ropnet_wip_v6_dRop_2_3') n.userDataDict() Which version of Houdini are you using ? Did you try setting any other user data and see if it's working ? Thanks -J
  13. Descriptive Parameter to Node

    Hi there! I just tried to set the descriptive parameter on a geometry sphere and it works. n = hou.node("/obj/sphere1") n.setUserData("descriptiveparm", "parm") n.userData("descriptiveparm") >>'parm' what exactly is not working for you ? -J
  14. Programmatically modifying a color ramp

    Is this what you want ?? myNode # your node with the ramp parameter attnParm = myNode.parm('attenramp') # Get the ramp parameter attnParm.set(5) # You can add more points to the ramp just by setting the number you want. You can also get the keys and iterate over them and set the value on all ramp parms rampKeys = attnParm.eval().keys() # Get the keys numPoints = len(rampKeys) # Get the number of points for keyNum in range(1, numPoints + 1): posParm = myNode.parm('attenramp + str(keyNum) + 'pos') posParm.set(your value) Similarly you can iterate through other ramp params like color and interpolation and set them accordingly. Hope this helps. Cheers -J
  15. define font type when creating font node

    First get the font sop that you have created. fontSop = hou.node("/obj/geo1/font1") then you can do something like this. fontSop.setParms({"file":'Helvetica-Bold'}) Hope this helps. Cheers -J