Search the Community
Showing results for tags 'conversion'.
-
i@iterations = len(chs("../NETWORK_CONTROLLER/c2p_querstrbn")); s@myArray = chs("../NETWORK_CONTROLLER/c2p_querstrbn"); i[]@myintArray = {}; s[]@mystrArray = {}; //remove spaces from string array, get len() of string array if (i@iterations >2) { i@iterations += 1; i@iterations /= 2; } //create arrays from preselection int i; for(i=0; i < i@iterations*2; i++) { i@stringtointeger = atoi(s@myArray[i]); append(i@myintArray, i@stringtointeger); } // remove spaces from int Array i[]@cleanArray = i@myintArray[0::2]; // convert back to string to read in with copy to points target points later for(i=0; i < i@iterations; i++) { s@integertostring = itoa(s@mystrArray[i]); append(i@mystrArray, s@integertostring); } hey all, vex noob here. I am trying to append values from an integer array to a string array. looping over array entries with atoi works fine to extract the strings and append them to an int array. but the other way around using itoa gives me this error: Warning: Errors or warnings encountered during VEX compile: /obj/geo1/pointwrangle4/attribvop1/snippet1: Call to undefined array index operator 'int string[][int]'. (33,53). Error: Error in VOP 'snippet1'. Warning: Errors or warnings encountered during VEX compile: /obj/geo1/pointwrangle4/attribvop1/snippet1: Call to undefined array index operator 'int string[][int]'. (33,53). Error: Vex error: /obj/geo1/pointwrangle4/attribvop1/snippet1: Call to undefined array index operator 'int string[][int]'. (33,53) i'll try to sum up the context quickly: I have a controller node where I can enter the points I want to copy objects to. now when I copy to point 0 1 2 3, another copy node should copy other objects to points 4 5 6 7. when I enter 0 1 2, the other copy should go to 3 4 5 etc.
-
Hi everyone, I am trying to convert a displacement map from tif to rat with iconvert. I am getting some weird results and I am hoping anyone here might be able to tell me what the actual problem is. In the image you can see the different results I am getting. Only the original tif gives me the results I want. 8 bit is wrong of course but I thought I'd still include it. I am using the classic shader in Houdini 16. Thanks in advance
-
- conversion
- rat
-
(and 3 more)
Tagged with:
-
Hi So basically I have a certain float value, lets say 3.68, and I want to get the digits before the comma (there are no functions that rounds to the lowest integer), so that I can later use that in some math operations. I know I can use split() to split to the point, and sprintf() to convert to string, but I cant get this last function to work, for example if I wrote float _x = sprintf("%g",3.68); But this gives me an error... Anyone knows how to convert to string and back to the original variable type? Thanks