]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
PAL10868: No Shading possible in animation. Add Shading in Post-Pro preferences.
authorjfa <jfa@opencascade.com>
Tue, 13 Dec 2005 10:15:09 +0000 (10:15 +0000)
committerjfa <jfa@opencascade.com>
Tue, 13 Dec 2005 10:15:09 +0000 (10:15 +0000)
resources/VISU_en.xml
resources/VISU_fr.xml
src/VISUGUI/VisuGUI.cxx
src/VISU_I/VISU_ScalarMap_i.cc

index 5be5fdf03a701c4f120d8a8fd95d3a68163ecd96..2b06a5b2be168d7a50f5cdf51afa93102bfc67f9 100644 (file)
@@ -63,6 +63,8 @@
     <separator pos-id=""/>
     <popup-item item-id="53" pos-id="" label-id="Full med loading" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
     <!-- popup-item item-id="54" pos-id="" label-id="Build default Prs3d" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/ -->
+    <separator pos-id=""/>
+    <popup-item item-id="56" pos-id="" label-id="Use Shading" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
   </submenu>
   <endsubmenu />   
   <separator pos-id="-1"/> 
index 0aa698957103a0c879355b62fa9b4281a5e3a117..b2a9710d36299f899cc87980226983adb578a35a 100644 (file)
@@ -73,6 +73,8 @@
     <separator pos-id=""/>
     <popup-item item-id="53" pos-id="" label-id="Full med loading" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
     <!-- popup-item item-id="54" pos-id="" label-id="Build default Prs3d" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/ -->
+    <separator pos-id=""/>
+    <popup-item item-id="56" pos-id="" label-id="Use Shading" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
   </submenu>
   <endsubmenu />   
   <separator pos-id="-1"/> 
index a73a71627e9d80abe6e1950f33d9b6a754306978..473fe00635506035368a959b1d0b56903ef2b76d 100644 (file)
@@ -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);
   
index 12a7b428e5ccbb60ccbceda3702aca6d710062b9..4475e2b013213f39f87bea1ce436761ba793f6ba 100644 (file)
@@ -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();