Hello,
Okay, over that past few days I've learned and have about 90% of the plug in together. I need some help with the while do loop for readin a tab delimited file. I'm not sure of the syntax. Any help would be appreciated
Here is what I have so far:
While not EOF FName2 do
(
NewMatName = readDelimitedstring FName2 "\t" as string
NewRed = readDelimitedstring FName2 "\t" as float
NewGreen = readDelimitedstring FName2 "\t" as float
NewBlue = readDelimitedstring FName2 "\t" as float
--Change Material
CurrentMat.name = MatName + ": " + NewMatName -- Rename New material
CurrentMat.Ambient = (Color NewRed NewGreen NewBlue)
CurrentMat.Diffuse = (Color NewRed NewGreen NewBlue)
CurrentMat.Specular = (Color NewRed NewGreen NewBlue)
-- Add material to Library
append currentMaterialLibrary CurrentMat
-- Reset Variables
CurrentMat.name = MatName
NewRed = 0
NewGreen = 0
NewBlue = 0
)
Here is the error I'm getting
MAXScript Rollout Handler Exception: -- Unable to convert: undefined to type: Float <<
It on the line where I use CurrentMat.Ambient - (color NewRed NewGreen NewBlue)