Jump to content

graham

Members+
  • Content count

    851
  • Donations

    50.00 CAD 
  • Joined

  • Last visited

  • Days Won

    28

graham last won the day on May 11 2017

graham had the most liked content!

Community Reputation

152 Excellent

5 Followers

About graham

  • Rank
    Houdini Master
  • Birthday 01/09/1985

Contact Methods

  • Website URL
    http://www.houdinitoolbox.com

Personal Information

  • Name
    Graham Thompson
  • Location
    Vancouver, BC

Recent Profile Visitors

8,922 profile views
  1. The intrinsic transform represents a transform applied to the primitive itself, not anything to do with the geometry inside it. In your case you are modifying the geometry which you then pack, but you are not changing the resulting primitive itself. In your example you can see this given that the intrinsic:bounds is changing but the transform is not. If you were to pack the geometry first and then transform it (swapping the node ordering) you would see that the packedfulltransform is updated as you modify the primitive because you are applying the transform to that packed entity, not the raw geometry inside it.
  2. How to set Tags parameter using python

    So in this case you actually just want to set the parameter: hou.parm("/path/to/parm").set({"ogl_text": "1"}) This is because you're just trying to modify an actual parameter, not the definition. You would use the hou.ParmTemplate.setTags() method if you were trying to set/update the tags of a parameter definition but since the Parameter node isn't an actual parameter you just need to set the values. Your quick update is correct in that if you were doing it this way, you'd have to take your modified parameter template and assign it back to the definition or node for it to take hold.
  3. how to connect nodes inside geometry with python

    The most simple thing to do would be the following: hou.node('/obj/geo1/merge2').setInput(1, hou.node('/obj/geo1/transform4')) If you wanted things to be a bit less hard coded/flexible you could also use hou.node('/obj/geo1/merge2').inputConnections() to get a list of connections and then figure out which one is the connection to tube1 and then use that to figure out the input index (1).
  4. Determine if node gives an error

    You can use hou.Node.errors() or hou.Node.warnings() to get at any error/warning information
  5. Assign global variables with python

    You can set values with variables in them by escaping the $: node_rop.parm('sopoutput').set("\$JOB/render/\$HIPNAME.\$F.bgeo.sc")
  6. Drag&Drop Contents

    The nodes_color.py and type_extensions.py should NOT be in the same folder as the externaldragdrop.py. Houdini will use houdini/scripts to find scripts, not Python modules. Since externaldragdrop.py is a script it belongs in there. The other files (as per the instructions) on the should be in houdini/scripts/python, which Houdini will automagically add to sys.path if it exists and then externaldragdrop will be able to import those two modules.
  7. Sorry, there is a problem You are not allowed to edit your signature. Error code: 2C122/C
  8. Weird... I spent like 15 minutes on Sunday trying to figure out how to change mine and I could in no way find any settings that enabled me (or even showed me what my current one was) to change anything. All I could see was my signature on posts I had made. I also tried using the thing from posts which hid everyone's signatures and now I don't see any at all or any sort of way to bring them back :/
  9. Resurrecting this thread. Looks like the signature options disappeared again?
  10. Detecting incomplete node definitions in python

    Short of using some wrapped HDK code, I think the best bet to check for a dummy definition is to check that both the libraryFilePath() points to "Embedded" and that the definition has very little in the sections() list. For example, creating a HDA on disk from a SOP Subnet yields a definition with some expected sections: >>> asset = subnet.createDigitalAsset("dummyop", "/var/tmp/dummy.otl", "Dummy") >>> node_type = asset.type() >>> node_type.definition().sections() {'Contents.gz': <hou.HDASection Contents.gz in definition of Sop dummyop in /var/tmp/dummy.otl>, 'CreateScript': < hou.HDASection CreateScript in definition of Sop dummyop in /var/tmp/dummy.otl>, 'InternalFileOptions': <hou.HDASe ction InternalFileOptions in definition of Sop dummyop in /var/tmp/dummy.otl>, 'DialogScript': <hou.HDASection Dia logScript in definition of Sop dummyop in /var/tmp/dummy.otl>} >>> node_type.definition().libraryFilePath() '/var/tmp/dummy.otl' However, if you then destroy the definition (with an instance of the node in your scene) you'll see it now reports as "Embedded" and only has a DialogScript and Contents.gz section: >>> node_type.definition().destroy() >>> node_type.definition().sections() {'DialogScript': <hou.HDASection DialogScript in definition of Sop dummyop in Embedded>, 'Contents': <hou.HDASecti on Contents in definition of Sop dummyop in Embedded>} >>> node_type.definition().libraryFilePath() 'Embedded'
  11. Event firing when a node is Deleted ( not HDA )

    The problem is that it expects the first arg to be an iterable of enums, not just a single: n.addEventCallback( [hou.nodeEventType.BeingDeleted] , hou.session.a())
  12. add Tag{} Parameter Interface with Python

    You can do this by modifying the hou.ParmTemplate for a parameter. Consider a Float parm named "parm" that already has a tag of foo:bar set from the interface: >>> parm = hou.parm('/obj/geo1/null1/parm') # Get the hou.ParmTemplate for your parameter >>> pt = parm.parmTemplate() >>> pt.tags() {'foo': 'bar'} >>> tags = pt.tags() >>> tags["new"] = "value" # Update the tags >>> pt.setTags(tags) >>> pt.tags() {'new': 'value', 'foo': 'bar'} # Replace the existing tuple/template with the modified one. >>> hou.node('/obj/geo1/null1').replaceSpareParmTuple(pt.name(), pt) <hou.ParmTuple parm in /obj/geo1/null1> >>> p.parmTemplate().tags() {'new': 'value', 'foo': 'bar'}
  13. [novice] help with Python Script

    You are defining the function in a node but are then trying to refer to it as if it was stored in hou.session. If you either remove the hou.session prefix and call it directly, or put the code in the Python Source Editor and call it like that then it would work
  14. Other ways to look through a camera

    It's possible to drag cameras and lights onto the viewport and it will cause the viewer to look through them. It's also possible to write a shelf tool type thing and assign a hotkey to it to cause the active viewer to look through a selected camera/light.
×