#7899 Python: generate properties for 'name' and 'is_checked' for NamedObject

This commit is contained in:
Kristian Bendiksen 2021-08-26 08:54:29 +02:00 committed by Magne Sjaastad
parent 2fc65a3b62
commit 795d9eecca
2 changed files with 10 additions and 3 deletions

View File

@ -18,6 +18,9 @@
#include "RimCheckableNamedObject.h"
#include "cafPdmFieldScriptingCapability.h"
#include "cafPdmObjectScriptingCapability.h"
CAF_PDM_XML_ABSTRACT_SOURCE_INIT( RimCheckableNamedObject, "CheckableNamedObject" ); // Do not use. Abstract class
//--------------------------------------------------------------------------------------------------
@ -25,8 +28,8 @@ CAF_PDM_XML_ABSTRACT_SOURCE_INIT( RimCheckableNamedObject, "CheckableNamedObject
//--------------------------------------------------------------------------------------------------
RimCheckableNamedObject::RimCheckableNamedObject( void )
{
CAF_PDM_InitObject( "Checkable object", "", "", "" );
CAF_PDM_InitField( &m_isChecked, "IsChecked", true, "Active", "", "", "" );
CAF_PDM_InitScriptableObject( "Checkable object", "", "", "" );
CAF_PDM_InitScriptableField( &m_isChecked, "IsChecked", true, "Active", "", "", "" );
m_isChecked.uiCapability()->setUiHidden( true );
}

View File

@ -18,6 +18,9 @@
#include "RimNamedObject.h"
#include "cafPdmFieldScriptingCapability.h"
#include "cafPdmObjectScriptingCapability.h"
CAF_PDM_XML_ABSTRACT_SOURCE_INIT( RimNamedObject, "NamedObject" ); // Do not use. Abstract class
//--------------------------------------------------------------------------------------------------
@ -25,7 +28,8 @@ CAF_PDM_XML_ABSTRACT_SOURCE_INIT( RimNamedObject, "NamedObject" ); // Do not use
//--------------------------------------------------------------------------------------------------
RimNamedObject::RimNamedObject( void )
{
CAF_PDM_InitField( &m_name, "Name", QString(), "Name", "", "", "" );
CAF_PDM_InitScriptableObject( "Named object", "", "", "" );
CAF_PDM_InitScriptableField( &m_name, "Name", QString(), "Name", "", "", "" );
}
//--------------------------------------------------------------------------------------------------