I like the way one can program in Maya, but it would be nice if it could tell me where the errors are.
Code:
string $nextline; string $fileName = "......\\GOL.TXT"; if ( frame == 0 ) { //open file $fileID = `fopen $fileName "r"`; // Init black setAttr (ramp1.colorEntryList[0].colorR) 0; setKeyframe -outTangentType linear -t 0sec (ramp1.colorEntryList[0].colorR); setAttr (ramp1.colorEntryList[0].colorG) 0; setKeyframe -outTangentType linear -t 0sec (ramp1.colorEntryList[0].colorG); setAttr (ramp1.colorEntryList[0].colorB) 0; setKeyframe -outTangentType linear -t 0sec (ramp1.colorEntryList[0].colorB); setAttr (ramp1.colorEntryList[2].colorR) 0; setKeyframe -outTangentType linear -t 0sec (ramp1.colorEntryList[2].colorR); setAttr (ramp1.colorEntryList[2].colorG) 0; setKeyframe -outTangentType linear -t 0sec (ramp1.colorEntryList[2].colorG); setAttr (ramp1.colorEntryList[2].colorB) 0; setKeyframe -outTangentType linear -t 0sec (ramp1.colorEntryList[2].colorB); // first string $nextline = `fgetline $fileID`; while ( size( $nextline )>0 ) { // Get the line string $time = `match "/\* [0-9]+ms \*/" $nextline`; print ( $time ); $nextline = `fgetline $fileID`; } //close file fclose $fileID; }
Code:
// Error: Invalid argument: 0 // // Error: An execution error occured in the expression cameraColors. // // Result: cameraColors //
/Edward