GetSourceRange( aRange );
SetScalarRange( aRange );
}
+
+//----------------------------------------------------------------------------
+void
+VISU_ColoredPL
+::UpdateMapperLookupTable()
+{
+ //rnv: This method update pointer to the myMapperTable in the MapperHolder
+ GetMapperHolder()->SetLookupTable(GetMapperTable());
+}
void
SetSourceRange();
+ virtual
+ void
+ UpdateMapperLookupTable();
+
+
protected:
//----------------------------------------------------------------------------
VISU_ColoredPL();
<source>WRN_NO_APPROPRIATE_SELECTION</source>
<translation>No appropriate objects selected</translation>
</message>
+ <message>
+ <source>VISU_PLUGINS_OTHER</source>
+ <translation>VISU plugins</translation>
+ </message>
</context>
<context>
<name>VisuGUI</name>
<source>WRN_NO_APPROPRIATE_SELECTION</source>
<translation>Les objets appropriés ne sont pas choisis</translation>
</message>
+ <message>
+ <source>VISU_PLUGINS_OTHER</source>
+ <translation>Extensions VISU</translation>
+ </message>
</context>
<context>
<name>VisuGUI</name>
// File : VisuGUI.cxx
// Author :
// Module : VISU
-//
+
+#include <Standard_math.hxx> // E.A. must be included before Python.h to fix compilation on windows
+#include "Python.h"
+
#include "VisuGUI.h"
// STL Includes
setMenuShown( true );
setToolShown( true );
+ // import Python module that manages VISU plugins (need to be here because SalomePyQt API uses active module)
+ PyGILState_STATE gstate = PyGILState_Ensure();
+ PyObject* pluginsmanager=PyImport_ImportModule((char*)"salome_pluginsmanager");
+ if(pluginsmanager==NULL)
+ PyErr_Print();
+ else
+ {
+ PyObject* result=PyObject_CallMethod( pluginsmanager, (char*)"initialize", (char*)"isss",1,"visu",tr("MEN_VISUALIZATION").toStdString().c_str(),tr("VISU_PLUGINS_OTHER").toStdString().c_str());
+ if(result==NULL)
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+ PyGILState_Release(gstate);
+ // end of GEOM plugins loading
+
// Reset actions accelerator keys
QList<QKeySequence> shortcuts;
shortcuts.append( QKeySequence(Qt::CTRL + Qt::Key_I) );
for (long aFrameId = 1; aFrameId < theData.myNbFrames; aFrameId++){
VISU::ColoredPrs3d_i* aColoredPrs3d = theData.myPrs[aFrameId];
aColoredPrs3d->SameAs(aPrs3d);
+ // rnv: fix for the 20870: EDF 1410 VISU: Anomaly in the Gauss point representation.
+ // special case for the "Gauss Points" presentation,
+ // update the LookupTable in the mapper, after assign properties of the presentation
+ // using SameAs(...) method.
+ if(theData.myPrsType == VISU::TGAUSSPOINTS) {
+ aColoredPrs3d->UpdateMapperLookupTable();
+ }
}
if ( theAnimator->getAnimationMode() == VISU::Animation::SUCCESSIVE ) {
for (long aFrameId = 0; aFrameId < aFieldData.myNbFrames; aFrameId++) {
VISU::ColoredPrs3d_i* aColoredPrs3d = aFieldData.myPrs[aFrameId];
std::string aTitle = aColoredPrs3d->GetCTitle();
- aColoredPrs3d->SameAs(aPrs3d);
+ aColoredPrs3d->SameAs(aPrs3d);
+ // rnv: fix for the 20870: EDF 1410 VISU: Anomaly in the Gauss point representation.
+ // special case for the "Gauss Points" presentation,
+ // update the LookupTable in the mapper, after assign properties of the presentation
+ // using SameAs(...) method.
+ if(theData.myPrsType == VISU::TGAUSSPOINTS) {
+ aColoredPrs3d->UpdateMapperLookupTable();
+ }
+
aColoredPrs3d->SetTitle(aTitle.c_str());
}
}
aPrs3d->SameAs(thePrs);
+ // rnv: fix for the 20870: EDF 1410 VISU: Anomaly in the Gauss point representation.
+ // special case for the "Gauss Points" presentation,
+ // update the LookupTable in the mapper, after assign properties of the presentation
+ // using SameAs(...) method.
+ VISU::GaussPoints_i* gPoints = dynamic_cast<VISU::GaussPoints_i*>( aPrs3d.get() );
+ if(gPoints) {
+ gPoints->UpdateMapperLookupTable();
+ }
+
// special case for deformed shape
VISU::DeformedShapeAndScalarMap_i* dShape =
dynamic_cast<VISU::DeformedShapeAndScalarMap_i*>( aPrs3d.get() );
//----------------------------------------------------------------------------
+void
+VISU::ColoredPrs3d_i
+::UpdateMapperLookupTable()
+{
+ ProcessVoidEvent(new TVoidMemFunEvent<VISU_ColoredPL>
+ (GetSpecificPL(), &VISU_ColoredPL::UpdateMapperLookupTable));
+}
+
+//----------------------------------------------------------------------------^
SetValLblFontColor( const vtkFloatingPointType theR,
const vtkFloatingPointType theG,
const vtkFloatingPointType theB );
+
+ virtual
+ void
+ UpdateMapperLookupTable();
+
//----------------------------------------------------------------------------
protected: