Handle(SALOME_InteractiveObject) io = salomeActor->getIO();
const char* entry = io->getEntry();
const char* aName = salomeActor->getName();
+ int repMode = salomeActor->GetRepresentation();
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();
- bool isShrunk = ( salomeActor->IsShrunkable() && salomeActor->IsShrunk() );
-
- // printf (" -- actor: entry=%s, name=%s, opacity=%f, color=%d,%d,%d, repMode=%d, disMode=%d... -- \n",
- // entry, aName, opacity, r, g, b, repMode, disMode );
-
QString param, vtkParam = vmodel->getType(); vtkParam += gSeparator;
vtkParam += QString::number( vtkViewers ); vtkParam += gSeparator;
+
param = vtkParam + "Visibility";
ip.setParameter( entry, param.latin1(), "true" );
- param = vtkParam + "Name";
+ param = vtkParam + "Name";
ip.setParameter( entry, param.latin1(), aName );
+ param = vtkParam + "RepresentationMode";
+ ip.setParameter( entry, param.latin1(), QString::number( repMode ).latin1() );
param = vtkParam + "Opacity";
ip.setParameter( entry, param.latin1(), QString::number( opacity ).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 + "IsInfinitive";
- ip.setParameter( entry, param.latin1(), QString::number( isInf ).latin1() );
- param = vtkParam + "IsShrunk";
- ip.setParameter( entry, param.latin1(), QString::number( isShrunk ).latin1() );
+
} // hasIO
} // salome_actor successfull downcast
} // isVisible
if ( !ok ) // bad conversion of view index to integer
continue;
- cout << "--SVTK parameter: entry = " << *entIt << ", paramName = " << paramName << endl;
+ //cout << "--SVTK parameter: entry = " << *entIt << ", paramName = " << paramName << endl;
if ( paramName == "Visibility" && displayer() ) {
QPtrList<SUIT_ViewManager> lst;
QString val( (*valuesIt).c_str() );
- if ( paramName == "Name" )
+ if ( paramName == "Name" )
actor->setName( val.latin1() );
-
+
+ else if ( paramName == "RepresentationMode" )
+ actor->SetRepresentation( val.toInt() );
+
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