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:
Diffstat (limited to 'source/gameengine/Converter/KX_IpoConvert.cpp')
-rw-r--r--source/gameengine/Converter/KX_IpoConvert.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/gameengine/Converter/KX_IpoConvert.cpp b/source/gameengine/Converter/KX_IpoConvert.cpp
index 7410beecaf4..ce004fa0504 100644
--- a/source/gameengine/Converter/KX_IpoConvert.cpp
+++ b/source/gameengine/Converter/KX_IpoConvert.cpp
@@ -766,15 +766,18 @@ void BL_ConvertMaterialIpos(
// if there is only one material attached to the mesh then set material_index in BL_ConvertMaterialIpos to NULL
// --> this makes the UpdateMaterialData function in KX_GameObject.cpp use the old hack of using SetObjectColor
// because this yields a better performance as not all the vertex colors need to be edited
- if(mat) ConvertMaterialIpos(mat, NULL, gameobj, converter);
+ if(mat) ConvertMaterialIpos(mat, 0, gameobj, converter);
}
else
{
for (int material_index=1; material_index <= blenderobject->totcol; material_index++)
{
Material *mat = give_current_material(blenderobject, material_index);
- STR_HashedString matname = mat->id.name;
- if(mat) ConvertMaterialIpos(mat, matname.hash(), gameobj, converter);
+ STR_HashedString matname;
+ if(mat) {
+ matname= mat->id.name;
+ ConvertMaterialIpos(mat, matname.hash(), gameobj, converter);
+ }
}
}
}