I have 3 channel ramps that I am trying to get values from with a vex function.
Using the same code for each ramp however only lets me get values from one ramp.
If someone can spot what I may be obviously overlooking, it's appreciated.
The original problem is from a project where the function is in an external file and referenced with an include statement.
In the file I am attaching, it is a stripped down version of that function and defined/declared directly in the wrangle of the hip file.
I've double checked the names of the ramps and looked to see in the Parameter Edit Interface if there was some setting different between the different ramps.
Other than playing around with the sliders to input different values( which consequently give no results) I don't see anything different between all three ramps.
The only ramp I can get values from is the one named “red”.
Here's the code ( maybe it's obvious with the code and the file doesn't need looking at ):
//************************
// Function Declare/Define
//************************
function void Color_Ramp_Channels( int Number_Of_Points; string Imported_Red, Imported_Green, Imported_Blue)
{
int Count;
float F_Red, F_Green, F_Blue;
vector V_Color;
for(Count = 0; Count < Number_Of_Points; Count++)
{
F_Red = efit(float(Count), 0.0, Number_Of_Points, 0.0, 1.0);
F_Red = chramp( Imported_Red, F_Red) ;
F_Green = efit(float(Count), 0.0, Number_Of_Points, 0.0, 1.0);
F_Green = chramp( Imported_Green, F_Green) ;
F_Blue = efit(float(Count), 0.0, Number_Of_Points, 0.0, 1.0);
F_Blue = chramp( Imported_Blue, F_Blue) ;
V_Color = set(F_Red, F_Green, F_Blue);
setpointattrib(geoself(), "Cd", Count, V_Color, "set");
}
}
//************************ Code Start ***************************
int Total_Points;
Total_Points = npoints(geoself());
Color_Ramp_Channels(Total_Points, "red", "green", "blue");
Thanks