mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
* General PdmObjectMethods for scripting.
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
|
||||
#include "cafDisplayCoordTransform.h"
|
||||
#include "cafFrameAnimationControl.h"
|
||||
#include "cafPdmFieldIOScriptability.h"
|
||||
|
||||
#include "cvfCamera.h"
|
||||
#include "cvfModelBasicList.h"
|
||||
@@ -88,11 +89,11 @@ Rim3dView::Rim3dView( void )
|
||||
|
||||
CAF_PDM_InitObject( "3d View", "", "", "" );
|
||||
|
||||
RICF_InitField( &m_id, "Id", -1, "View ID", "", "", "" );
|
||||
CAF_PDM_InitScriptableFieldWithIO( &m_id, "Id", -1, "View ID", "", "", "" );
|
||||
m_id.registerKeywordAlias( "ViewId" );
|
||||
m_id.uiCapability()->setUiReadOnly( true );
|
||||
m_id.uiCapability()->setUiHidden( true );
|
||||
m_id.capability<RicfFieldHandle>()->setIOWriteable( false );
|
||||
m_id.capability<caf::PdmFieldScriptability>()->setIOWriteable( false );
|
||||
m_id.xmlCapability()->setCopyable( false );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_nameConfig, "NameConfig", "", "", "", "" );
|
||||
@@ -107,13 +108,19 @@ Rim3dView::Rim3dView( void )
|
||||
CAF_PDM_InitField( &m_cameraPointOfInterest, "CameraPointOfInterest", cvf::Vec3d::ZERO, "", "", "", "" );
|
||||
m_cameraPointOfInterest.uiCapability()->setUiHidden( true );
|
||||
|
||||
RICF_InitField( &isPerspectiveView, "PerspectiveProjection", true, "Perspective Projection", "", "", "" );
|
||||
CAF_PDM_InitScriptableFieldWithIO( &isPerspectiveView, "PerspectiveProjection", true, "Perspective Projection", "", "", "" );
|
||||
|
||||
double defaultScaleFactor = preferences->defaultScaleFactorZ();
|
||||
RICF_InitField( &scaleZ, "GridZScale", defaultScaleFactor, "Z Scale", "", "Scales the scene in the Z direction", "" );
|
||||
CAF_PDM_InitScriptableFieldWithIO( &scaleZ,
|
||||
"GridZScale",
|
||||
defaultScaleFactor,
|
||||
"Z Scale",
|
||||
"",
|
||||
"Scales the scene in the Z direction",
|
||||
"" );
|
||||
|
||||
cvf::Color3f defBackgColor = preferences->defaultViewerBackgroundColor();
|
||||
RICF_InitField( &m_backgroundColor, "BackgroundColor", defBackgColor, "Background", "", "", "" );
|
||||
CAF_PDM_InitScriptableFieldWithIO( &m_backgroundColor, "BackgroundColor", defBackgColor, "Background", "", "", "" );
|
||||
m_backgroundColor.registerKeywordAlias( "ViewBackgroundColor" );
|
||||
|
||||
CAF_PDM_InitField( &maximumFrameRate, "MaximumFrameRate", 10, "Maximum Frame Rate", "", "", "" );
|
||||
@@ -121,24 +128,24 @@ Rim3dView::Rim3dView( void )
|
||||
CAF_PDM_InitField( &hasUserRequestedAnimation, "AnimationMode", false, "Animation Mode", "", "", "" );
|
||||
hasUserRequestedAnimation.uiCapability()->setUiHidden( true );
|
||||
|
||||
RICF_InitField( &m_currentTimeStep, "CurrentTimeStep", 0, "Current Time Step", "", "", "" );
|
||||
CAF_PDM_InitScriptableFieldWithIO( &m_currentTimeStep, "CurrentTimeStep", 0, "Current Time Step", "", "", "" );
|
||||
m_currentTimeStep.uiCapability()->setUiHidden( true );
|
||||
|
||||
caf::AppEnum<RiaDefines::MeshModeType> defaultMeshType = preferences->defaultMeshModeType();
|
||||
CAF_PDM_InitField( &meshMode, "MeshMode", defaultMeshType, "Grid Lines", "", "", "" );
|
||||
CAF_PDM_InitFieldNoDefault( &surfaceMode, "SurfaceMode", "Grid Surface", "", "", "" );
|
||||
|
||||
RICF_InitField( &m_showGridBox, "ShowGridBox", true, "Show Grid Box", "", "", "" );
|
||||
CAF_PDM_InitScriptableFieldWithIO( &m_showGridBox, "ShowGridBox", true, "Show Grid Box", "", "", "" );
|
||||
|
||||
RICF_InitField( &m_disableLighting,
|
||||
"DisableLighting",
|
||||
false,
|
||||
"Disable Results Lighting",
|
||||
"",
|
||||
"Disable light model for scalar result colors",
|
||||
"" );
|
||||
CAF_PDM_InitScriptableFieldWithIO( &m_disableLighting,
|
||||
"DisableLighting",
|
||||
false,
|
||||
"Disable Results Lighting",
|
||||
"",
|
||||
"Disable light model for scalar result colors",
|
||||
"" );
|
||||
|
||||
RICF_InitField( &m_showZScaleLabel, "ShowZScale", true, "Show Z Scale Label", "", "", "" );
|
||||
CAF_PDM_InitScriptableFieldWithIO( &m_showZScaleLabel, "ShowZScale", true, "Show Z Scale Label", "", "", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_comparisonView, "ComparisonView", "Comparison View", "", "", "" );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user