Jump to content

pelos

Members
  • Content count

    114
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by pelos

  1. dealing with ramp using python

    thanks for the example, very easy to set up a ramp parameter with python
  2. just needed to change the node and vuala! super thanks!
  3. i am creating a attribute wrangler and will create 2 params, from the UI i can click that little icon and will create it for me, super easy. I did try to to grab the param and press "push button" h=hou.node('/obj/box1_Grooming/pointwrangle_width') ex=h.parm("exportlist") hou.Parm exportlist in /obj/box1_Grooming/pointwrangle_width> ex.pressButton() but nothing happen =( i inspect the button via "edit parameter interface" to see if there was a code or a callback attach to it,but didnt find anything... =( how could i create those params?
  4. how.pwd() on created otl

    i am doing an otl and i want to get its path when i put down the node to grab some parms. the idea is once its been drop in the network editor, will read if there is a camera node, if there is one, put that camera in the otl path parm. in the script tab i am doing a "on created" i am doing print hou.pwd() but once i TAB select the otl and drop it, it print "obj" and not the actual node. if i put a spare parm button that print hou.pwd() it does print the node correctly. is there something special on created that i need to know? or a diferent type of code? Thanks guys.
  5. I will try the use current frame, lag chop and jiggle I clicked timeslice checkbox, thanks =)
  6. I am working grooming some curves/hairs and all the way below the chain is a chop node with noise inside a subnet, even do I bypass the subnet, every time I change something takes forever since the chops cook even do that I think they are off/bypass, all the frames =( is there a way to really by pass chops or just let them cook by frame so the scene??? is kinda annoying =(
  7. I have a parameter in my node that I want to convert to use python, usually we can right click> expression >change language to python but for some reason is gray out =( and reading documentation I could do parm.setExpression("2+2". language=Something) but I thought using hou.lenguage.Python as argument but wants a value? do we have something like parm.setScriptLenguage? or an easy way to switch all the node to use python, or just that parameter?
  8. make a parm use python instead hscript

    if I do something like exp = """ node = hou.pwd() geo = node.geometry() prim0 = geo.prim(0) return len(prim0.points()) """ attribvop_node.parm("num_points_per_line").setExpression(exp, hou.exprLanguage.Python) now it works =) in the UI shows purple, and not green I think is because just that parm is python and the rest are hscript. thanks =)!!!! (go to sleep is 1 am)
  9. since I needed in a parameter I did python node = hou.pwd() geo = node.geometry() prim0 = geo.prim(0) return len(prim0.points())
  10. I can use npoints("../sop") but that count ALL the points, is there a way to just count the points on the first primitive?
  11. interesting I am running it on a series of curves/hairs and I just get 1 as result, my hairs have 10 points each, vertex are been consider different as points in this case?
  12. interesting how the groups as are also consider an attribute, was expecting an especial function for getting all the groups that a points is in.
  13. i am creating a point in between 2 points and i want to transfer all the attributes to this new point, is there a way to find all the attributes that are in a point? like a list/array ["Cd", "P", "N"...] thanks =)
  14. mmm sometimes i think the vex datatypes are very limited, i was expecting to get a list of classes such [ pointclass1, pointclass2, ] that later on with .notation i could get properties like the size, type, name etc.. (something i like a to work with python more than vex) thanks for sharing the snippet, i appreciate it =)
  15. how to add a point between 2 points in vex

    aja, need to move the first point from the origin =) vector one = point(0, "P", 0); vector two = point(1, "P", 0); vector newpoint = (two-one)*ch("perc"); addpoint(geoself(), newpoint+one);
  16. I have a point {0,0,0} and another one in {1,0,0} how can I add one or more points (equidistant) between this 2 points? I know I can use addpoint({.5, 0,0}) but how can I get the new position? should I delete the first P with the second? or there is an function for that? thanks =)
  17. how to add a point between 2 points in vex

    this is strange I am know the math should be right, but it seems vex evaluation from 0,0,0? why is that? I even put a slider so I can see the point moving from point A to point B but it does it from 0,0,0? is that suppose to be like that? between_points.hip
  18. Python's multiprocessing

    what about using popen? you could have 2 scripts one that runs in Houdini and calls the second one, that way you can tell to open any program on the back, in this case python running what you need and returning it to the first script. (pseudocode) in the main script: results = [] for I in list: bla = popopen("python /path/to/second/script", stdout=pipeline, stderr=pipeline) std, sterr = bla.communicate() results.append(std) print results this will open pythons on the back and return what was printed, you could also do the second scripts to export the information to txt files and then have a way to read back form that txt
  19. array attribute not showing in python node

    aja! magic! thanks Bandu
  20. Creating an array attribute (just putting nearpoints from vex into an attribute) [0,1,2,3,4,5......] but I want to be able to retrieve that, so in python using when I use geo.points[0].attribValue("near_points") just return 0, I was expecting the actual array that I can see on geometry spreadsheet, is there a different function to get the array? or there is some secret magic somewhere? here is the hip file, thanks guys =) near_points_add_upload.hip
  21. how to add a point between 2 points in vex

    that's what I was missing the division! lol thanks!!!I was hitting my head against the wall this time. thanks!
  22. near point not working?

    thanks! that's smart =)
  23. I am starting to use the nearpoint expression but I don't think is working properly, here is an example, I just want to know how is the closest point, here is an example file with 3 points, but the attribute say -1, why is that ? near_expression_not_working.hip
  24. pycharm and hou

    i am trying to set up the hou module in pycharm, so i added to the path of python2.7libs project structure and this is what i get. import _hou ImportError: DLL load failed: The specified module could not be found. i am trying to find the _hou any one got something similar?
  25. Referenced Ramp Parameters

    can you explain how you set it up? i am trying to link 2 ramps with it, but i got stuck =( this is what i did: opmultiparm /obj/outside_ramp/outside_ramp /obj/outside_ramp/inside_ramp/inside_ramp
×