Jump to content

pabcou

Members
  • Content count

    10
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

8 Neutral

About pabcou

  • Rank
    Peon

Contact Methods

  • Website URL
    https://nohyphen.artstation.com/

Personal Information

  • Name
    Pablo Couto
  • Location
    A Estrada, Spain
  1. Houdini 19 Wishlist

    I have this in my scripts/456.py file, maybe it works for you?: hou.setSimulationEnabled(False)
  2. Houdini 19 Wishlist

    I was going to suggest Vim-style navigation shortcuts for the text editor, but then I thought, why stop there? Let's have the option of running Vim embedded in text fields; with syntax highlighting, autocompletion, etc.
  3. Sorry, I didn't realize that it doesn't reset rotation (perhaps it should?). It may work better to reattach the handle and then toggle Follow Group on the same menu.
  4. RMB on the viewport to open the tool context menu, then select Visualize Texture > Off.
  5. learning foreach loop in vex

    Thank you for pointing this out, Tomas. It turns out it can be simplified. I've just learned about the `uniquevals` function, which, per the docs, "returns the set of unique values across all values for an int or string attribute." So it seems like a direct answer to your original question. Using it, you can get rid of all the code in my previous post, and instead put this in a Detail Wrangle: int class[] = uniquevals(0, 'prim', 'class'); foreach(int elem; class) { vector Cd = rand(elem); int prims[] = findattribval(0, 'prim', 'class', elem); foreach(int prim; prims) { setprimattrib(0, 'Cd', prim, Cd); } }
  6. learning foreach loop in vex

    This, in a detail wrangle, will do it; although as you'll see it's quite a roundabout way to work: // Construct `class` array from the prim attribute. int class[], primclass; for(int primnum = 0; primnum < nprimitives(0); primnum++) { primclass = prim(0, 'class', primnum); push(class, primclass); } // Construct `class_uniques` array from `class` without duplicates. int class_uniques[], count = 0; if (len(class)) { // Proceed only if the array is non-empty. class = sort(class); // Add the first element, so we have something to compare against below. push(class_uniques, class[0]); count++; foreach(int elem; class[1:]) { // For each, leaving the first element out. // If the current element is different from the preceding one, add it. if (elem != class_uniques[count-1]) { push(class_uniques, elem); count++; } } } i[]@class_uniques = class_uniques; Instead of doing this, I would suggest using a For-Each SOP block. It's much simpler, and I assume also more efficient. If you want to have a look, the attached file shows both approaches for setting color by connectivity class. class_to_array__forum.hiplc
  7. Disable Simulations on Startup

    Add these lines to `scripts/456.py`: # Disable simulation updates hou.setSimulationEnabled(False) # Set cook update mode to manual hou.setUpdateMode(hou.updateMode.Manual)
  8. New Color Schemes

    Thank you for sharing them! I find Smoke very pleasing.
  9. I think this may do what you need: 1. Template the reference geometry (in your case, the line) 2. Select the Transform SOP and display the handle 3. Enter Pivot Mode [Ins] 4. Start Orientation Picking [;] 5. RMB on the Viewport > "Use Extended Mode" 6. Determine which two points (P, Q) on the reference geo will define the Z axis of the pivot (the pivot will be placed on P) 7. Shift-LMB on the Q point, then LMB on the P point 8. Exit Pivot Mode [Ins]
×