Commit e275cc0b authored by Mike Kremer's avatar Mike Kremer

TextureControl: Implementation of function that returns the current texture index property name.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10208 383ad7c9-94d9-4d36-a494-682f7c89f535
parent dcd154ec
......@@ -519,6 +519,25 @@ void TextureControlPlugin::slotTextureIndex( QString _textureName, int _id, int&
_index = texData->texture(_textureName).id();
}
void TextureControlPlugin::slotTextureIndexPropertyName(int _id, QString& _propertyName) {
// Get the object
BaseObjectData* obj;
if (! PluginFunctions::getObject( _id , obj ) ) {
emit log(LOGERR,"Unable to get Object for id " + QString::number(_id) );
return;
}
// Get texture index property name
if( obj->dataType( DATA_TRIANGLE_MESH ) ) {
_propertyName = PluginFunctions::triMeshObject(obj)->meshNode()->indexPropertyName().c_str();
} else if( obj->dataType( DATA_TRIANGLE_MESH ) ) {
_propertyName = PluginFunctions::polyMeshObject(obj)->meshNode()->indexPropertyName().c_str();
} else {
emit log(LOGERR,"Unable to access mesh for object with id " + QString::number(_id) );
}
}
void TextureControlPlugin::slotTextureName( int _id, int _textureIndex, QString& _textureName){
// Get the object
......
......@@ -120,6 +120,7 @@ class TextureControlPlugin : public QObject, BaseInterface, BackupInterface, Tex
void slotTextureGetImage( QString _textureName, QImage& _image, int _id );
void slotTextureGetImage( QString _textureName, QImage& _image );
void slotTextureIndex( QString _textureName, int _id, int& _index);
void slotTextureIndexPropertyName( int _id, QString& _propertyName);
void slotTextureName( int _id, int _textureIndex, QString& _textureName);
void slotTextureFilename( int _id, QString _textureName, QString& _textureFilename);
void slotGetCurrentTexture( int _id, QString& _textureName );
......
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