From: jfa Date: Tue, 13 Dec 2005 10:15:09 +0000 (+0000) Subject: PAL10868: No Shading possible in animation. Add Shading in Post-Pro preferences. X-Git-Tag: T_2_2_7pre2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b0eec7c71f1d282e7d0449ed250fbf763036107a;p=modules%2Fvisu.git PAL10868: No Shading possible in animation. Add Shading in Post-Pro preferences. --- diff --git a/resources/VISU_en.xml b/resources/VISU_en.xml index 5be5fdf0..2b06a5b2 100644 --- a/resources/VISU_en.xml +++ b/resources/VISU_en.xml @@ -63,6 +63,8 @@ + + diff --git a/resources/VISU_fr.xml b/resources/VISU_fr.xml index 0aa69895..b2a9710d 100644 --- a/resources/VISU_fr.xml +++ b/resources/VISU_fr.xml @@ -73,6 +73,8 @@ + + diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index a73a7162..473fe006 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -649,6 +649,7 @@ bool VisuGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) /* ======================================================================================== */ case 53: case 54: + case 56: { QMenuData* pp; QMenuItem* item = parent->menuBar()->findItem(theCommandID,&pp); @@ -661,6 +662,9 @@ bool VisuGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) case 54: QAD_CONFIG->addSetting( "Visu:BuildDefaultPrs3d", check ); break; + case 56: + QAD_CONFIG->addSetting( "Visu:RepresentShading", check ); + break; } } break; @@ -868,6 +872,13 @@ bool VisuGUI::SetSettings(QAD_Desktop* parent) item = parent->menuBar()->findItem(anId,&pp); aValue = QAD_CONFIG->getSetting("Visu:BuildDefaultPrs3d"); + if(aValue.isEmpty()? 0 : aValue.toInt()) + pp->setItemChecked(anId, true); + + anId = 56; + item = parent->menuBar()->findItem(anId,&pp); + aValue = QAD_CONFIG->getSetting("Visu:RepresentShading"); + if(aValue.isEmpty()? 0 : aValue.toInt()) pp->setItemChecked(anId, true); diff --git a/src/VISU_I/VISU_ScalarMap_i.cc b/src/VISU_I/VISU_ScalarMap_i.cc index 12a7b428..4475e2b0 100644 --- a/src/VISU_I/VISU_ScalarMap_i.cc +++ b/src/VISU_I/VISU_ScalarMap_i.cc @@ -510,6 +510,9 @@ VISU_Actor* VISU::ScalarMap_i::CreateActor(const Handle(SALOME_InteractiveObject VISU::Prs3d_i::CreateActor(anActor,theIO); anActor->SetBarVisibility(true); anActor->SetRepresentation(2); + QString useShadingStr = QAD_CONFIG->getSetting("Visu:RepresentShading"); + bool useShading = (bool)(useShadingStr.isEmpty() ? 0 : useShadingStr.toInt()); + anActor->SetShading(useShading); UpdateActor(anActor); }catch(...) { anActor->Delete();