#13861 Python: Add surfaces() and surface_by_name() to the rips API

Project.surfaces(surface_type) returns every surface in the project,
SurfaceCollection.surfaces(surface_type, recursive) the surfaces of one
folder, and Project.surface_by_name(name, surface_type, folder) looks a
surface up by its user description. Subclasses of the requested type are
included; ensemble surfaces are skipped unless include_ensembles is set.

Project.surface_folder(name) now returns None when the folder does not
exist, as PythonExamples/surfaces_and_visualization/surface_import.py
already expects, instead of failing with a gRPC error.
This commit is contained in:
Stefan Crooijmans authored and Kristian Bendiksen committed 2026-11-04 10:45:24 +01:00
1 parent 3cc11eeae8
commit bcae2ccbcb
4 files changed
+204 -4

No files matched your search

@@ -245,7 +245,7 @@ CAF_PDM_OBJECT_METHOD_SOURCE_INIT( RimProject, RimProject_surfaceFolder, "surfac
///
//--------------------------------------------------------------------------------------------------
RimProject_surfaceFolder::RimProject_surfaceFolder( caf::PdmObjectHandle* self )
: PdmObjectCreationMethod( self )
: PdmObjectMethod( self, PdmObjectMethod::NullPointerType::NULL_IS_VALID, PdmObjectMethod::ResultType::PERSISTENT_TRUE )
{
CAF_PDM_InitObject( "Get Surface Folder", "", "", "Get Surface Folder" );
@@ -90,7 +90,7 @@ private:
//==================================================================================================
///
//==================================================================================================
class RimProject_surfaceFolder : public caf::PdmObjectCreationMethod
class RimProject_surfaceFolder : public caf::PdmObjectMethod
{
CAF_PDM_HEADER_INIT;