Commit c8390cee authored by Dirk Wilden's avatar Dirk Wilden

fixed segfault on polyMesh + switchTexture

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@8637 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 6e58a199
......@@ -1213,11 +1213,12 @@ void TextureControlPlugin::doSwitchTexture( QString _textureName , int _id ) {
PluginFunctions::polyMeshObject(obj)->meshNode()->setIndexPropertyName("No Texture Index");
PluginFunctions::polyMeshObject(obj)->meshNode()->setTextureMap( 0 );
if ( texData->texture(_textureName).type() == HALFEDGEBASED ) {
// We set it to the standard name here, as we copy user texture coordinates to the global representation
PluginFunctions::triMeshObject(obj)->meshNode()->setHalfedgeTextcoordPropertyName("h:texcoords2D");
PluginFunctions::polyMeshObject(obj)->meshNode()->setHalfedgeTextcoordPropertyName("h:texcoords2D");
} else {
PluginFunctions::triMeshObject(obj)->meshNode()->setHalfedgeTextcoordPropertyName("No Texture");
PluginFunctions::polyMeshObject(obj)->meshNode()->setHalfedgeTextcoordPropertyName("No Texture");
}
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment