VEX Types
// // // // VEX types float f@name vector2 (2 floats) u@name vector (3 floats) v@name vector4 (4 floats) p@name int i@name matrix2 (2×2 floats) 2@name matrix3 (3×3 floats) 3@name
Technical Art & Games
// // // // VEX types float f@name vector2 (2 floats) u@name vector (3 floats) v@name vector4 (4 floats) p@name int i@name matrix2 (2×2 floats) 2@name matrix3 (3×3 floats) 3@name
// // // //DICTIONARY int arr[] = {1,2,4}; dict elements; elements[‘lort’] = arr; if(isvalidindex(elements, ‘lort’) == 1) { int arra[] = elements[‘lort’]; i@lort = arra[2]; }
# # # #Create Parameter def setIterations(kwargs): node = kwargs[‘node’] idx = hou.parm(node.path()+’/noiseType’).eval() iterations = hou.parm(node.path()+’/Parms/numTypeVariations’).eval()[str(idx)] iteParm = hou.parm(node.path()+’/iterations’) iteParm.set(iterations) #create items and labels for the drop down menu labels
int f = 1; if (ch(‘../dispMirror’) == 1) f = -1; //DISPLACE POINTS vector a; if (@ptnum == 0) { a = normalize(point(0, "P", @ptnum+1) – point(0, "P", @ptnum)); }
//loopp through verts and break up the shit if(ch(‘../limitVerts’) == 1) { int numVerts = primvertexcount(0, @primnum); if(numVerts > 2) { for(int i = 2; i<numVerts; i++) { //store vertex
//break the primitives into shorter lines //each prim will only contain 2 vertices (option) limitVerts for (int i = 0; i<@numprim; i++) { int numVerticies = primvertexcount(0, i); int vtxPrim
//put mirrored prims into a new group (name from string parameter) string grpName = ch("../outGrpName"); int val; if(grpName != "") { val = i@mirror – prim(1, "mirror", @primnum); } else
//Mark all prims from the source groups with mirror=1 string grpName = ch("../inGrpName"); i@mirror = inprimgroup(0, grpName, @primnum);
# # # #Traverses a network of linked nodes top-down def getBoneNamesFromRoot(in_srcRoot): #input root and traverse linked structure and extract all bone names bones = [] bones = traverseOutputs(in_srcRoot, 0,
// // // //Worley Noise float dist1,dist2; float freq = 8; vector offset = set(0,0,0); int seed = 666; wnoise(@P * freq+offset, seed, dist1, dist2); @Cd = dist1;