Search the Community
Showing results for tags 'button'.
-
Hi, I'd need to customize the behaviour of the default buttons of some nodes, e.g. - display a custom message when I press "Save to Disk" on a rop_alembic. Also, I want the script to run for all the users in my studio. Maybe should I create a preset from this and save it in the shared HOUDINI_PATH? Beyond the fact I'm not sure how to do it on a custom buttom I may create in the parameter interface, all the default parameters are locked. Can someone help me? thanks
-
Hi all! I had a bit of a question re scripting selections. Ive been using the excellent soputils.selectGroupParm() in a few of my tools but Ive recently needed the ability to select objects in a similar way. Ive done some looking into it and there doesn't seem to be a simple way to get an object selection state in a viewport after clicking an action button. Does anyone know how one would go about implementing like this or is it going to be a case of learning how the python state system works (I wouldnt know where to start with it right now). The image demonstrates what Im trying to achieve. You click the little arrow and the viewer enters an object/geo selection mode (similar to selectGroupParm) and on completion it returns a list of object node paths. Thanks!
-
Hello everyone, I'm new to python and perhaps learning it in combination with Houdini may not be the perfect way to go for a newbie but here I am. So I get this error when trying to execute my code from a button: Traceback (most recent call last): File "Sop/STEGG_TEST/bt_execute", line 1, in <module> File "Sop/STEGG_TEST, PythonModule", line 135, in main File "Sop/STEGG_TEST, PythonModule", line 98, in encode File "Sop/STEGG_TEST, PythonModule", line 71, in encode_enc File "Sop/STEGG_TEST, PythonModule", line 31, in modPix AttributeError: 'iterator' object has no attribute '__next__' I'm not sure what this error means. I tried running the code outside Houdini, and the only difference was that as a standalone, it's not getting the input from the input fields I have in the UI so I had to type them myself. The rest all worked fine. I'm not exactly sure how to go about this, should I upload the code I'm trying to run, as well as a version of the HDA I'm trying to make? I'm mainly interested in what this error means and why it only pops up in Houdini but not when I run externally.
-
Hey there! Im developing some HDA´s for my Bachelor Project! My actual Problem is about the Action Button for a Prim Group Selection. Right now im running the standart Action Button script below: import soputils kwargs['geometrytype'] = (hou.geometryType.Primitives,) kwargs['inputindex'] = 0 soputils.selectGroupParm(kwargs) But, of course it does refer to the Node above the Subnet. My question is: How can i refer to the Node above the Selction Node inside the Subnet ? Is it a Python Callback Script or is it something below the Action Button ? Thank you very much Max
-
Hello! You know how shelf tools allow you to interact with the viewport? I want to do something similar like that for an HDA. I want when a button is clicked, cross hairs show up that allow the user to place points that will snap to the input geometry. What are some good resources that show how to do something like that? Thanks, ER
-
Hello everyone! I was wondering if it's possible to temporarely activate one side of a node-tree to do some texture baking via a button on the UI of a digital asset? Once the baking is done, this part of the tree should stop cooking. In a nutshell, i wanna be able to create a procedural model and once it's done, just hit a button to bake out textures (depending on the model) I'd like to try this in Unreal so my idea was to have digital asset in UE4, adjust some parameters to create a variation of my model and hit a button to generate the textures (curvature, normals from HP/LP, you name it..) which i can then import into the engine and use on materials. If i need to change the model I wanna do adjustments, rebake textures and refresh them in UE4. Is this possible? And if yes, can someone point me in the right direction? Thanks in advance! Ron
-
How do I create a button for the undo command?
Douglas Teixeira de Abreu posted a topic in Scripting
Hello Everyone. How do I create a button for the undo command? Using a Python Script and hou.undos.performUndo() Note: On Python Source Editor the code work, but on Script Shelf not. error msg <Cannot undo within an undo group> How use hou.UndosGroup https://www.sidefx.com/docs/houdini/hom/hou/undos.html VideoCase https://drive.google.com/file/d/1-m38aiA50QPuSs75Pe9kiVOs7nMbg3XY/view -
Hello dear community, I am having trouble scripting a second button on my hda. Both functions for the two buttons have been defined in the OnCreate callback in the scripts tab. While the first one is working fine, clicking the second one throws an error, saying the function or attribute defined in the parameter settings is not available. The callback-parameter for the first button has the value: kwargs["node"].hdaModule().OnCreateCurveButtonPressed() The second one has the parameter: kwargs["node"].hdaModule().OnCreateSectorsButtonPressed() And this is the error message that the console throws: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.607/houdini/python2.7libs\hou.py", line 23413, in __getattr__ def _SIDEEF_getattr__(*args): return _hou.HDAModule___getattr__(*args) AttributeError: 'module' object has no attribute 'OnCreateSectorsButtonPressed' Does anybody know whats causing this?
-
python using a button to call a python function
Adam Ferestad posted a topic in General Houdini Questions
I am writing a node that will output some data that I am calculating as a mapped PNG file. The file takes a minute to execute, and it will only be getting worse as I increase its complexity, so I am wanting to set up the node so that I can trigger the code when I want it to run. I tried calling the function in the callback on the button, which is how I would expect it to work, but it doesn't apparently. I have looked around and found several people talking about hitting buttons automatically in the script, which is really not what I am looking for. So what am I missing in using a button in a UI?