From 30b21ac19e7a74c40943c4666c7c91875cbe84c1 Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Wed, 29 Sep 2021 13:20:12 +0200 Subject: [PATCH] Provide default values for python methods to avoid occasional NaN --- .../ProjectDataModelCommands/RimcStimPlanModelCollection.cpp | 2 +- ApplicationLibCode/ProjectDataModelCommands/RimcWellPath.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ApplicationLibCode/ProjectDataModelCommands/RimcStimPlanModelCollection.cpp b/ApplicationLibCode/ProjectDataModelCommands/RimcStimPlanModelCollection.cpp index ee71ebedf5..75ebc8293d 100644 --- a/ApplicationLibCode/ProjectDataModelCommands/RimcStimPlanModelCollection.cpp +++ b/ApplicationLibCode/ProjectDataModelCommands/RimcStimPlanModelCollection.cpp @@ -43,7 +43,7 @@ RimcStimPlanModelCollection_newStimPlanModel::RimcStimPlanModelCollection_newSti { CAF_PDM_InitObject( "Create StimPlan Model", "", "", "Create a new StimPlan Model" ); CAF_PDM_InitScriptableFieldNoDefault( &m_wellPath, "WellPath", "", "", "", "Well Path" ); - CAF_PDM_InitScriptableFieldNoDefault( &m_md, "MeasuredDepth", "", "", "", "Measured Depth" ); + CAF_PDM_InitScriptableField( &m_md, "MeasuredDepth", 0.0, "Measured Depth", "", "", "" ); CAF_PDM_InitScriptableFieldNoDefault( &m_stimPlanModelTemplate, "StimPlanModelTemplate", "", "", "", "StimPlan Model Template" ); } diff --git a/ApplicationLibCode/ProjectDataModelCommands/RimcWellPath.cpp b/ApplicationLibCode/ProjectDataModelCommands/RimcWellPath.cpp index b62a63c3b8..fa65b300ef 100644 --- a/ApplicationLibCode/ProjectDataModelCommands/RimcWellPath.cpp +++ b/ApplicationLibCode/ProjectDataModelCommands/RimcWellPath.cpp @@ -37,7 +37,7 @@ RimcWellPath_newFracture::RimcWellPath_newFracture( caf::PdmObjectHandle* self ) { CAF_PDM_InitObject( "Add StimPlan Fracture", "", "", "Add StimPlan Fracture" ); - CAF_PDM_InitScriptableFieldNoDefault( &m_md, "MeasuredDepth", "", "", "", "Measured Depth" ); + CAF_PDM_InitScriptableField( &m_md, "MeasuredDepth", 0.0, "Measured Depth", "", "", "" ); CAF_PDM_InitScriptableFieldNoDefault( &m_stimPlanFractureTemplate, "StimPlanFractureTemplate", "",