Sorry to bump this post but I am in a similar scenario where I need to copy channels from multiple vertex sets into a new set.
Basically I have a bunch of selected objects where I need to copy the R Channel from "Set1", into the R Channel of color set "Master". Then I need to copy the R Channel from "Set2" into the G Channel of "Master. Then I need need to copy the R Channel from "Set3" into the B channel of "Master. And finally the R Channel of "Set4" into the A Channel of "Master"
I don't know scripting and just tried to pick apart what was above. This doesnt give me any syntax errors but seems to just give a solid color to my Master color set.
polyColorSet -currentColorSet -colorSet "Set1";
float $red[] = `polyColorPerVertex -q -r`;
polyColorSet -currentColorSet -colorSet "Master";
polyColorPerVertex -r $red[0];
polyColorSet -currentColorSet -colorSet "Set2";
float $green[] = `polyColorPerVertex -q -r`;
polyColorSet -currentColorSet -colorSet "Master";
polyColorPerVertex -g $green[0];
polyColorSet -currentColorSet -colorSet "Set3";
float $blue[] = `polyColorPerVertex -q -r`;
polyColorSet -currentColorSet -colorSet "Master";
polyColorPerVertex -b $blue[0];
polyColorSet -currentColorSet -colorSet "Set4";
float $alpha[] = `polyColorPerVertex -q -r`;
polyColorSet -currentColorSet -colorSet "Master";
polyColorPerVertex -a $alpha[0];
Help is much appreciated!