Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

3 Neutral

About dzigakaiser

  • Rank

Contact Methods

  • Website URL

Personal Information

  • Name
  • Location
  • Interests
    fx, compositing, matte painting, 3d
  1. Python - frameSelected() function not working

    Okay, I got a little further now. When using setSelected(True,True) instead of setCurrent(True, True) I almost get it to work: When I click my HDA SOP and run the code, it does not frame the SOP. If I click next to it and then run the code from the parameter interface, it works. I added a print statement for hou.selectedNodes() before calling frameSelected() and the output is identical (1st line: clicking on the SOP/ 2nd line: clicking into an empty area in the node graph after having the SOP selected): (<hou.SopNode of type DZK_asset_export at /obj/geo1/DZK_Asset_Export>,) (<hou.SopNode of type DZK_asset_export at /obj/geo1/DZK_Asset_Export>,) Both methods result in also having the node return True for isCurrent(). I am not quite sure what to actually take from this and where to go next
  2. Hey guys! Once again, I have to seek out your precious help ^.^ I am currently creating my own asset browser and I am working on feeding assets from Houdini into the library. So far, everything was going pretty smoothly up until I got stuck with something that seems so simple: the frameSelected() function of the hou.GeometryViewport class. When I use the Python shell inside Houdini and do this, it is working correctly: import toolutils viewer = toolutils.sceneViewer() view = viewer.curViewport() node = hou.node('/obj/geo1/DZK_Asset_Export') node.setCurrent(True,True) view.frameSelected() My section in the HDA is not. Broken down to the essential part (with hard coded selection of node as above for the sake of the example): import toolutils viewer = toolutils.sceneViewer() view = viewer.curViewport() [...] cam = obj_level.createNode('cam', 'asset_cam') node = hou.node('/obj/geo1/DZK_Asset_Export') node.setCurrent(True,True) view.frameSelected() view.saveViewToCamera(cam) view.setCamera(cam) All the other functions work as expected (lockCameraToView, saveViewToCamera, setCamera all work fine). I only have trouble with frameSelected(), even when adding the code from the shell to my script, basically hard coding selecting the correct node. After running my export process which does not frame the view, I can go to the shell and call frameSelected() and from there it works again :/ I also have sections where I first set the camera, lock the view, then try framing but it is the same result: all working, except the framing. I wonder what I am doing wrong in my code and hope you can help me out. Any pointers, comments are greatly appreciated!
  3. Python - setting list parm on USD/Solaris instancer

    Oh boy, sometimes I am a bit stupid The value to set is "extsop" and not "External SOP". I don't know why I didn't check out the edit parameter interface panel before...
  4. Hey hey there, I came across an issue and hope to find some help here once again I tried searching but didn't really know what to search for and then ended up unsuccessful. I am trying to create a Solaris/USD network with my python script but when I set the list parameters on the instancer node it only changes the choice visually but does not actually use it. As an example, when I set the "Prototype Index" to "Name Attribute" manually, the UI shows a new field to enter the name attribute. When I do this in Python: usd_instancer.parm('protoindexsrc').set("Name Attribute") usd_instancer.parm('nameattr').set("instancename") the "Prototype Index" gets set to "Name Attribute" but the extra field is not shown and the node behaves as if it's set to its default value. If I then open the list and click on "Name Attribute" myself again, it shows the new line with my correct name attribute. How would one go about solving this? Is there an extra function connected to this list choice that I have to trigger as well in Python? As always, I am very grateful for any pointers, ideas and help! Update: I noticed now that sometimes the script does not even set the list parameter. E.g. when I open a fresh scene, use my script, it creates the instancer with default values (no errors though). When I run my script again, it creates a new instancer with the list set to my values, but still having the initial issue mentioned above :/ Update2: I also posted over on the sidefx forums now and have a small screenshot to show what I mean:) I set the parameter in Python, it evaluates correctly in the shell but is neither shown in the interface nor actually used. Take care, Dziga
  5. Python Shelf Tool -> Is adding point attributes possible?

    Okay guys, one more time: thank you!! I rewrote it over the weekend (two times:P) and the performance and flexibility is so much better compared to before. Time to build some matrices and then it should work^^ Have a nice week! Dziga
  6. Python Shelf Tool -> Is adding point attributes possible?

    Okay, perfect! Sounds like the way to go then. I am going to try it this weekend. Thank you again for all the help and patience! One more small thing if I may ask. Not directly to this but something I encountered in the current tool. I transferred the scale data to the points prior to instancing and the scale affects the orientation of the instances. Could it be connected to a different order of translate, rotate, scale in Houdini compared to Clarisse? I cannot really see what order Clarisse is using in the scatterer and I am not sure what Houdini is using. Or might this be connected to a different issue altogether? Oh and one other thing. I just tried the code above to define the code and create a Python SOP containing it. If I don't indent the block of code in the definition I get a syntax error because it expects an indented block, when indenting the definition the Python SOP fails to cook because it gets an unexpected indent. I am sure there is a simple fix to this that I can't think of right now, isn't there?^^ I would greatly appreciate a small hint. Edit: found textwrap.dedent for the indentation issue:) Have a nice weekend! Dziga
  7. Python Shelf Tool -> Is adding point attributes possible?

    Thanks both of you. I understand the approach much better now. I think I might rewrite it over the weekend then before ending in a dead end when dealing with very large amounts of data. Just to clarify, though, does the Python SOP evaluate once like the shelf tool does or does it evaluate every frame when the nodes cook? On the one hand, I was wondering in the beginning if using a Python SOP is slower if it reads from the .json every frame. On the other hand, it includes live updates to the scene data then which is actually more valuable in most cases. As overwhelming as it is sometimes, especially not having a programming background, it is awesome to see how deep you can dive and how much there is to learn!
  8. Python Shelf Tool -> Is adding point attributes possible?

    Thanks again for the elaborate reply. I am not sure how I would go about it in my case. Right now, the python script creates an Add Sop and when I try .addAttrib I get an error that the geometry is read only. Or is this the example for using a Python SOP? Sorry, I am a bit confused ^^ I think for now, I will try a workaround by storing my other attributes in separate Add SOPs and then copy the P attrib of those into the correct attributes onto my main points. Not very nice to look at but might be the only thing I am currently able to throw together :s
  9. Python Shelf Tool -> Is adding point attributes possible?

    Hey again, it works! But, I think I made a mistake in my thinking :0 This is basically the same result as using the Attribute Create SOP atm (only holding one orient value for all points). I assume, I would need to actually read from the json again inside the wrangle to get the stored per point data? Or create the inital points by using a wrangle instead of the Add SOP (this maybe makes the most sense)? I was hoping, since I already go through the json for the Add SOP and the position data inside my script, that there is a way to also grab the rotation data and save it per point. Do you know of a workflow for this by any chance? Thanks for the help so far! Cheers, Dziga
  10. Python Shelf Tool -> Is adding point attributes possible?

    Hey Atom, thank you so much for the super quick reply and solution. I was actually wondering if this is the way to go but wasn't sure yet if there isn't a hidden function somewhere to directly add the attributes and to what extend I can put code into the wrangle via script^^ Always more to learn! I am going to try this wrangle method right away. brb Dziga
  11. Hey guys, I am currently stuck with a tool I am writing. I have a json file that contains data from Clarisse and I wrote a shelf tool that re-creates Clarisse's scatter in Houdini. I went the path of creating an Add SOP with the python script with all the points from Clarisse and their position data, a few Attribute Create SOPs, CopyToPoints SOP and the asset file. Now I need to add my orient attribute to the points based on the XYZ rotation that is saved in the json. The problem I encounter is that I actually cannot add point attributes via the shelf tool python script, right? I tried to find a solution to this but as far as I understand, as long as I am not working from a Python SOP or the shell I can only call the geometry() object as read only or freeze() it but then I cannot write the attributes back onto the points(?) Is there something I misunderstand or another workflow I am missing? If one you has an idea or solution or other comment, I appreciate it Thank you! Dziga
  12. Thanks for sharing your setup!:) My script is only neccessary for file imports that come from outside the $HIP directory. And as I am saving a copy anyways, the copy might as well have the network share path. Or at least, that was the quickest solution I could think of, since I am also in the same boat as you, being a self taught freelancer ^^ And about the script saving the extra copy, that's more of a personal preference. I like to have the exact hip file the renderings came from untouched for debugging and clarity. By using the script I avoid accidentally submitting abc_v009.hip, then continue working in v009 and overwriting it. Thanks for the pointer to use $JOB!
  13. In case someone comes across this thread finding themselves lost in one HQeue issue after another, here is a quick list of problems I came across (as a google help or contact me if you need assistance): 1. Manually create inbound and outbound rules for ports 5000 and 5001 in your Windows Firewall to enable communication between server and clients (on all machines). 2. Use the IP address to connect the client to server to avoid possible name resolving issues in your network. 3. Even after changing the "Log On" account for the HClient windows service it was not able to see my network mount. I instead used this inside the hqserver.ini hqserver.sharedNetwork.path.windows = \\XXX\SHARE hqserver.sharedNetwork.mount.windows = \\XXX\SHARE 4. Don't forget to set your target HFS inside the HQ ROP to the installation path of Houdini (took me way too long to realize that I forgot to do this :D) 5. Imports in your HIP might have trouble to load (geo or textures read from your drive/mounted share), the same reason being the one behind point 3. To avoid this you can change those paths to your network share by using //XXX/share instead of using the drive letter. You can get a python script going relatively easy to search and replace file paths in your hip, save the file as a copy/submission file and then submit to hqueue. Hopefully this points anyone with similar issues in the right direction:)
  14. Hey ikoon, unfortunately, I m just gonna leave a +1 here since I encounter the same problem right now. I get the same error log and when I copy the path and paste it into the explorer on the client it opens the file. No idea what the cause could be besides something to do with Windows path mapping not being natively with forward slashes :/ Did you ever figure it out? Cheers, Dziga
  15. Houdini Multijoints

    Hi fayal, I was searching for this effect a few weeks ago and came across this thread: breakable string constraint - od[forum] Unfortunately, I didn't manage to set such a system up yet. If you find out how everything works, please let me know