Commit 4b52d635 authored by Jan Möbius's avatar Jan Möbius

Dont set map if not in multi texturing mode!

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5712 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 71a84472
...@@ -192,13 +192,19 @@ void TextureControlPlugin::fileOpened( int _id ) { ...@@ -192,13 +192,19 @@ void TextureControlPlugin::fileOpened( int _id ) {
// Update texture mapping in meshNode // Update texture mapping in meshNode
// ================================================================================ // ================================================================================
if( obj->dataType( DATA_TRIANGLE_MESH ) ){ if( obj->dataType( DATA_TRIANGLE_MESH ) ){
PluginFunctions::triMeshObject(obj)->meshNode()->set_texture_map( texData->textureMap() ); // PluginFunctions::triMeshObject(obj)->meshNode()->set_texture_map( texData->textureMap() );
PluginFunctions::triMeshObject(obj)->meshNode()->set_property_map( texData->propertyMap() ); // PluginFunctions::triMeshObject(obj)->meshNode()->set_property_map( texData->propertyMap() );
PluginFunctions::triMeshObject(obj)->meshNode()->set_texture_map( 0 );
PluginFunctions::triMeshObject(obj)->meshNode()->set_property_map( 0 );
// TODO: Multitexturing has to set the right map here!
} }
if ( obj->dataType( DATA_POLY_MESH ) ){ if ( obj->dataType( DATA_POLY_MESH ) ){
PluginFunctions::polyMeshObject(obj)->meshNode()->set_texture_map( texData->textureMap() ); PluginFunctions::polyMeshObject(obj)->meshNode()->set_texture_map( 0 );
PluginFunctions::polyMeshObject(obj)->meshNode()->set_property_map( texData->propertyMap() ); PluginFunctions::polyMeshObject(obj)->meshNode()->set_property_map( 0 );
// TODO: Multitexturing has to set the right map here!
} }
} }
...@@ -809,15 +815,21 @@ void TextureControlPlugin::doSwitchTexture( QString _textureName , int _id ) { ...@@ -809,15 +815,21 @@ void TextureControlPlugin::doSwitchTexture( QString _textureName , int _id ) {
if( obj->dataType( DATA_TRIANGLE_MESH ) ){ if( obj->dataType( DATA_TRIANGLE_MESH ) ){
doUpdateTexture(texData->texture(_textureName), *PluginFunctions::triMeshObject(obj)->mesh()); doUpdateTexture(texData->texture(_textureName), *PluginFunctions::triMeshObject(obj)->mesh());
PluginFunctions::triMeshObject(obj)->textureNode()->activateTexture( texData->texture( _textureName ).glName ); PluginFunctions::triMeshObject(obj)->textureNode()->activateTexture( texData->texture( _textureName ).glName );
PluginFunctions::triMeshObject(obj)->meshNode()->set_texture_map( texData->textureMap() ); // PluginFunctions::triMeshObject(obj)->meshNode()->set_texture_map( texData->textureMap() );
PluginFunctions::triMeshObject(obj)->meshNode()->set_property_map( texData->propertyMap() ); // PluginFunctions::triMeshObject(obj)->meshNode()->set_property_map( texData->propertyMap() );
PluginFunctions::triMeshObject(obj)->meshNode()->set_texture_map( 0 );
PluginFunctions::triMeshObject(obj)->meshNode()->set_property_map( 0 );
// TODO: Multitexturing has to set the right map here!
} }
if ( obj->dataType( DATA_POLY_MESH ) ){ if ( obj->dataType( DATA_POLY_MESH ) ){
doUpdateTexture(texData->texture(_textureName), *PluginFunctions::polyMeshObject(obj)->mesh()); doUpdateTexture(texData->texture(_textureName), *PluginFunctions::polyMeshObject(obj)->mesh());
PluginFunctions::polyMeshObject(obj)->textureNode()->activateTexture( texData->texture( _textureName ).glName ); PluginFunctions::polyMeshObject(obj)->textureNode()->activateTexture( texData->texture( _textureName ).glName );
PluginFunctions::polyMeshObject(obj)->meshNode()->set_texture_map( texData->textureMap() ); // PluginFunctions::polyMeshObject(obj)->meshNode()->set_texture_map( texData->textureMap() );
PluginFunctions::polyMeshObject(obj)->meshNode()->set_property_map( texData->propertyMap() ); // PluginFunctions::polyMeshObject(obj)->meshNode()->set_property_map( texData->propertyMap() );
PluginFunctions::polyMeshObject(obj)->meshNode()->set_texture_map( 0 );
PluginFunctions::polyMeshObject(obj)->meshNode()->set_property_map( 0 );
// TODO: Multitexturing has to set the right map here!
} }
} }
......
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