svn merge ^/trunk/blender -r49886:49890

This commit is contained in:
Campbell Barton
2012-08-14 12:18:58 +00:00
3 changed files with 12 additions and 21 deletions

View File

@@ -808,7 +808,7 @@ void assign_material(Object *ob, Material *ma, short act, int assign_type)
}
// Determine the object/mesh linking
if (assign_type == BKE_MAT_ASSIGN_USERPREF && ob->actcol) {
if (assign_type == BKE_MAT_ASSIGN_USERPREF && ob->totcol && ob->actcol) {
/* copy from previous material */
bit = ob->matbits[ob->actcol - 1];
}

View File

@@ -29,10 +29,7 @@ SetColorOperation::SetColorOperation() : NodeOperation()
void SetColorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
output[0] = this->m_channel1;
output[1] = this->m_channel2;
output[2] = this->m_channel3;
output[3] = this->m_channel4;
copy_v4_v4(output, this->m_color);
}
void SetColorOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2])

View File

@@ -31,10 +31,7 @@
*/
class SetColorOperation : public NodeOperation {
private:
float m_channel1;
float m_channel2;
float m_channel3;
float m_channel4;
float m_color[4];
public:
/**
@@ -42,20 +39,17 @@ public:
*/
SetColorOperation();
const float getChannel1() { return this->m_channel1; }
void setChannel1(float value) { this->m_channel1 = value; }
const float getChannel2() { return this->m_channel2; }
void setChannel2(float value) { this->m_channel2 = value; }
const float getChannel3() { return this->m_channel3; }
void setChannel3(float value) { this->m_channel3 = value; }
const float getChannel4() { return this->m_channel4; }
void setChannel4(const float value) { this->m_channel4 = value; }
const float getChannel1() { return this->m_color[0]; }
void setChannel1(float value) { this->m_color[0] = value; }
const float getChannel2() { return this->m_color[1]; }
void setChannel2(float value) { this->m_color[1] = value; }
const float getChannel3() { return this->m_color[2]; }
void setChannel3(float value) { this->m_color[2] = value; }
const float getChannel4() { return this->m_color[3]; }
void setChannel4(const float value) { this->m_color[3] = value; }
void setChannels(const float value[4])
{
this->m_channel1 = value[0];
this->m_channel2 = value[1];
this->m_channel3 = value[2];
this->m_channel4 = value[3];
copy_v4_v4(this->m_color, value);
}
/**