Application
The root application class for the Scripting API.
Import
import ScriptingApi as api
# Create application instance
app = api.Application()
Methods
Properties
get_version
Retrieves the version string.
Signature:
get_version() -> str
Returns: str — A string representing the version.
get_project_file_path
Retrieves the file path of the currently opened project.
Signature:
get_project_file_path() -> str
Returns: str — A string representing the file path of the currently opened project.
set_volumes_visible
Sets the visibility state of specified volume objects.
Signature:
set_volumes_visible(volumeNames: list, visible: bool) -> None
Parameters:
| Parameter | Type | Description |
|---|---|---|
volumeNames | any | A list containing the names of the volumes to modify. |
visible | any | If true, makes the volumes visible; if false, hides them. |
isolate_volumes
Isolates specified volumes by showing only those and hiding all others.
Signature:
isolate_volumes(volumeNames: list) -> None
Parameters:
| Parameter | Type | Description |
|---|---|---|
volumeNames | any | A list containing the names of the volumes to isolate. If empty, shows all volumes. |
set_active_volume
Sets the active volume by its name. Active volume is the one that is in bold in the volume scene tree and used for certain operations.
Signature:
set_active_volume(volumeName: str) -> None
Parameters:
| Parameter | Type | Description |
|---|---|---|
volumeName | any | The name of the volume to set as active. |
get_active_volume_name
Returns the name of the currently active volume.
Signature:
get_active_volume_name() -> str
Returns: str — The name of the currently active volume if any; otherwise, returns an empty string.
get_visible_volume_names
Returns the names of visible volume objects in the current project.
Signature:
get_visible_volume_names() -> list
Returns: list — A list of strings containing the names of all volumes.
get_all_volume_names
Returns the names of all volume objects in the current project.
Signature:
get_all_volume_names() -> list
Returns: list — A list of strings containing the names of all volumes.
set_masks_visible
Sets the visibility state of specified mask objects.
Signature:
set_masks_visible(maskNames: list, visible: bool) -> None
Parameters:
| Parameter | Type | Description |
|---|---|---|
maskNames | any | A list containing the names of the masks to modify. |
visible | any | If true, makes the masks visible; if false, hides them. |
isolate_masks
Isolates specified masks by showing only those and hiding all others.
Signature:
isolate_masks(maskNames: list) -> None
Parameters:
| Parameter | Type | Description |
|---|---|---|
maskNames | any | A list containing the names of the masks to isolate. If empty, shows all masks. |
set_active_mask
Sets the active mask by its name. Active mask is the one that is in bold in the mask scene tree and used for certain operations.
Signature:
set_active_mask(maskName: str) -> None
Parameters:
| Parameter | Type | Description |
|---|---|---|
maskName | any | The name of the mask to set as active. |
get_active_mask_name
Returns the name of the currently active mask.
Signature:
get_active_mask_name() -> str
Returns: str — The name of the currently active mask if any; otherwise, returns an empty string.
get_visible_mask_names
Returns the names of visible mask objects in the current project.
Signature:
get_visible_mask_names() -> list
Returns: list — A list of strings containing the names of all masks.
get_all_mask_names
Returns the names of all mask objects in the current project.
Signature:
get_all_mask_names() -> list
Returns: list — A list of strings containing the names of all masks.
set_surfaces_visible
Sets the visibility state of specified surface objects.
Signature:
set_surfaces_visible(surfaceNames: list, visible: bool) -> None
Parameters:
| Parameter | Type | Description |
|---|---|---|
surfaceNames | any | A list containing the names of the surfaces to modify. |
visible | any | If true, makes the surfaces visible; if false, hides them. |
isolate_surfaces
Isolates specified surfaces by showing only those and hiding all others.
Signature:
isolate_surfaces(surfaceNames: list) -> None
Parameters:
| Parameter | Type | Description |
|---|---|---|
surfaceNames | any | A list containing the names of the surfaces to isolate. If empty, shows all surfaces. |
set_active_surface
Sets the active surface by its name. Active surface is the one that is in bold in the surface scene tree and used for certain operations.
Signature:
set_active_surface(surfaceName: str) -> None
Parameters:
| Parameter | Type | Description |
|---|---|---|
surfaceName | any | The name of the surface to set as active. |
get_active_surface_name
Returns the name of the currently active surface.
Signature:
get_active_surface_name() -> str
Returns: str — The name of the currently active surface if any; otherwise, returns an empty string.
get_visible_surface_names
Returns the names of visible surface objects in the current project.
Signature:
get_visible_surface_names() -> list
Returns: list — A list of strings containing the names of all surfaces.
get_all_surface_names
Returns the names of all surface objects in the current project.
Signature:
get_all_surface_names() -> list
Returns: list — A list of strings containing the names of all surfaces.
set_volume_meshes_visible
Sets the visibility state of specified volume mesh objects.
Signature:
set_volume_meshes_visible(volumeMeshNames: list, visible: bool) -> None
Parameters:
| Parameter | Type | Description |
|---|---|---|
volumeMeshNames | any | A list containing the names of the volume meshes to modify. |
visible | any | If true, makes the volume meshes visible; if false, hides them. |
isolate_volume_meshes
Isolates specified volume meshes by showing only those and hiding all others.
Signature:
isolate_volume_meshes(volumeMeshNames: list) -> None
Parameters:
| Parameter | Type | Description |
|---|---|---|
volumeMeshNames | any | A list containing the names of the volume meshes to isolate. If empty, shows all volume meshes. |
set_active_volume_mesh
Sets the active volume mesh by its name. Active volume mesh is the one that is in bold in the volume mesh scene tree and used for certain operations.
Signature:
set_active_volume_mesh(volumeMeshName: str) -> None
Parameters:
| Parameter | Type | Description |
|---|---|---|
volumeMeshName | any | The name of the volume mesh to set as active. |
get_active_volume_mesh_name
Returns the name of the currently active volume mesh.
Signature:
get_active_volume_mesh_name() -> str
Returns: str — The name of the currently active volume mesh if any; otherwise, returns an empty string.
get_visible_volume_mesh_names
Returns the names of visible volume mesh objects in the current project.
Signature:
get_visible_volume_mesh_names() -> list
Returns: list — A list of strings containing the names of all volume meshes.
get_all_volume_mesh_names
Returns the names of all volume mesh objects in the current project.
Signature:
get_all_volume_mesh_names() -> list
Returns: list — A list of strings containing the names of all volume meshes.
set_primitives_visible
Sets the visibility state of specified primitive objects.
Signature:
set_primitives_visible(primitiveNames: list, visible: bool) -> None
Parameters:
| Parameter | Type | Description |
|---|---|---|
primitiveNames | any | A list containing the names of the primitives to modify. |
visible | any | If true, makes the primitives visible; if false, hides them. |
isolate_primitives
Isolates specified primitives by showing only those and hiding all others.
Signature:
isolate_primitives(primitiveNames: list) -> None
Parameters:
| Parameter | Type | Description |
|---|---|---|
primitiveNames | any | A list containing the names of the primitives to isolate. If empty, shows all primitives. |
get_visible_primitive_names
Returns the names of visible primitive objects in the current project.
Signature:
get_visible_primitive_names() -> list
Returns: list — A list of strings containing the names of all visible primitives.
get_all_primitive_names
Returns the names of all primitive objects in the current project.
Signature:
get_all_primitive_names() -> list
Returns: list — A list of strings containing the names of all primitives.
set_analyses_visible
Sets the visibility state of specified analysis objects.
Signature:
set_analyses_visible(analysisNames: list, visible: bool) -> None
Parameters:
| Parameter | Type | Description |
|---|---|---|
analysisNames | any | A list containing the names of the analyses to modify. |
visible | any | If true, makes the analyses visible; if false, hides them. |
rename_analysis
Renames an analysis object.
Signature:
rename_analysis(analysisName: str, newName: str) -> None
Parameters:
| Parameter | Type | Description |
|---|---|---|
analysisName | any | The current name of the analysis to rename. |
newName | any | The new name to assign to the analysis. |
set_active_analysis
Sets the active analysis by its name. Active analysis is the one that is currently selected and used for certain operations.
Signature:
set_active_analysis(analysisName: str) -> None
Parameters:
| Parameter | Type | Description |
|---|---|---|
analysisName | any | The name of the analysis to set as active. |
get_active_analysis_name
Returns the name of the currently active analysis.
Signature:
get_active_analysis_name() -> str
Returns: str — The name of the currently active analysis if any; otherwise, returns an empty string.
get_visible_analysis_names
Returns the names of visible analysis objects in the current project.
Signature:
get_visible_analysis_names() -> list
Returns: list — A list of strings containing the names of all visible analyses.
get_all_analysis_names
Returns the names of all analysis objects in the current project.
Signature:
get_all_analysis_names() -> list
Returns: list — A list of strings containing the names of all analyses.
set_mask_3d_preview_quality
Sets the quality level for 3D mask previews.
Signature:
set_mask_3d_preview_quality(quality: Mask3dPreviewQuality) -> None
Parameters:
| Parameter | Type | Description |
|---|---|---|
quality | any | The desired quality level for the 3D mask preview. Use api.Mask3dPreviewQuality.Low, api.Mask3dPreviewQuality.Medium, or api.Mask3dPreviewQuality.High. |
get_mask_3d_preview_quality
Retrieves the current mask preview quality setting.
Signature:
get_mask_3d_preview_quality() -> Mask3dPreviewQuality
Returns: Mask3dPreviewQuality — The current mask preview quality (e.g., api.Mask3dPreviewQuality.Medium).