mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1138 - pre-proto - Adding field in RimStimPlanColors for transparency
This commit is contained in:
@@ -115,9 +115,11 @@ void RivWellFracturePartMgr::updatePartGeometryTexture(caf::DisplayCoordTransfor
|
|||||||
|
|
||||||
RimLegendConfig* legendConfig = nullptr;
|
RimLegendConfig* legendConfig = nullptr;
|
||||||
RimEclipseView* activeView = dynamic_cast<RimEclipseView*>(RiaApplication::instance()->activeReservoirView());
|
RimEclipseView* activeView = dynamic_cast<RimEclipseView*>(RiaApplication::instance()->activeReservoirView());
|
||||||
|
RimStimPlanColors* stimPlanColors;
|
||||||
if (activeView)
|
if (activeView)
|
||||||
{
|
{
|
||||||
legendConfig = activeView->stimPlanColors->activeLegend();
|
stimPlanColors = activeView->stimPlanColors;
|
||||||
|
legendConfig = stimPlanColors->activeLegend();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note : If no legend is found, draw geo using a single color
|
// Note : If no legend is found, draw geo using a single color
|
||||||
@@ -179,7 +181,9 @@ void RivWellFracturePartMgr::updatePartGeometryTexture(caf::DisplayCoordTransfor
|
|||||||
geo->setTextureCoordArray(textureCoords.p());
|
geo->setTextureCoordArray(textureCoords.p());
|
||||||
|
|
||||||
caf::ScalarMapperEffectGenerator effGen(scalarMapper, caf::PO_NEG_LARGE);
|
caf::ScalarMapperEffectGenerator effGen(scalarMapper, caf::PO_NEG_LARGE);
|
||||||
effGen.setOpacityLevel(0.2f);
|
|
||||||
|
float opacityLevel = activeView->stimPlanColors->opacityLevel();
|
||||||
|
effGen.setOpacityLevel(opacityLevel);
|
||||||
|
|
||||||
if (activeView && activeView->isLightingDisabled())
|
if (activeView && activeView->isLightingDisabled())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ RimStimPlanColors::RimStimPlanColors()
|
|||||||
CAF_PDM_InitObject("StimPlan Colors", ":/draw_style_faults_24x24.png", "", "");
|
CAF_PDM_InitObject("StimPlan Colors", ":/draw_style_faults_24x24.png", "", "");
|
||||||
|
|
||||||
CAF_PDM_InitField(&m_resultNameAndUnit, "ResultName", QString(""), "Result Variable", "", "", "");
|
CAF_PDM_InitField(&m_resultNameAndUnit, "ResultName", QString(""), "Result Variable", "", "", "");
|
||||||
|
CAF_PDM_InitField(&opacityLevel, "opacityLevel", 0.2f, "StimPlan grid Transparency", "", "", "");
|
||||||
|
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault(&m_legendConfigurations, "LegendConfigurations", "", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&m_legendConfigurations, "LegendConfigurations", "", "", "", "");
|
||||||
m_legendConfigurations.uiCapability()->setUiTreeHidden(true);
|
m_legendConfigurations.uiCapability()->setUiTreeHidden(true);
|
||||||
|
|||||||
@@ -51,6 +51,9 @@ public:
|
|||||||
void loadDataAndUpdate();
|
void loadDataAndUpdate();
|
||||||
void updateLegendData();
|
void updateLegendData();
|
||||||
|
|
||||||
|
caf::PdmField<float> opacityLevel;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
||||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||||
|
|||||||
Reference in New Issue
Block a user