From 02b047e1c4ca2ee15afd21be0d618fe4f92bc75a Mon Sep 17 00:00:00 2001 From: DUC ANH HOANG Date: Thu, 15 Sep 2022 14:37:13 +0200 Subject: [PATCH] [EDF-26044]: enable path tracer material loading on PARAVIS_GUI --- src/PVGUI/PVGUI_Module.h | 2 ++ src/PVGUI/PVGUI_Module_actions.cxx | 16 ++++++++++++++-- src/PVGUI/resources/PARAVIS_msg_en.ts | 12 ++++++++++++ src/PVGUI/resources/PARAVIS_msg_fr.ts | 12 ++++++++++++ 4 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/PVGUI/PVGUI_Module.h b/src/PVGUI/PVGUI_Module.h index 4715c0a9..1182a5b5 100644 --- a/src/PVGUI/PVGUI_Module.h +++ b/src/PVGUI/PVGUI_Module.h @@ -58,6 +58,8 @@ class PVGUI_Module: public LightApp_Module SaveAnimationId, SaveGeometryId, //- + LoadMaterialsId, + //- ConnectId, DisconnectId, //----------- diff --git a/src/PVGUI/PVGUI_Module_actions.cxx b/src/PVGUI/PVGUI_Module_actions.cxx index 9b328237..35d3fd0b 100644 --- a/src/PVGUI/PVGUI_Module_actions.cxx +++ b/src/PVGUI/PVGUI_Module_actions.cxx @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -152,6 +153,14 @@ void PVGUI_Module::pvCreateActions() registerAction(SaveGeometryId, anAction); new pqSaveAnimationGeometryReaction(anAction); + // Load Path Tracer Materials + aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_LOAD_MATERIAL"), false ); + anAction = new QAction(QIcon(aPixmap), tr("MEN_LOAD_MATERIAL"), this); + anAction->setToolTip(tr("TOP_LOAD_MATERIAL")); + anAction->setStatusTip(tr("STB_LOAD_MATERIAL")); + registerAction(LoadMaterialsId, anAction); + new pqLoadMaterialsReaction(anAction); + // Connect aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_CONNECT"), false ); anAction = new QAction(QIcon(aPixmap), tr("MEN_CONNECT"), this); @@ -429,10 +438,13 @@ void PVGUI_Module::pvCreateMenus() createMenu( SaveGeometryId, aPVMnu, 35 ); createMenu( separator(), aPVMnu, -1, 35 ); - createMenu( ConnectId, aPVMnu, 45 ); - createMenu( DisconnectId, aPVMnu, 45 ); + createMenu( LoadMaterialsId, aPVMnu, 45); createMenu( separator(), aPVMnu, -1, 45 ); + createMenu( ConnectId, aPVMnu, 55 ); + createMenu( DisconnectId, aPVMnu, 55 ); + createMenu( separator(), aPVMnu, -1, 55 ); + // --- Menu "Edit" aPVMnu = createMenu( tr( "MEN_DESK_EDIT" ), -1, -1 ); diff --git a/src/PVGUI/resources/PARAVIS_msg_en.ts b/src/PVGUI/resources/PARAVIS_msg_en.ts index 2a71722c..3c7771d9 100644 --- a/src/PVGUI/resources/PARAVIS_msg_en.ts +++ b/src/PVGUI/resources/PARAVIS_msg_en.ts @@ -357,6 +357,18 @@ STB_SAVE_GEOMETRY Save Geometry + + TOP_LOAD_MATERIAL + Load Path Tracer Materials... + + + MEN_LOAD_MATERIAL + Load Path Tracer Materials... + + + STB_LOAD_MATERIAL + Load Path Tracer Materials... + TOP_CONNECT Connect diff --git a/src/PVGUI/resources/PARAVIS_msg_fr.ts b/src/PVGUI/resources/PARAVIS_msg_fr.ts index 44fcca35..8501cb37 100644 --- a/src/PVGUI/resources/PARAVIS_msg_fr.ts +++ b/src/PVGUI/resources/PARAVIS_msg_fr.ts @@ -361,6 +361,18 @@ STB_SAVE_GEOMETRY Enregistrer la Géométrie + + TOP_LOAD_MATERIAL + Charger le ficher de matériau d'Ospray... + + + MEN_LOAD_MATERIAL + Charger le ficher de matériau d'Ospray... + + + STB_LOAD_MATERIAL + Charger le ficher de matériau d'Ospray... + TOP_CONNECT Connecter -- 2.39.2