Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

1 Neutral

About danielsweeney

  • Rank

Personal Information

  • Name
    daniel sweeney
  • Location
  1. Hi Everyone. Has Anyone got any ideas on how to do this? or point me in the right direction of any further reading. Google searching is not coming up with anything. how can I return if a ctrl or shift keystroke is pressed when dropping files in my externaldragdrop.py so i can define different functions depending on modifier key pressed. I'm using the def dropAccept() does anyone know if this returns any other information other than files. I also cant find any information in the docs on this function. cheers for the help. Daniel
  2. Hi everyone, I am just wondering if Anyone can point me in the right direction for this. (or tell me if it is even possible) currently have a QtreeWidget in a python panel and I want to be able to drag one of the items in the list from the panel into the network view anf drop the file(execute the function needed). main trouble I am having is trying to logic working for the drag and drop events - what functions should I be looking for. - do i need to use Pyside2 events (can manage to get feedback from dragEnterEvent() and dropEvent(), but these only work in the panel it self) - or would it be built in events from houdini that need to be call? im no expert on this. any gurus out there that can throw me a bone? currently on hou18. cheers Daniel
  3. OnInputChanged - event not triggering when input nodes change name

    Hi, thanks for the responses Alex and Thomas. to be honest the opinput() would work for my solution. but only if I could get all inputs going into a multi-connector? and it then Registered it on the Parm so i could run a call back script. But from what I have tested. the callback script does not run when its has an expression in the parm and the output changes when it pulls the new name? I will have to have a proper think about doing it with node event types as I have no experience of this and I am very much on a learning path with python....:S the joys of coding when you dont have a coding brain. ha Daniel
  4. HI everyone. Hope everyone is ok in this current situation. Hope no one is Ill from the virus and not going crazy working from home. I am wondering if someone can point me in the right direction on this. I have a Multi-input HDA - I assumed that the OnInputChange HDA event would trigger when a name change of node that is connected. But for some reason, it does not. What would be the best way to listen for this event happening. The event triggers fine the first time the node in plugged in, but not when the node changes name. Any help would be appreciated. Cheers Daniel
  5. onCopy event in hda

    Thank you so much for this Alex. been banging my head against the wall in a code hole. does not help when I am no Python wizard. Cheers again Daniel
  6. onCopy event in hda

    HI, I know this is an old thread, could anyone shed some light on this? I need to have my custom function track if the HDA has been duplicated? What is the best practice. Cheers Daniel
  7. $JOB dependent hdas and python modules

    It would be cool if this just worked out the box. So we could tick if we wanted houdini to find Job specific HDa/OTLs I am still quite confused how to get this to work. I assume there are multiple way. All of which seem a little complicated. I made a quick test with a small python script thats on a null and when I run the code. it appends to the OTL scan path. But as I am no pro at houdini and I am trying to set this up for a Company enviroment I am still moving slightly blind. Is there a new way to do it with Packages? Dynamically? as when we upgrade to hou 18 (when deadline starts to support it) I would like to step away from the enviroment variable way of doing things and move all to packages. Also, I understand I could write this in a 456.py script. But I have had multiple errors with deadline and both the 123.py and 456.py scripts where it throws errors and I cannot seem to pinpoint the problem and solve it. many errors about its not finding hou. whatever. cheers I might have to contact support to see if i can get a straight answer. Daniel
  8. Hi people. Just wondering if anyone is having this same problem. I am fairly new to python and I am following along with Mix training video on youtube about python panels. https://www.youtube.com/watch?v=jL7jM1bJhxE&list=PLAnSvhIvNZCs4_D1JYZitBEBmf31_2ylL&index=1 and for some reason, I am stumbling at the first hurdle. When trying to import the OS module for python in the python panel window. its does not seem to work. Now if I go in and 'import os' via the python shell it works. Can anyone shed some light on this? or has anyone had this issue before? on 17.5 cheers Daniel
  9. hou.hipFile.save problems - need help

    I am only asking as when reloading the scene. Either the variable is not there anymore or it does not reflect the information that is sitting in the HDA. So I need a way for that Data to stay within the HIP file so when it is re opened the Global data for that file in still available. Any ideas?
  10. hou.hipFile.save problems - need help

    Hi Stalker. Thanks for the reply. much appreciated I Took your advice on using the os.path.join. Works well and of course is the correct way to do it. But I was still getting the problem though. Found out it was down to creating the whole path that was the problem for some reason. So I broke up creating the work category and the whole file path. like #create work catagory folder if os.path.exists(exWorkCatagPath) == False: os.mkdir(exWorkCatagPath) else: printMe = "no Directory created!!" print printMe # save full file hou.hipFile.save(exSavePath, False) But I do have another question. As I am creating the variables for this like below. hou.putenv("FOLDERNAME", fname) It is storing this in an environment variable I believe. Which I think might not be the best option. Is their anyway I can store these variables in the HIP file so I can pull them into other areas like ROPS for instance via $FOLDERNAME. a Local variable that is only available in the hip file that has been saved. Thanks for your help again. Daniel
  11. hou.hipFile.save problems - need help

    Hi Everyone, Hope you are all well. We have not been using houdini long. We are long time soft users and we are testing out software to move too and see the strengths of them. Houdini is our first choice for the sheer scope of it, so we have started looking at this first. Anyways, explaination of the problem below. I am trying to script a "simple" saving function through a HDA via Python (I dont know if this is a correct way of doing it, so please If I am going in the wrong direction, shout) it will create a few folders based on some parameters in the HDA interface and save the file with the name specified. I am setting environment variables through this and using that to generate the path for the file save and also will hopefully re-use the Environment variables later for ROP output ETC for the scene. I am running into an error with what I believe is to do with the hou.hipFile.save function. I have not been coding for very long either so please bare with me if my Termanology is off also. I have attached some code snippets. I am basically trying to save the files to a structured job folder system. something like below. $JOB/scene/[WORKCATAGORY]/[SHOTFOLDER]/SHOTNAME.hipnc I have defined some functions in the Python Module in the HDA, and these are being called by the callback script on each parameter. It is really weird, It has worked once or twice. But then I try to save again and it does not work again. I did some debugging and the Error that houdini generates, it definately works when I take out the SHOTFOLDER in the string for the path to save to. If my file path is just saved in the WORKCATAGORY section it saves. My defined functions (sorry code is messy) def shotName(parm): hou.putenv("SHOTNAME", parm) test = parm print test def folderName(parm): fname = "NN_" + parm hou.putenv("FOLDERNAME", fname) test = fname print test def workCatagory(node, parm): a = hou.parm(parm.path()).eval() labelName = hou.parm(parm.path()).menuLabels()[a] testA = parm hou.putenv("WORKCATAGORY", labelName) print labelName def customSave(): #Pull in Enviroment Variables work = hou.getenv("WORKCATAGORY") shot = hou.getenv("SHOTNAME") folder = hou.getenv("FOLDERNAME") # Houdini save path FULL savePath = "$JOB/scene/" + work + "/" + folder + "/" + shot + ".hipnc" # Houdini save path with a job catagory but not job name folder #savePath = "$JOB/scene/" + work + "/" + shot + ".hipnc" exSavePath = hou.expandString(savePath) exSavePath = exSavePath.replace('//', '/') #hou.putenv("SAVEPATH", exSavePath ) hou.hipFile.save(exSavePath, False) print exSavePath the error it generates is Traceback (most recent call last): File "<stdin>", line 1, in <module> File "opdef:/Object/Northforge3_testa?PythonModule", line 40, in customSave File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.600/houdini/python2.7libs\houpythonportion.py", line 1287, in decorator return func(*args, **kwargs) File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.600/houdini/python2.7libs\hou.py", line 28330, in save return _hou.hipFile_save(*args, **kwargs) OperationFailed: The attempted operation failed. Error creating file: W:/Work/Development/D00026_Houdini_test/3.3d/D00026_Houdini_test_HOUDINI/scene/rend/NN_test/test.hipnc working enviroment is. Windows 10 Houdini Apprentice 16.0 saving to a NAS drive I hope some of that makes sense. Cheers