Commit 00526909 authored by Dirk Wilden's avatar Dirk Wilden

added hidden flag for textures which belong to a multitexture

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5728 383ad7c9-94d9-4d36-a494-682f7c89f535
parent d8799a1c
......@@ -157,6 +157,9 @@ void TextureControlPlugin::slotMultiTextureAdded( QString _textureGroup , QStrin
_textureId = -1;
_textureId = texData->texture(_name).id();
//hide the texture (its accessible through the multiTexture)
texData->texture(_name).hidden( true );
QImage textureImage;
getImage(_filename,textureImage);
texData->texture(_name).textureImage = textureImage;
......@@ -1005,6 +1008,9 @@ void TextureControlPlugin::slotUpdateContextMenu( int _objectId ) {
for ( uint i = 0 ; i < texData->textures().size() ; ++i ) {
if ( texData->textures()[i].hidden() )
continue;
action = actionGroup->addAction( texData->textures()[i].name() );
action->setCheckable(true);
......
......@@ -150,6 +150,7 @@ int TextureData::addTexture(QString _textureName, QString _filename, uint _dimen
tex.enable();
tex.dirty = false;
tex.type = VERTEXBASED;
tex.hidden(false);
// tex.parameters = TexParameters;
textures_.push_back( tex );
......@@ -189,6 +190,7 @@ bool TextureData::addMultiTexture( QString _textureName ) {
tex.filename("MultiTexture");
tex.dirty = false;
tex.type = MULTITEXTURE;
tex.hidden(false);
textures_.push_back( tex );
......
......@@ -97,6 +97,8 @@ class Texture {
void enabled( bool _enabled ) { enabled_ = _enabled; };
bool enabled() { return enabled_; };
void hidden( bool _hidden ) { hidden_ = _hidden; };
bool hidden() { return hidden_; };
void enable(){ enabled_ = true; };
void disable(){ enabled_ = false; };
......@@ -133,6 +135,8 @@ class Texture {
// Status
bool enabled_;
bool hidden_;
};
class TextureData : public PerObjectData
......
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