Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

5 Neutral

About sant0s81

  • Rank

Personal Information

  • Name
    salomon santos
  • Location
  1. Instance random keyframe/animation with Python

    Hey @Atom Yeah, I also found some solutions for random instance with offset animation and it works. Its more for learning purpose to understand python. Lots of the stuff I am just doing in Python is probably total nonsense and quicker in VEX or just with nodes. And good to know about the single threaded siatuation, makes sense! Thanks for the example scene, works perfect and quick.
  2. Code behind a menu item

    What kinda menu items do you mean?
  3. Instance random keyframe/animation with Python

    I made some progress with that random code. Does that look okay or total messed up code? Are ther better ways to do that? Thanks! range_randomize_and_retime_instance_with_animation_v1a.hdalc range_randomize_retime_isntances_with_animations_v001.hiplc
  4. some UI scripting questions

    I dont know what you mean with programatically - but do you mean, how you can talk with python to the distance parameter in Extrude SOP? You mean something like this? def extrude_dist(dist): set_dist = hou.parm('/obj/Create_Project/polyextrude1/dist').set(dist) return(set_dist) distance = 7 extrude_dist(distance)
  5. Code behind a menu item

    from here, quoted from crydalch: Thats to see the events or something... I think. In the shelf you can right click and "edit tool" - than under script you sometimes see code edit: ohh... and I just found out, you can click and drag a node into a shelf, you also get lots of infos by right clicking on it. maybe there you find some infos.
  6. Instance random keyframe/animation with Python

    I made some progress, still with problems The plan now is to find a way in python, to randomize a range of frames and output that in a timeshift. So far I have that: import random def retime_frames(): # values from dropdown tokens fr_get = hou.evalParm('choose_frame_set') for frX in range(fr_get): fRandom = (random.choice(frX)) hou.parm('retime_frame').set(str(fRandom)) print fRandom It gives me an error, that something with my strings is not okay. A working version with a list inside is that: def retime_frames(): random_num = ['1', '2', '3', '4', '5'] fRandom = (random.choice(random_num)) frame = hou.parm('retime_frame').set(str(fRandom)) return fRandom As soon as I try to use a variable inside the list or create a range function, it does not work anymore. range_randomize_retime_isntances_with_animations_v001.hiplc range_randomize_and_retime_instance_with_animation_v1a.hdalc
  7. Hey, is there a way to change the color of Parameter Buttons in Houdini with python? Is "tkinter" working in houdini python? Thank you!
  8. Good morning, since I deeply fall in love with python, I would like to know where it makes sense to use Python or better VEX. I have a cube, that has on each frame from 1-10 a random rotation keyframed. Now I would like to copy/scatter these cube as a instance on a grid, but of course each cube should use a random animation of that 10 keyframes. Does that make sense in Python? And how would I start or what do I have to look for? I also would like to specify that I only use a range of keyframes. Lets say frames 1-5 have only rotation in x, frames 6-10 have rotation on y. My first thougts are: def pose_1_5_x(): keyframes_x = hou.parmTuple('/obj/box_object1/box1/r') for frame in range(1, keyframes_x 1): frames = (get all keyframes) retime = frames (set all keyframes to frame 1) etc etc etc ^^ But I guess, thats total bullshit I know, probably its more easy doing that in VEX or with for each - but would like to understand how to do that with Python. Thanks alot!
  9. [Solved] Python ordered Menu in new Folder and Labels

    Found the solution I had to change the Ordered Menu to String. Running all fine now. I added the files if someone wanna check out and maybe improve create_project_v002.hdalc create_project_v002.hiplc
  10. Hey, sry for asking again... I did lots of tutorials about python basisc the last days and I get more into it. I had a running "Create folders Script" working and right now I try to move all the code into an HDA / Python Modul. But suddenly I dont get the labels of my ordered menu and also the numbers dont start from 1, but from 0... The only thing I actually did, was to copy the code from the NULL into the HDA Module and the parameters are in a subfolder to get more order inside the HDA. The others functions work just fine and do as they should - just the "create_project_folders" function doesnt work. Is there some syntax or logical problem? Thx edit: Scene/HDA files added. create_project_v001.hdalc create_project_v001.hiplc
  11. I am just trying parameters from the Redshift_ROP. They also use the Multiparm Block (list) to choose the different AOVs. In the Redshift_ROP, as soon as I choose an AOV like Diffuse, the string textblock changes the name to Diffuse, too. I copied these parameters to see what they did. But as soon as I copy the parameters to my new geometry, the text stays on the default value and is not changing automaticly. Is there something missing? I add the hip below. create_folders_v001c.hiplc
  12. I did some research and I think I have to give a callback script to each toggle parameter, to send the parameters name. Is that the right direction? Something like transfering each toggle parameter into a function that reacts on the callback script. Dont even find words what I wanna do, sry
  13. Morning have one more question: I would like to use toggles to pass over the names to os.makedirs . But whatever I do, I never get the marked toggles and always only the first. I understand, that the "Multiparm Blocklist" has an ID - but when I change the Folder Type to simple, I have no idea how to pass over the toggles since there is no more ID. And something else I wonder how to do that: how could I create a list of folder presets and pass them over? Thanks alot! edit: In this line here I dont know, how to choose all parameters instead of "folder" hou.evalParm('../null/folder'+str(idx)))) Of course "folder" is wrong - but I tried stuff like "*" to choose all. But of course, not working
  14. Get values of parms from within python module

    I am not 100% sure, but it sounds quite similar to my question. Check here:
  15. Thank you very much again @gemini Just to finish the topic: I modified the code a bit to add a path an project name. I dont know if that is the best way. If I can optimize the code, would like to know how Thx alot, sant0s