Jump to content

Search the Community

Showing results for tags 'Python'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Lounge/General chat
    • Education
    • Jobs
  • Houdini
    • General Houdini Questions
    • Effects
    • Modeling
    • Animation & Rigging
    • Lighting & Rendering
    • Compositing
    • Games
    • Tools (HDA's etc.)
  • Coders Corner
    • HDK : Houdini Development Kit
    • Scripting
    • Shaders
  • Art and Challenges
    • Finished Work
    • Work in Progress
    • VFX Challenge
    • Effects Challenge Archive
  • Systems and Other Applications
    • Other 3d Packages
    • Operating Systems
    • Hardware
    • Pipeline
  • od|force
    • Feedback, Suggestions, Bugs

Found 234 results

  1. Hello guys, I have some problems with PyQt in Houdini. The problems are: 1. How to get rid of the white border around the window? 2. The logo/image does not load. How to fix it? Thanks ------------ Qt Designer GUI preview GUI Problems 1. How to get rid of the white border around the window? 2. The logo/image does not load. How to fix it?
  2. Hi Everyone, I'm having trouble understanding the soho_outputmode 0 soho_pipecmd process. I have created a script for my custom renderer which works using soho_outputmode 1. After initializing soho, It will read and translate the scene correctly writing it as scene.xml using sys.stdout to write to the soho_diskfile. I can then render that scene successfully using my command "render scene.xml" from the terminal. Everything works as expected. I run into problems when switching to soho_outputmode 0 and setting the soho_pipecmd value to "render". When I hit the render to disk button, I see in the terminal that the render command is running but has the error that it hasn't been passed any file. I would like to know what exactly is being piped to the pipecmd and how to get the render command to see the stdout as a file. The documentation I've seen stops short of explaining this. Any help would be greatly appreciated!
  3. Houdini Easy Compile Blocks

    Hi Folks ! For Houdini optimization nerds I'd like to share "Houdini easy compile blocks". It's a simple script which creates for you the compile blocks + update the expressions to use spare inputs ( if needed ) around a for loop or a selection of nodes. Compiling a for-loop is now one click away Available for free here: http://cgtoolbox.com/houdini-easy-compile-block/. If you have issues with a loop compilation, feel free to send a small hip file if possible, to support@cgtoolbox.com, with the nodes you're trying to compile and I'll have a look ! https://vimeo.com/287152763
  4. Hi Houdini friends, I'm not sure if anyone had this before, I'm having this really weird issue where I specify a digital asset to show some info with its "Descriptive Parm" field, and I specified a parameter for it to read, say 'display_parm'. The result of evalParm('display_parm') shows the correct result, but the actual displayed info is different from this result. In this case it is a string containing 3 parts, the actual displayed part is missing the middle part. It is as if the actual displayed info is using another parm or something. And this is only happening to some of the test cases not all of them. Has anyone had similar issues before? Thank you so much! Best, Viola Lyu
  5. Hello! I try to add pre-render script in the Alembic ROP. My goal is to prevent the ROP to write the Alembic file if the user clicks on NO on some dialog box raised during the pre-script. What should I do to stop the ROP? How do I know in the post_render script that the ROP didn't render? Thanks
  6. Hi, I am looking for the ways to replicate in Houdini point instancing done in some other application. I will skip here the data importing part because it is clear in my situation how to do that with Python. Let's say I already have a Python dictionary with elements like 'name':'transform', where 'name' is the name of the object to be instanced and 'transform' is a list of 16 floats representing world transform matrix of that instance. I have figured out so far how to do it at the object level. Here is my Python code for that: # My existing dictionary containing pairs like 'name':'transform' my_dict = {'foo': '....', 'bar':'......', ......} # where each dictionary value is a list of 16 floats for key in my_dict.keys(): node = hou.node('/obj').createNode('null') node.setName(key) m4 = hou.Matrix4(1) m4.setTo(my_dict[key]) node.setParmTransform(m4) This gives me bunch of named nulls with the correct transforms. And I can parent my object under those nulls. But I need the same at the SOP level. I need a bunch of points with 'name', vector 'scale' and preferably quaternion 'orient' attributes which I can pipe into the the right input of the CopySOP for instancing. Any help on that would be much appreciated.
  7. Drag&Drop Contents

    The script implements the ability to drag files of geometry, caches, textures, images right into the viewport. This project was open-source, so I spread it for everyone. Can someone come in handy. Thank you for watching! Projects: https://github.com/alexwheezy/python/tree/master/houdini/drag_drop_files
  8. Houdini Python Tools

    You can see it here : https://gumroad.com/l/oIDpL
  9. Hi everyone, this is my first time writing tools with python, so maybe I got something completely wrong here. I want to built a HDA to setup the houdini scene by selecting project, sequence and shot number. For that I created a HDA with a ordered menu and a drop down listing all available projects. The menu is created by a python function in the python module and then called in the menu script area. I then have another ordered menu to select from all the available sequences based on the selected project. A callback script on the project drop down is triggering the create menu function for the sequence drop down. I then need to know the currently selected project in the project drop down. I tried getting this information with the node eval parm, but this is only kind of working. It returns the right token, but as an integer and multiple times for each menu item causing a long loop. I also tried using the menu parm template, but I cannot access the data correctly. What would be the best way to geht the menu label as a string for the currently selected item in the drop down menu? Thanks Here is some of the code I used: #ProjectMenuDropDown def projectMenu(): import os projectPath = 'H:/' projectList = os.listdir(projectPath) projectMenu=[] for i, item in enumerate(projectList): projectMenu.append(i) projectMenu.append(item) return projectMenu #Call function in menu script hou.pwd().hdaModule().projectMenu() #Callback function to trigger sequence menu in python module hou.phm().sequenceMenu(kwargs) #SequenceMenuDropDown #SequenceMenu def sequenceMenu(kwargs): import os node = kwargs['node'] projSelect = node.parm('project').eval()
  10. Hi novice Python user trying to get ytini (Houdini for Astronomy http://ytini.com) up and running on my Mac. Followed instructions, using miniconda and then installed the yt package. Confirmed that it is correctly installed. But from within Houdini's Python shell when I try and do an import yt I get a package not found error. I assume my pathing is wrong. The install directions here http://ytini.com/getstarted.html suggest modifying your .bash_profile which I've done after first making necessary changes. But the directions assume there is a yt-conda directory /Users/<userfoo>/yt-conda/bin and also a yt-conda/sbin directory /Users/<userfoo>/yt-conda/sbin but I have neither. Only the following /Users/<userfoo>/miniconda3/bin What changes should I make to my pathing to make Houdini recognize the yt package install? Thanks!
  11. Hi , I am building currently building an HDA with an important interface (lots of tabs and multiParm list inside multiParm list .. ) so I wanted to use python in "Menu Script" to list a string array stored in the detail attribute to populate on of my ordered menu, after I finally got it to work on a null to experiment then I tried to replace my previous ordered menu with manually typed string with the new one using python script and houdini crashes each time I try. What's weird is that I am able to read the channel and access the value with no problem outside the HDA. Does anyone knows why this is happening, am I missing something here ? Edit : It seems that when I try to return the string inside the HDA, it gives me -1, but even if I just print that value, houdini still crashes and why it return that value only inside the HDA ? Also when I enable "Use Menu Item Token as Value" I am able to return the corresponding ID of my selection without crash, but I want the string value of course. The python script I use : node = hou.pwd() geo = node.geometry() menu = [] data_list = geo.stringListAttribValue("data_list") for data in data_list: menu.append(data) menu.append(data) return menu
  12. Flipbook Tool?

    Hello hive mind! I'm looking for a better solution to saving out my flipbooks as .mp4s. Right now I have ffmpeg installed so I can go directly from mplay and save an .mp4, but I cannot figure out how to change the preset for the menu so that the default file name matches my naming convention. Which is really annoying. I'm looking for any of these solutions! 1) Does anyone know how to update this ffmpeg window with a custom string in the "Output File" field? 2) Does anyone know where mplay stores the tmp images, so I could grab them straight from there and go to ffmpeg from a shell? 3) Does anyone have a better solution for flipbooking? Thanks!
  13. Hi all, I'm creating a python panel tool with a web front end. I've successfully put a Qt WebEngineView in a Python panel, but when the panel is hidden and displayed again (ie switching tabs in Houdini UI) the main loop of WebEngineView seems to pause. Any animations stop and all mouse/keyboard interaction stops. If I resize the panel it will recover most of the time. I assume I have to call something on WebEngineView when then the python panel onActivateInterface() is called but I can't see anything obvious in the Qt docs http://doc.qt.io/qt-5/qml-qtwebengine-webengineview.html#WebAction-prop PS: I'm on Win 10. Anyone solved this before? TNKS! G
  14. Hello Hive Mind, Long time reader, first time poster.... I was wondering if anyone knows a pythonic way of creating a reference copy of a node? More or less the equivalent of hscript opcp -c. It's a little more complicated than a copy and iterate over parms, since certain parm types need different copy/reference methods. Thanks in advance!
  15. Hi How do I save out all geometry information to a python numpy .npy file. I'm dabbling with a neural network that takes in a bunch of objs and spits out its so called interpretation..... But as yet I am working with just the points and not the vertices and prim information. How could I save all this information to an array so I could then reload the array back into houdini for houdini to display prims/vertices etc...... Thanks for your help
  16. Hi everyone, We're currently looking for a talented Pipeline TD and Pipeline Assistant to join us at our 80-seat facility in Bournemouth, UK. This is a fantastic opportunity to join a burgeoning pipeline team and make your mark on an exciting young VFX operation. We work across feature film, high-end TV and commercials simultaneously and have recently worked on Jurassic World 2, One Strange Rock, Electric Dreams and 47 Meters Down, to name a few. You'll find the individual job specs at outpostvx.co.uk/careers. CVs to talent@outpostvfx.co.uk please. UK-eligible applicants only. Thanks for reading!
  17. Quick question, How do I go about creating a colour parameter on a node? There doesn't seem to be a ParmTemplate for it and there's no documentation on this type of parameter for what I can find.
  18. Rotate cameras from vector list to degrees

    I have read lots of camera angles from a text file, and try to convert them from vectors to degrees: rot_list = rots.split() # ['0.768704', '-0.628123', '-0.120648'] rot_deg = hou.Vector3.angleTo(rot_list) node_camera.parmTuple('r').set(rot_deg) It throws an error: unbound method angleTo() must be called with Vector3 instance as first argument (got str instance instead)
  19. Hey guys, I was wondering if anybody is familiar with using the hou.node.setDeleteScript() method. In the docs, the language arg is set to Python: setDeleteScript(script_text, language=hou.scriptLanguage.Python) But when running the following code, I get an error n = hou.node('/obj/geo1') cmd = 'x = 5; print x' n.setDeleteScript(cmd) OperationFailed: The attempted operation failed. Python is not yet supported in deletion scripts. Just passing an empty string gives the same error. When trying to set the language flag to Hscript with n.setDeleteScript('setenv x = "hello"', language=hou.scriptLanguage.Hscript) It raises another error TypeError: setDeleteScript() got an unexpected keyword argument 'language' Is there something I'm missing? I would normally create an HDA and use the built in 'On Deleted' call and run my code there, but for this particular case I'm unable to use an HDA. I was able to find this function all the way back in the Houdini 12 docs. Is it still not usable? Thanks!
  20. Turn selected folder into an absolute path

    I am building a shelf tool that imports all *.PLY-files from a folder. It works, just how can I convert this into an absolute path? hipdir = os.environ["HIP"] folder = hou.ui.selectFile(title="Choose directory:", file_type=hou.fileType.Directory)
  21. Hey everyone, I just released my Pipeline called Prism, which I developed over the last few years. Prism is an artist-friendly Pipeline, mainly for animation and VFX projects, but it can help anyone who works within the CG industry. Prism does not only manage your scenefiles, exports and imports, but it also takes care of your playblasts, renderings and more. Prism works with many industry standard tools out of the box. This includes Houdini, Maya, 3ds Max, Blender and Nuke. And finally, Prism is free to use! Here is a short introduction video of Prism: https://vimeo.com/265003976 You can download it for free on the website: https://prism-pipeline.com/
  22. I'm using a userSetup.py script to do some setup in Maya during launch. However, some things are not happening as expected, and I can't seem to find the output of Maya's stdout during startup to debug. For example, if I put the line print "Testing stuff..." into userSetup.py, I cannot find where it gets printed. It does not show up in the Script Editor after Maya launches, it does not get written to the shell if I launch Maya via cmd prompt > maya.exe, and it does not get written out to the output file if I set MAYA_CMD_FILE_OUTPUT in my Maya.env Where can I find the stdout from Maya's startup process??
  23. HOUDINI_USER_PREF_DIR

    Afternoon all, I've come across this a problem a few times and never managed to get my head around it properly. Hopefully someone can give me a better understanding of how to do this. Ideally I'd like to have a collection/package of otls, scripts/modules, icons etc that equate to a toolset. I would like to be able to keep these separated from the houdini install and user prefs and just be able to 'plug them in' to houdini - ideally only changing a line or two in the houdini.env file. If I put all the bits and bobs in the correct locations in 'C:/users/garf/MyDocuments/houdini16.0' then it all works fine - it picks up the modules, connects the icons etc 'C:/Users/garf/Documents/houdini16.0/python2.7libs' 'C:/Users/garf/Documents/houdini16.0/config/Icons' 'C:/Users/garf/Documents/houdini16.0/shelves' However I want these to be in a separate package somewhere like this: 'C:/users/garf/Documents/MyExtraToolSet/houdini16.0/python2.7libs' 'C:/users/garf/Documents/MyExtraToolSet/houdini16.0/config/Icons' 'C:/users/garf/Documents/MyExtraToolSet/houdini16.0/shelves' in addition I've tried changing my HOUDINI_USER_PREF_DIR variable with the houdini.env file HOUDINI_USER_PREF_DIR=C:/users/garf/Documents/MyExtraToolSet/houdini__HVER__ but when I hconfig HOUDINI_USER_PREF_DIR in the shell, it still says 'C:/Users/garf/Documents/houdini16.0/' and nothing links up Any pointers appreciated. Cheers
  24. Set parameters by clicking buttons

    Hi, I would like to overwrite values of a parameter field by clicking on a button (see image). Thank you!
  25. EXR meta data issues

    Hi there, I'm trying to set custom data as meta data using the mantra render attribute: "vm_image_exr_attributes" according to the docs i should be able to parse the attribute a python dictionary object, however whenever I try to do this: test_dict = {"count" : 0, "path" : "/jobs/"} my_node.parm("vm_image_exr_attributes").set(test_dict) I get the following error: TypeError: in method 'Parm_set', argument 2 of type 'std::map<std::string,std::string,std::less<std::string >,std::allocator<std::pair<std::string const,std::string > > > const &' What I am trying to achieve is a dictionary comprised of file paths that I can then check in nuke. Can anyone shed any light on this? thanks
×