Cleanup: indentation
This commit is contained in:
@@ -391,17 +391,17 @@ static int StrokeAttribute_mathutils_get(BaseMathObject *bmo, int subtype)
|
||||
{
|
||||
BPy_StrokeAttribute *self = (BPy_StrokeAttribute *)bmo->cb_user;
|
||||
switch (subtype) {
|
||||
case MATHUTILS_SUBTYPE_COLOR:
|
||||
bmo->data[0] = self->sa->getColorR();
|
||||
bmo->data[1] = self->sa->getColorG();
|
||||
bmo->data[2] = self->sa->getColorB();
|
||||
break;
|
||||
case MATHUTILS_SUBTYPE_THICKNESS:
|
||||
bmo->data[0] = self->sa->getThicknessR();
|
||||
bmo->data[1] = self->sa->getThicknessL();
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
case MATHUTILS_SUBTYPE_COLOR:
|
||||
bmo->data[0] = self->sa->getColorR();
|
||||
bmo->data[1] = self->sa->getColorG();
|
||||
bmo->data[2] = self->sa->getColorB();
|
||||
break;
|
||||
case MATHUTILS_SUBTYPE_THICKNESS:
|
||||
bmo->data[0] = self->sa->getThicknessR();
|
||||
bmo->data[1] = self->sa->getThicknessL();
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -410,14 +410,14 @@ static int StrokeAttribute_mathutils_set(BaseMathObject *bmo, int subtype)
|
||||
{
|
||||
BPy_StrokeAttribute *self = (BPy_StrokeAttribute *)bmo->cb_user;
|
||||
switch (subtype) {
|
||||
case MATHUTILS_SUBTYPE_COLOR:
|
||||
self->sa->setColor(bmo->data[0], bmo->data[1], bmo->data[2]);
|
||||
break;
|
||||
case MATHUTILS_SUBTYPE_THICKNESS:
|
||||
self->sa->setThickness(bmo->data[0], bmo->data[1]);
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
case MATHUTILS_SUBTYPE_COLOR:
|
||||
self->sa->setColor(bmo->data[0], bmo->data[1], bmo->data[2]);
|
||||
break;
|
||||
case MATHUTILS_SUBTYPE_THICKNESS:
|
||||
self->sa->setThickness(bmo->data[0], bmo->data[1]);
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -426,25 +426,25 @@ static int StrokeAttribute_mathutils_get_index(BaseMathObject *bmo, int subtype,
|
||||
{
|
||||
BPy_StrokeAttribute *self = (BPy_StrokeAttribute *)bmo->cb_user;
|
||||
switch (subtype) {
|
||||
case MATHUTILS_SUBTYPE_COLOR:
|
||||
switch (index) {
|
||||
case 0: bmo->data[0] = self->sa->getColorR(); break;
|
||||
case 1: bmo->data[1] = self->sa->getColorG(); break;
|
||||
case 2: bmo->data[2] = self->sa->getColorB(); break;
|
||||
case MATHUTILS_SUBTYPE_COLOR:
|
||||
switch (index) {
|
||||
case 0: bmo->data[0] = self->sa->getColorR(); break;
|
||||
case 1: bmo->data[1] = self->sa->getColorG(); break;
|
||||
case 2: bmo->data[2] = self->sa->getColorB(); break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
case MATHUTILS_SUBTYPE_THICKNESS:
|
||||
switch (index) {
|
||||
case 0: bmo->data[0] = self->sa->getThicknessR(); break;
|
||||
case 1: bmo->data[1] = self->sa->getThicknessL(); break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
case MATHUTILS_SUBTYPE_THICKNESS:
|
||||
switch (index) {
|
||||
case 0: bmo->data[0] = self->sa->getThicknessR(); break;
|
||||
case 1: bmo->data[1] = self->sa->getThicknessL(); break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -453,23 +453,23 @@ static int StrokeAttribute_mathutils_set_index(BaseMathObject *bmo, int subtype,
|
||||
{
|
||||
BPy_StrokeAttribute *self = (BPy_StrokeAttribute *)bmo->cb_user;
|
||||
switch (subtype) {
|
||||
case MATHUTILS_SUBTYPE_COLOR:
|
||||
{
|
||||
float r = (index == 0) ? bmo->data[0] : self->sa->getColorR();
|
||||
float g = (index == 1) ? bmo->data[1] : self->sa->getColorG();
|
||||
float b = (index == 2) ? bmo->data[2] : self->sa->getColorB();
|
||||
self->sa->setColor(r, g, b);
|
||||
}
|
||||
break;
|
||||
case MATHUTILS_SUBTYPE_THICKNESS:
|
||||
{
|
||||
float tr = (index == 0) ? bmo->data[0] : self->sa->getThicknessR();
|
||||
float tl = (index == 1) ? bmo->data[1] : self->sa->getThicknessL();
|
||||
self->sa->setThickness(tr, tl);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
case MATHUTILS_SUBTYPE_COLOR:
|
||||
{
|
||||
float r = (index == 0) ? bmo->data[0] : self->sa->getColorR();
|
||||
float g = (index == 1) ? bmo->data[1] : self->sa->getColorG();
|
||||
float b = (index == 2) ? bmo->data[2] : self->sa->getColorB();
|
||||
self->sa->setColor(r, g, b);
|
||||
}
|
||||
break;
|
||||
case MATHUTILS_SUBTYPE_THICKNESS:
|
||||
{
|
||||
float tr = (index == 0) ? bmo->data[0] : self->sa->getThicknessR();
|
||||
float tl = (index == 1) ? bmo->data[1] : self->sa->getThicknessL();
|
||||
self->sa->setThickness(tr, tl);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user