Commit 271b04fb authored by Jan Möbius's avatar Jan Möbius

Try to make texture image change work

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6022 383ad7c9-94d9-4d36-a494-682f7c89f535
parent ba43a289
......@@ -404,11 +404,13 @@ void TextureControlPlugin::slotTextureChangeImage( QString _textureName , QImage
// Flag dirty or update
// ================================================================================
// Only update if the texture is enabled
if ( texData->isEnabled(_textureName) )
emit updateTexture( _textureName, _id );
else
texture.setDirty();
if( obj->dataType( DATA_TRIANGLE_MESH ) ) {
PluginFunctions::triMeshObject(obj)->textureNode()->set_texture( _image , texData->texture(_textureName).glName());
} else if ( obj->dataType( DATA_POLY_MESH ) ) {
PluginFunctions::triMeshObject(obj)->textureNode()->set_texture( _image , texData->texture(_textureName).glName());
}
emit updateView();
}
......@@ -439,14 +441,16 @@ void TextureControlPlugin::slotTextureChangeImage( QString _textureName , QImage
Texture& localTex = texData->texture(_textureName);
localTex.textureImage = _image;
// Only update if the texture is enabled
if ( texData->isEnabled( _textureName ) )
emit updateTexture( _textureName, o_it->id() );
else
localTex.setDirty();
if( o_it->dataType( DATA_TRIANGLE_MESH ) ) {
PluginFunctions::triMeshObject(o_it)->textureNode()->set_texture( _image , texData->texture(_textureName).glName());
} else if ( o_it->dataType( DATA_POLY_MESH ) ) {
PluginFunctions::triMeshObject(o_it)->textureNode()->set_texture( _image , texData->texture(_textureName).glName());
}
}
}
emit updateView();
}
void TextureControlPlugin::slotTextureUpdated( QString _textureName , int _identifier ) {
......
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