float opacity = salomeActor->GetOpacity();
float r, g, b;
salomeActor->GetColor(r, g, b);
+ QString colorStr = QString::number( r ); colorStr += ",";
+ colorStr += QString::number( g ); colorStr += ",";
+ colorStr += QString::number( b );
int repMode = salomeActor->GetRepresentation();
int disMode = salomeActor->getDisplayMode();
bool isInf = salomeActor->IsInfinitive();
ip.setParameter( entry, param.latin1(), aName );
param = vtkParam + "Opacity";
ip.setParameter( entry, param.latin1(), QString::number( opacity ).latin1() );
- param = vtkParam + "ColorRed";
- ip.setParameter( entry, param.latin1(), QString::number( r ).latin1() );
- param = vtkParam + "ColorGreen";
- ip.setParameter( entry, param.latin1(), QString::number( g ).latin1() );
- param = vtkParam + "ColorBlue";
- ip.setParameter( entry, param.latin1(), QString::number( b ).latin1() );
+ param = vtkParam + "Color";
+ ip.setParameter( entry, param.latin1(), colorStr.latin1() );
param = vtkParam + "RepresentationMode";
ip.setParameter( entry, param.latin1(), QString::number( repMode ).latin1() );
param = vtkParam + "DisplayMode";
ip.setParameter( entry, param.latin1(), QString::number( disMode ).latin1() );
- param = vtkParam + "IsInfitine";
+ param = vtkParam + "IsInfinitive";
ip.setParameter( entry, param.latin1(), QString::number( isInf ).latin1() );
param = vtkParam + "IsShrunk";
ip.setParameter( entry, param.latin1(), QString::number( isShrunk ).latin1() );
viewActorMap[ viewIndex ] = getActor( *entIt, vtkView );
vtkActors[ entry ] = viewActorMap;
}
- } // if view index less then VTK view managers size
+ }
+ else { // the rest properties "work" with SALOME_Actor, so we initialize it at first
+ SALOME_Actor* actor = 0;
+ if ( vtkActors.contains( entry ) ) {
+ QMap<int, SALOME_Actor*> viewActorMap = vtkActors[ entry ];
+ if ( viewActorMap.contains( viewIndex ) )
+ actor = viewActorMap[ viewIndex ];
+ }
+ if ( !actor )
+ continue;
+
+ QString val( (*valuesIt).c_str() );
+
+ if ( paramName == "Name" )
+ actor->setName( val.latin1() );
+
+ else if ( paramName == "Opacity" )
+ actor->SetOpacity( val.toFloat() );
+
+ else if ( paramName == "Color" ) {
+ QStringList colors = QStringList::split( ',', val );
+ if ( colors.count() == 3 )
+ actor->SetColor( colors[0].toFloat(), colors[1].toFloat(), colors[2].toFloat() );
+ }
+
+ else if ( paramName == "RepresentationMode" )
+ actor->SetRepresentation( val.toInt() );
+
+ else if ( paramName == "DisplayMode" )
+ actor->setDisplayMode( val.toInt() );
+
+ else if ( paramName == "IsInfinitive" )
+ actor->SetInfinitive( (bool)val.toInt() );
+
+ else if ( paramName == "IsShrunk" )
+ actor->SetShrink();
+ } // else ..
+
} // if SVTK
} // for names/parameters iterator
} // for entries iterator