Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-10-22 12:15:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-22 12:15:51 +0400
commitddc2dbc2a47ed2439a62e82ad6fba7d8c9dcae28 (patch)
treea7ca593a96652e6f0a784b5c6e37ab2c35b07159 /source/gameengine/Converter
parent30fd258a0b407419a369fbb2818c49df6b70968e (diff)
style cleanup
Diffstat (limited to 'source/gameengine/Converter')
-rw-r--r--source/gameengine/Converter/BL_ActionActuator.cpp20
-rw-r--r--source/gameengine/Converter/BL_ArmatureChannel.cpp6
-rw-r--r--source/gameengine/Converter/BL_ArmatureConstraint.cpp4
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp84
-rw-r--r--source/gameengine/Converter/BL_MeshDeformer.cpp30
-rw-r--r--source/gameengine/Converter/BL_ShapeActionActuator.cpp4
-rw-r--r--source/gameengine/Converter/KX_BlenderSceneConverter.cpp20
7 files changed, 82 insertions, 86 deletions
diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp
index 4969eae67f2..0bd09146f3a 100644
--- a/source/gameengine/Converter/BL_ActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ActionActuator.cpp
@@ -489,9 +489,9 @@ KX_PYMETHODDEF_DOC(BL_ActionActuator, setChannel,
// for some reason loc.setValue(pchan->loc) fails
if (pchan) {
- pchan->loc[0]= loc[0]; pchan->loc[1]= loc[1]; pchan->loc[2]= loc[2];
- pchan->size[0]= size[0]; pchan->size[1]= size[1]; pchan->size[2]= size[2];
- pchan->quat[0]= quat[3]; pchan->quat[1]= quat[0]; pchan->quat[2]= quat[1]; pchan->quat[3]= quat[2]; /* notice xyzw -> wxyz is intentional */
+ pchan->loc[0] = loc[0]; pchan->loc[1] = loc[1]; pchan->loc[2] = loc[2];
+ pchan->size[0] = size[0]; pchan->size[1] = size[1]; pchan->size[2] = size[2];
+ pchan->quat[0] = quat[3]; pchan->quat[1] = quat[0]; pchan->quat[2] = quat[1]; pchan->quat[3] = quat[2]; /* notice xyzw -> wxyz is intentional */
}
}
@@ -554,13 +554,13 @@ PyAttributeDef BL_ActionActuator::Attributes[] = {
PyObject *BL_ActionActuator::pyattr_get_action(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
- BL_ActionActuator* self= static_cast<BL_ActionActuator*>(self_v);
+ BL_ActionActuator* self = static_cast<BL_ActionActuator*>(self_v);
return PyUnicode_FromString(self->GetAction() ? self->GetAction()->id.name+2 : "");
}
int BL_ActionActuator::pyattr_set_action(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
{
- BL_ActionActuator* self= static_cast<BL_ActionActuator*>(self_v);
+ BL_ActionActuator* self = static_cast<BL_ActionActuator*>(self_v);
if (!PyUnicode_Check(value))
{
@@ -592,7 +592,7 @@ PyObject *BL_ActionActuator::pyattr_get_channel_names(void *self_v, const KX_PYA
return NULL;
#if 0 // XXX To be removed in a later version (first removed in 2.64)
- BL_ActionActuator* self= static_cast<BL_ActionActuator*>(self_v);
+ BL_ActionActuator* self = static_cast<BL_ActionActuator*>(self_v);
PyObject *ret= PyList_New(0);
PyObject *item;
@@ -619,13 +619,13 @@ PyObject *BL_ActionActuator::pyattr_get_channel_names(void *self_v, const KX_PYA
PyObject *BL_ActionActuator::pyattr_get_use_continue(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
- BL_ActionActuator* self= static_cast<BL_ActionActuator*>(self_v);
+ BL_ActionActuator* self = static_cast<BL_ActionActuator*>(self_v);
return PyBool_FromLong(self->m_flag & ACT_FLAG_CONTINUE);
}
int BL_ActionActuator::pyattr_set_use_continue(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
{
- BL_ActionActuator* self= static_cast<BL_ActionActuator*>(self_v);
+ BL_ActionActuator* self = static_cast<BL_ActionActuator*>(self_v);
if (PyObject_IsTrue(value))
self->m_flag |= ACT_FLAG_CONTINUE;
@@ -637,13 +637,13 @@ int BL_ActionActuator::pyattr_set_use_continue(void *self_v, const KX_PYATTRIBUT
PyObject *BL_ActionActuator::pyattr_get_frame(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
- BL_ActionActuator* self= static_cast<BL_ActionActuator*>(self_v);
+ BL_ActionActuator* self = static_cast<BL_ActionActuator*>(self_v);
return PyFloat_FromDouble(((KX_GameObject*)self->m_gameobj)->GetActionFrame(self->m_layer));
}
int BL_ActionActuator::pyattr_set_frame(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
{
- BL_ActionActuator* self= static_cast<BL_ActionActuator*>(self_v);
+ BL_ActionActuator* self = static_cast<BL_ActionActuator*>(self_v);
((KX_GameObject*)self->m_gameobj)->SetActionFrame(self->m_layer, PyFloat_AsDouble(value));
diff --git a/source/gameengine/Converter/BL_ArmatureChannel.cpp b/source/gameengine/Converter/BL_ArmatureChannel.cpp
index 8f5547c337c..7cf895255ba 100644
--- a/source/gameengine/Converter/BL_ArmatureChannel.cpp
+++ b/source/gameengine/Converter/BL_ArmatureChannel.cpp
@@ -149,7 +149,7 @@ PyAttributeDef BL_ArmatureChannel::AttributesPtr[] = {
PyObject *BL_ArmatureChannel::py_attr_getattr(void *self_v, const struct KX_PYATTRIBUTE_DEF *attrdef)
{
- BL_ArmatureChannel* self= static_cast<BL_ArmatureChannel*>(self_v);
+ BL_ArmatureChannel* self = static_cast<BL_ArmatureChannel*>(self_v);
bPoseChannel* channel = self->m_posechannel;
int attr_order = attrdef-Attributes;
@@ -177,7 +177,7 @@ PyObject *BL_ArmatureChannel::py_attr_getattr(void *self_v, const struct KX_PYAT
int BL_ArmatureChannel::py_attr_setattr(void *self_v, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
{
- BL_ArmatureChannel* self= static_cast<BL_ArmatureChannel*>(self_v);
+ BL_ArmatureChannel* self = static_cast<BL_ArmatureChannel*>(self_v);
bPoseChannel* channel = self->m_posechannel;
int attr_order = attrdef-Attributes;
@@ -300,7 +300,7 @@ PyObject *BL_ArmatureChannel::py_attr_get_joint_rotation(void *self_v, const str
int BL_ArmatureChannel::py_attr_set_joint_rotation(void *self_v, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
{
- BL_ArmatureChannel* self= static_cast<BL_ArmatureChannel*>(self_v);
+ BL_ArmatureChannel* self = static_cast<BL_ArmatureChannel*>(self_v);
bPoseChannel* pchan = self->m_posechannel;
PyObject *item;
float joints[3];
diff --git a/source/gameengine/Converter/BL_ArmatureConstraint.cpp b/source/gameengine/Converter/BL_ArmatureConstraint.cpp
index 169205d79e7..b8ad117a220 100644
--- a/source/gameengine/Converter/BL_ArmatureConstraint.cpp
+++ b/source/gameengine/Converter/BL_ArmatureConstraint.cpp
@@ -288,7 +288,7 @@ PyAttributeDef BL_ArmatureConstraint::Attributes[] = {
PyObject *BL_ArmatureConstraint::py_attr_getattr(void *self_v, const struct KX_PYATTRIBUTE_DEF *attrdef)
{
- BL_ArmatureConstraint* self= static_cast<BL_ArmatureConstraint*>(self_v);
+ BL_ArmatureConstraint* self = static_cast<BL_ArmatureConstraint*>(self_v);
bConstraint* constraint = self->m_constraint;
bKinematicConstraint* ikconstraint = (constraint && constraint->type == CONSTRAINT_TYPE_KINEMATIC) ? (bKinematicConstraint*)constraint->data : NULL;
int attr_order = attrdef-Attributes;
@@ -353,7 +353,7 @@ PyObject *BL_ArmatureConstraint::py_attr_getattr(void *self_v, const struct KX_P
int BL_ArmatureConstraint::py_attr_setattr(void *self_v, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
{
- BL_ArmatureConstraint* self= static_cast<BL_ArmatureConstraint*>(self_v);
+ BL_ArmatureConstraint* self = static_cast<BL_ArmatureConstraint*>(self_v);
bConstraint* constraint = self->m_constraint;
bKinematicConstraint* ikconstraint = (constraint && constraint->type == CONSTRAINT_TYPE_KINEMATIC) ? (bKinematicConstraint*)constraint->data : NULL;
int attr_order = attrdef-Attributes;
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index e23fbd57d49..982988cc088 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -626,7 +626,7 @@ static bool ConvertMaterial(
if (!material->cubemap[i]->cube[0])
BL_Texture::SplitEnvMap(material->cubemap[i]);
- material->texname[i]= material->cubemap[i]->ima->id.name;
+ material->texname[i] = material->cubemap[i]->ima->id.name;
material->mapping[i].mapping |= USEENV;
}
}
@@ -777,7 +777,7 @@ static bool ConvertMaterial(
const char *uvName = "", *uv2Name = "";
- uv2[0]= uv2[1]= uv2[2]= uv2[3]= MT_Point2(0.0f, 0.0f);
+ uv2[0] = uv2[1] = uv2[2] = uv2[3] = MT_Point2(0.0f, 0.0f);
/* No material, what to do? let's see what is in the UV and set the material accordingly
* light and visible is always on */
@@ -798,7 +798,7 @@ static bool ConvertMaterial(
material->alphablend = GEMAT_SOLID;
material->tile = 0;
- uv[0]= uv[1]= uv[2]= uv[3]= MT_Point2(0.0f, 0.0f);
+ uv[0] = uv[1] = uv[2] = uv[3] = MT_Point2(0.0f, 0.0f);
}
if (validmat && validface) {
@@ -1389,32 +1389,30 @@ static float my_boundbox_mesh(Mesh *me, float *loc, float *size)
}
if (me->totvert) {
- loc[0]= (min[0]+max[0])/2.0f;
- loc[1]= (min[1]+max[1])/2.0f;
- loc[2]= (min[2]+max[2])/2.0f;
+ loc[0] = (min[0] + max[0]) / 2.0f;
+ loc[1] = (min[1] + max[1]) / 2.0f;
+ loc[2] = (min[2] + max[2]) / 2.0f;
- size[0]= (max[0]-min[0])/2.0f;
- size[1]= (max[1]-min[1])/2.0f;
- size[2]= (max[2]-min[2])/2.0f;
+ size[0] = (max[0] - min[0]) / 2.0f;
+ size[1] = (max[1] - min[1]) / 2.0f;
+ size[2] = (max[2] - min[2]) / 2.0f;
}
else {
- loc[0]= loc[1]= loc[2]= 0.0f;
- size[0]= size[1]= size[2]= 0.0f;
+ loc[0] = loc[1] = loc[2] = 0.0f;
+ size[0] = size[1] = size[2] = 0.0f;
}
- bb->vec[0][0]=bb->vec[1][0]=bb->vec[2][0]=bb->vec[3][0]= loc[0]-size[0];
- bb->vec[4][0]=bb->vec[5][0]=bb->vec[6][0]=bb->vec[7][0]= loc[0]+size[0];
+ bb->vec[0][0] = bb->vec[1][0] = bb->vec[2][0] = bb->vec[3][0] = loc[0]-size[0];
+ bb->vec[4][0] = bb->vec[5][0] = bb->vec[6][0] = bb->vec[7][0] = loc[0]+size[0];
- bb->vec[0][1]=bb->vec[1][1]=bb->vec[4][1]=bb->vec[5][1]= loc[1]-size[1];
- bb->vec[2][1]=bb->vec[3][1]=bb->vec[6][1]=bb->vec[7][1]= loc[1]+size[1];
+ bb->vec[0][1] = bb->vec[1][1] = bb->vec[4][1] = bb->vec[5][1] = loc[1]-size[1];
+ bb->vec[2][1] = bb->vec[3][1] = bb->vec[6][1] = bb->vec[7][1] = loc[1]+size[1];
- bb->vec[0][2]=bb->vec[3][2]=bb->vec[4][2]=bb->vec[7][2]= loc[2]-size[2];
- bb->vec[1][2]=bb->vec[2][2]=bb->vec[5][2]=bb->vec[6][2]= loc[2]+size[2];
+ bb->vec[0][2] = bb->vec[3][2] = bb->vec[4][2] = bb->vec[7][2] = loc[2]-size[2];
+ bb->vec[1][2] = bb->vec[2][2] = bb->vec[5][2] = bb->vec[6][2] = loc[2]+size[2];
return sqrt(radius);
}
-
-
static void my_tex_space_mesh(Mesh *me)
@@ -1437,12 +1435,12 @@ static void my_tex_space_mesh(Mesh *me)
minmax_v3v3_v3(min, max, fp);
}
if (kb->totelem) {
- loc[0]= (min[0]+max[0])/2.0f; loc[1]= (min[1]+max[1])/2.0f; loc[2]= (min[2]+max[2])/2.0f;
- size[0]= (max[0]-min[0])/2.0f; size[1]= (max[1]-min[1])/2.0f; size[2]= (max[2]-min[2])/2.0f;
+ loc[0] = (min[0]+max[0])/2.0f; loc[1] = (min[1]+max[1])/2.0f; loc[2] = (min[2]+max[2])/2.0f;
+ size[0] = (max[0]-min[0])/2.0f; size[1] = (max[1]-min[1])/2.0f; size[2] = (max[2]-min[2])/2.0f;
}
else {
- loc[0]= loc[1]= loc[2]= 0.0;
- size[0]= size[1]= size[2]= 0.0;
+ loc[0] = loc[1] = loc[2] = 0.0;
+ size[0] = size[1] = size[2] = 0.0;
}
}
@@ -1450,19 +1448,19 @@ static void my_tex_space_mesh(Mesh *me)
copy_v3_v3(me->loc, loc);
copy_v3_v3(me->size, size);
- me->rot[0]= me->rot[1]= me->rot[2]= 0.0f;
+ me->rot[0] = me->rot[1] = me->rot[2] = 0.0f;
if (me->size[0] == 0.0f) me->size[0] = 1.0f;
- else if (me->size[0] > 0.0f && me->size[0]< 0.00001f) me->size[0]= 0.00001f;
- else if (me->size[0] < 0.0f && me->size[0]> -0.00001f) me->size[0]= -0.00001f;
+ else if (me->size[0] > 0.0f && me->size[0]< 0.00001f) me->size[0] = 0.00001f;
+ else if (me->size[0] < 0.0f && me->size[0]> -0.00001f) me->size[0] = -0.00001f;
- if (me->size[1] == 0.0f) me->size[1]= 1.0f;
- else if (me->size[1] > 0.0f && me->size[1]< 0.00001f) me->size[1]= 0.00001f;
- else if (me->size[1] < 0.0f && me->size[1]> -0.00001f) me->size[1]= -0.00001f;
+ if (me->size[1] == 0.0f) me->size[1] = 1.0f;
+ else if (me->size[1] > 0.0f && me->size[1]< 0.00001f) me->size[1] = 0.00001f;
+ else if (me->size[1] < 0.0f && me->size[1]> -0.00001f) me->size[1] = -0.00001f;
- if (me->size[2] == 0.0f) me->size[2]= 1.0f;
- else if (me->size[2] > 0.0f && me->size[2]< 0.00001f) me->size[2]= 0.00001f;
- else if (me->size[2] < 0.0f && me->size[2]> -0.00001f) me->size[2]= -0.00001f;
+ if (me->size[2] == 0.0f) me->size[2] = 1.0f;
+ else if (me->size[2] > 0.0f && me->size[2]< 0.00001f) me->size[2] = 0.00001f;
+ else if (me->size[2] < 0.0f && me->size[2]> -0.00001f) me->size[2] = -0.00001f;
}
}
@@ -1479,13 +1477,13 @@ static void my_get_local_bounds(Object *ob, DerivedMesh *dm, float *center, floa
float min_r[3], max_r[3];
INIT_MINMAX(min_r, max_r);
dm->getMinMax(dm, min_r, max_r);
- size[0]= 0.5f*fabsf(max_r[0] - min_r[0]);
- size[1]= 0.5f*fabsf(max_r[1] - min_r[1]);
- size[2]= 0.5f*fabsf(max_r[2] - min_r[2]);
+ size[0] = 0.5f * fabsf(max_r[0] - min_r[0]);
+ size[1] = 0.5f * fabsf(max_r[1] - min_r[1]);
+ size[2] = 0.5f * fabsf(max_r[2] - min_r[2]);
- center[0]= 0.5f*(max_r[0] + min_r[0]);
- center[1]= 0.5f*(max_r[1] + min_r[1]);
- center[2]= 0.5f*(max_r[2] + min_r[2]);
+ center[0] = 0.5f * (max_r[0] + min_r[0]);
+ center[1] = 0.5f * (max_r[1] + min_r[1]);
+ center[2] = 0.5f * (max_r[2] + min_r[2]);
return;
} else
{
@@ -1499,11 +1497,11 @@ static void my_get_local_bounds(Object *ob, DerivedMesh *dm, float *center, floa
break;
case OB_CURVE:
case OB_SURF:
- center[0]= center[1]= center[2]= 0.0;
+ center[0] = center[1] = center[2] = 0.0;
size[0] = size[1]=size[2]=0.0;
break;
case OB_FONT:
- center[0]= center[1]= center[2]= 0.0;
+ center[0] = center[1] = center[2] = 0.0;
size[0] = size[1]=size[2]=1.0;
break;
case OB_MBALL:
@@ -1513,15 +1511,15 @@ static void my_get_local_bounds(Object *ob, DerivedMesh *dm, float *center, floa
if (bb==NULL)
{
- center[0]= center[1]= center[2]= 0.0;
- size[0] = size[1]=size[2]=1.0;
+ center[0] = center[1] = center[2] = 0.0;
+ size[0] = size[1] = size[2] = 1.0;
}
else
{
size[0] = 0.5f * fabsf(bb->vec[0][0] - bb->vec[4][0]);
size[1] = 0.5f * fabsf(bb->vec[0][1] - bb->vec[2][1]);
size[2] = 0.5f * fabsf(bb->vec[0][2] - bb->vec[1][2]);
-
+
center[0] = 0.5f * (bb->vec[0][0] + bb->vec[4][0]);
center[1] = 0.5f * (bb->vec[0][1] + bb->vec[2][1]);
center[2] = 0.5f * (bb->vec[0][2] + bb->vec[1][2]);
diff --git a/source/gameengine/Converter/BL_MeshDeformer.cpp b/source/gameengine/Converter/BL_MeshDeformer.cpp
index 0d3c0d269fc..911ff245ab4 100644
--- a/source/gameengine/Converter/BL_MeshDeformer.cpp
+++ b/source/gameengine/Converter/BL_MeshDeformer.cpp
@@ -154,27 +154,27 @@ void BL_MeshDeformer::RecalcNormals()
v4 = &it.vertex[it.index[i+3]];
co4 = m_transverts[v4->getOrigIndex()];
- n1[0]= co1[0]-co3[0];
- n1[1]= co1[1]-co3[1];
- n1[2]= co1[2]-co3[2];
+ n1[0] = co1[0] - co3[0];
+ n1[1] = co1[1] - co3[1];
+ n1[2] = co1[2] - co3[2];
- n2[0]= co2[0]-co4[0];
- n2[1]= co2[1]-co4[1];
- n2[2]= co2[2]-co4[2];
+ n2[0] = co2[0] - co4[0];
+ n2[1] = co2[1] - co4[1];
+ n2[2] = co2[2] - co4[2];
}
else {
- n1[0]= co1[0]-co2[0];
- n2[0]= co2[0]-co3[0];
- n1[1]= co1[1]-co2[1];
+ n1[0] = co1[0] - co2[0];
+ n2[0] = co2[0] - co3[0];
+ n1[1] = co1[1] - co2[1];
- n2[1]= co2[1]-co3[1];
- n1[2]= co1[2]-co2[2];
- n2[2]= co2[2]-co3[2];
+ n2[1] = co2[1] - co3[1];
+ n1[2] = co1[2] - co2[2];
+ n2[2] = co2[2] - co3[2];
}
- fnor[0]= n1[1]*n2[2] - n1[2]*n2[1];
- fnor[1]= n1[2]*n2[0] - n1[0]*n2[2];
- fnor[2]= n1[0]*n2[1] - n1[1]*n2[0];
+ fnor[0] = n1[1] * n2[2] - n1[2] * n2[1];
+ fnor[1] = n1[2] * n2[0] - n1[0] * n2[2];
+ fnor[2] = n1[0] * n2[1] - n1[1] * n2[0];
normalize_v3(fnor);
/* add to vertices for smooth normals */
diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.cpp b/source/gameengine/Converter/BL_ShapeActionActuator.cpp
index 8325e80db78..d8b4f6aaf1c 100644
--- a/source/gameengine/Converter/BL_ShapeActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ShapeActionActuator.cpp
@@ -528,13 +528,13 @@ PyAttributeDef BL_ShapeActionActuator::Attributes[] = {
PyObject *BL_ShapeActionActuator::pyattr_get_action(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
- BL_ShapeActionActuator* self= static_cast<BL_ShapeActionActuator*>(self_v);
+ BL_ShapeActionActuator* self = static_cast<BL_ShapeActionActuator*>(self_v);
return PyUnicode_FromString(self->GetAction() ? self->GetAction()->id.name+2 : "");
}
int BL_ShapeActionActuator::pyattr_set_action(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
{
- BL_ShapeActionActuator* self= static_cast<BL_ShapeActionActuator*>(self_v);
+ BL_ShapeActionActuator* self = static_cast<BL_ShapeActionActuator*>(self_v);
/* exact copy of BL_ActionActuator's function from here down */
if (!PyUnicode_Check(value))
{
diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
index c027d8aec94..30a4209965e 100644
--- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
+++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
@@ -818,13 +818,13 @@ void KX_BlenderSceneConverter::WritePhysicsObjectToAnimationIpo(int frameNumber)
if (icu_rz) icu_rz->ipo = IPO_LIN;
}
- if (icu_rx) eulerAnglesOld[0]= eval_icu( icu_rx, frameNumber - 1 ) / ((180 / 3.14159265f) / 10);
- if (icu_ry) eulerAnglesOld[1]= eval_icu( icu_ry, frameNumber - 1 ) / ((180 / 3.14159265f) / 10);
- if (icu_rz) eulerAnglesOld[2]= eval_icu( icu_rz, frameNumber - 1 ) / ((180 / 3.14159265f) / 10);
+ if (icu_rx) eulerAnglesOld[0] = eval_icu( icu_rx, frameNumber - 1 ) / ((180 / 3.14159265f) / 10);
+ if (icu_ry) eulerAnglesOld[1] = eval_icu( icu_ry, frameNumber - 1 ) / ((180 / 3.14159265f) / 10);
+ if (icu_rz) eulerAnglesOld[2] = eval_icu( icu_rz, frameNumber - 1 ) / ((180 / 3.14159265f) / 10);
// orn.getValue((float *)tmat); // uses the wrong ordering, cant use this
- for (int r=0;r<3;r++)
- for (int c=0;c<3;c++)
+ for (int r = 0; r < 3; r++)
+ for (int c = 0; c < 3; c++)
tmat[r][c] = orn[c][r];
// mat3_to_eul( eulerAngles,tmat); // better to use Mat3ToCompatibleEul
@@ -1450,14 +1450,12 @@ RAS_MeshObject *KX_BlenderSceneConverter::ConvertMeshSpecial(KX_Scene* kx_scene,
BLI_remlink(&m_maggie->mat, mat_new);
BLI_addtail(&maggie->mat, mat_new);
- mesh->mat[i]= mat_new;
+ mesh->mat[i] = mat_new;
/* the same material may be used twice */
- for (int j=i+1; j<mesh->totcol; j++)
- {
- if (mesh->mat[j]==mat_old)
- {
- mesh->mat[j]= mat_new;
+ for (int j = i + 1; j < mesh->totcol; j++) {
+ if (mesh->mat[j] == mat_old) {
+ mesh->mat[j] = mat_new;
mat_new->id.us++;
mat_old->id.us--;
}