Jump to content

animknight

Members
  • Content count

    59
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

3 Neutral

About animknight

  • Rank
    Peon

Personal Information

  • Name
    J
  • Location
    Singapore

Recent Profile Visitors

1,659 profile views
  1. Add Handles

    Please refer to this topic. https://www.sidefx.com/forum/topic/30263/ -J
  2. how to set unexpanding string to parameter by python

    There's no direct method AFAIK. I don't understand the purpose of doing this. The whole point of channel reference is that if either of resourceA or resourceB is changed, it will be updated automatically in your cachePath. Instead of getting the unexpandedstring and setting them, why don't you just evaluate the parameter and set the value directly ? -J
  3. Python: Delete node

    Are you using Houdini 17.5 ? I have seen this error in 17.5 but works in 17.0. It could be a bug. Probably worth submitting an RFE. -J
  4. Python: Delete node

    Hi there, It's working for me and it's deleting the node as expected. Please note that the node gets cooked only when there's some change. Is it not deleting even if you force cook it ? -J
  5. Digital Assets and the Tab menu

    It can be done but there's no direct way to access it AFAIK hda_def = hda_node.type().definition() tools_section = hda_def.sections()['Tools.shelf'] # tools_section.contents returns an XML string which you # need to parse and get the value of the tab Submenu path tools_contents = tools_section.contents() Hope it helps -J
  6. Hi there! You could hide the parameter label in your integer parameter and add a label parameter and set your long label name in the Column Labels (Label1) and hide the Main Label of the label parameter. Hope it helps -J
  7. Set Scene View To 'HomeToSelection'

    import toolutils # Get the viewports from the sceneviewer scene_viewer = toolutils.sceneViewer() viewports = scene_viewer.viewports() print(viewports) >> (<hou.GeometryViewport right1 of type Right>, <hou.GeometryViewport front1 of type Front>, <hou.GeometryViewport top1 of type T op>, <hou.GeometryViewport persp1 of type Perspective>) # Choose the viewport you want to home selection persp_viewport = viewports[-1] persp_viewport.homeSelected() Hope it helps -J
  8. 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
  9. 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!
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
×