
animknight
Members-
Content count
49 -
Donations
0.00 CAD -
Joined
-
Last visited
Community Reputation
1 NeutralAbout animknight
-
Rank
Peon
Personal Information
-
Name
J
-
Location
Singapore
Recent Profile Visitors
1,545 profile views
-
Copying Network Dots and other Network Items to Clipboard
animknight replied to Mikal's topic in Scripting
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 -
Calling a Mini Menu of a Parameter with a specified token
animknight replied to gemini's topic in Scripting
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 -
Loop over primitives based on their position etc ?
animknight replied to CinnamonMetal's topic in Scripting
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 -
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
-
Adding a Parameter (button) after an Exiting One in Python
animknight replied to gemini's topic in Scripting
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 -
Adding a Parameter (button) after an Exiting One in Python
animknight replied to gemini's topic in Scripting
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 -
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
-
Adding Python paths to Houdini on launch [Ubuntu]
animknight replied to art3mis's topic in Scripting
Hi there! You need to add the ytini install path to the PYTHONPATH variable instead so that houdini recognizes and loads them. Cheers -J -
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
-
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
-
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
-
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
-
As mantragora suggested, put them in your icon path for houdini to automatically detect your icons. But you can put them anywhere and use the path in your icon in the Edit tool, it'll work. SVG works best but you can use other formats too (.jpg, .png).
-
any generalized method for find renderpath for hou.RopNode?
animknight replied to yongbin's topic in Scripting
I'm not sure whether there's any generalized method to find the renderpath. But What do you mean by not complete when you iterate and find ? What you could do is to add a spare parameter and channel reference this parameter in your render nodes output path. Then in your script you can find all the nodes with this spare parameter and set whatever you wanna set. Not the ideal solution but it should work. Hope this helps -
Can you post an example file ?