KeyframeRGB MEL

From scripting
Jump to: navigation, search
global proc KeyframeRGB(float $RVal, float $GVal, float $BVal, float $TimeVal, string $MatName) {
	if ($RVal != -1) {
		setKeyframe -at ("colorR") -v $RVal -t $TimeVal $MatName;
	}
	if ($RVal != -1) {
		setKeyframe -at ("colorG") -v $GVal -t $TimeVal $MatName;
	}
	if ($RVal != -1) {
		setKeyframe -at ("colorB") -v $BVal -t $TimeVal $MatName;
	}
}


More information on attribute keyframing, read pages 119-122 in YSYT. For information on Maya materials, look at Chapter 12 in YSYT.