Jozvex
02-26-2003, 06:16 AM
Hi guys,
I've been trying (for about 2-3 hours) to make myself a script that'll open up a colour palette for changing the perspective camera's environment colour. Unfortunately I got 90% of the way there in 10 minutes, but keep getting the same error no matter what I do. Here's the script:
_____________________________________________
float $chosenEnvColour[];
colorEditor;
if (`colorEditor -q -result` > 0)
{
$chosenEnvColour = `colorEditor -q -rgb`;
setAttr perspShape.backgroundColor -type double3 chosenEnvColour;
}
else
print "Colour was cancelled";
________________________________________________
The error I get it:
// Error: Error reading data element number 3: //
But, if I use 'print' to print the 'setAttr' line out it gives the right command to change the colour, because you can copy it and run it from the command line.
Any help would be very much appreciated! :hmm:
I've been trying (for about 2-3 hours) to make myself a script that'll open up a colour palette for changing the perspective camera's environment colour. Unfortunately I got 90% of the way there in 10 minutes, but keep getting the same error no matter what I do. Here's the script:
_____________________________________________
float $chosenEnvColour[];
colorEditor;
if (`colorEditor -q -result` > 0)
{
$chosenEnvColour = `colorEditor -q -rgb`;
setAttr perspShape.backgroundColor -type double3 chosenEnvColour;
}
else
print "Colour was cancelled";
________________________________________________
The error I get it:
// Error: Error reading data element number 3: //
But, if I use 'print' to print the 'setAttr' line out it gives the right command to change the colour, because you can copy it and run it from the command line.
Any help would be very much appreciated! :hmm:
