Skip to main content

SurfaceRenderPropertiesOperations

Other

Provides an interface for managing render properties of 3D surface objects. This class enables control over visual representation, material properties, lighting, and display widgets for surface objects in the 3D scene.

Import​

import ScriptingApi as api

# Access via Application
app = api.Application()
ops = app.get_surface_render_properties_operations()

Methods​

Properties​

set_representation​

Sets the surface visualization representation mode. Controls how the surface geometry is displayed (points, wireframe, solid, or solid with edges).

Signature:

set_representation(surfaceNames: list, representation: SurfaceRepresentation) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
representationSurfaceRepresentationVisualization mode. Use api.SurfaceRepresentation.Points, api.SurfaceRepresentation.Wireframe, api.SurfaceRepresentation.Solid, or api.SurfaceRepresentation.SolidEdges.

set_interpolation​

Sets the surface shading interpolation method. Controls the shading algorithm used for rendering the surface.

Signature:

set_interpolation(surfaceNames: list, interpolation: SurfaceInterpolation) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
interpolationSurfaceInterpolationShading method. Use api.SurfaceInterpolation.Flat, api.SurfaceInterpolation.Gouraud, api.SurfaceInterpolation.Phong, or api.SurfaceInterpolation.PBR (Physically Based Rendering).

set_line_width​

Sets the line width for wireframe and edges visualization.

Signature:

set_line_width(surfaceNames: list, width: float) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
widthfloatLine width value in pixels (typically 1.0 to 10.0).

set_point_size​

Sets the point size for point cloud visualization.

Signature:

set_point_size(surfaceNames: list, size: float) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
sizefloatPoint size value in pixels (typically 1.0 to 16.0).

set_face_culling​

Sets which surface sides are visible (face culling).

Signature:

set_face_culling(surfaceNames: list, cullingType: FaceCullingType) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
cullingTypeFaceCullingTypeFace visibility mode. Use api.FaceCullingType.ShowAll, api.FaceCullingType.ShowFrontSideOnly, api.FaceCullingType.ShowBackSideOnly, or api.FaceCullingType.HideAll.

set_scalar_visibility​

Enables or disables scalar color visualization. When enabled, displays colors based on scalar data stored in the surface points. When disabled, uses the material color instead.

Signature:

set_scalar_visibility(surfaceNames: list, visible: bool) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
visibleboolTrue to enable scalar colors, false to use material color.

set_color​

Sets the material base color for the surfaces.

Signature:

set_color(surfaceNames: list, color: list) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
colorlistRGB color components in range [0.0, 1.0].

set_colors​

Sets different material colors for multiple surfaces.

Signature:

set_colors(surfaceNames: list, colors: list) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
colorslistList of RGB colors [r, g, b] (must match the length of surfaceNames). Each color has RGB components in range [0.0, 1.0].

set_random_color​

Assigns random colors to the specified surfaces.

Signature:

set_random_color(surfaceNames: list) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.

set_opacity​

Sets the opacity (transparency) of the surfaces.

Signature:

set_opacity(surfaceNames: list, opacity: float) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
opacityfloatOpacity value in range [0.0, 1.0], where 0.0 is fully transparent and 1.0 is fully opaque.

set_ambient_color​

Sets the ambient lighting color. Ambient light represents constant illumination from all directions.

Signature:

set_ambient_color(surfaceNames: list, color: list) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
colorlistRGB color [r, g, b] components in range [0.0, 1.0].

set_diffuse_color​

Sets the diffuse lighting color. Diffuse light represents matte surface reflection based on angle to light source.

Signature:

set_diffuse_color(surfaceNames: list, color: list) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
colorlistRGB color [r, g, b] components in range [0.0, 1.0].

set_specular_color​

Sets the specular (highlight) color. Specular light represents shiny surface reflections and highlights.

Signature:

set_specular_color(surfaceNames: list, color: list) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
colorlistRGB color [r, g, b] components in range [0.0, 1.0].

set_ambient_coefficient​

Sets the ambient lighting coefficient.

Signature:

set_ambient_coefficient(surfaceNames: list, coefficient: float) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
coefficientfloatAmbient intensity in range [0.0, 1.0].

set_diffuse_coefficient​

Sets the diffuse lighting coefficient.

Signature:

set_diffuse_coefficient(surfaceNames: list, coefficient: float) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
coefficientfloatDiffuse intensity in range [0.0, 1.0].

set_specular_coefficient​

Sets the specular lighting coefficient.

Signature:

set_specular_coefficient(surfaceNames: list, coefficient: float) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
coefficientfloatSpecular intensity in range [0.0, 1.0].

set_specular_power​

Sets the specular power (shininess). Higher values create tighter, more focused highlights.

Signature:

set_specular_power(surfaceNames: list, power: float) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
powerfloatSpecular power in range [0.0, 128.0].

set_metallic_coefficient​

Sets the metallic coefficient for PBR rendering. Controls how metallic the surface appears. Only used with PBR interpolation.

Signature:

set_metallic_coefficient(surfaceNames: list, coefficient: float) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
coefficientfloatMetallic value in range [0.0, 1.0], where 0.0 is non-metallic and 1.0 is fully metallic.

set_roughness_coefficient​

Sets the roughness coefficient for PBR rendering. Controls surface roughness. Only used with PBR interpolation.

Signature:

set_roughness_coefficient(surfaceNames: list, coefficient: float) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
coefficientfloatRoughness value in range [0.0, 1.0], where 0.0 is glossy and 1.0 is rough.

set_material_type​

Applies a predefined material type preset. Sets ambient, diffuse, specular, and other properties based on common material types.

Signature:

set_material_type(surfaceNames: list, materialType: MaterialType) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
materialTypeMaterialTypeMaterial preset. Use api.MaterialType.Aluminium, api.MaterialType.Brass, etc.

set_lighting_enabled​

Enables or disables lighting calculations for the surfaces. When disabled, surfaces display flat colors without shading.

Signature:

set_lighting_enabled(surfaceNames: list, enable: bool) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
enableboolTrue to enable lighting, false to disable.

set_point_normals_visible​

Shows or hides point normal vectors. Displays normal vectors as lines extending from surface points (useful for debugging).

Signature:

set_point_normals_visible(surfaceNames: list, visible: bool) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
visibleboolTrue to show normals, false to hide.

set_bounding_box_visible​

Shows or hides the outline bounding box. Displays a wireframe box representing the object's extent.

Signature:

set_bounding_box_visible(surfaceNames: list, visible: bool) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
visibleboolTrue to show bounding box, false to hide.

set_corner_bounding_box_visible​

Shows or hides the corner bounding box markers. Displays small markers at the corners of the bounding box.

Signature:

set_corner_bounding_box_visible(surfaceNames: list, visible: bool) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
visibleboolTrue to show corner markers, false to hide.

set_axis_labels_visible​

Shows or hides the axis labels on the bounding box. Displays coordinate labels (e.g., "X", "Y", "Z") on bounding box edges.

Signature:

set_axis_labels_visible(surfaceNames: list, visible: bool) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
visibleboolTrue to show labels, false to hide.

set_bounding_box_color​

Sets the color of the outline bounding box.

Signature:

set_bounding_box_color(surfaceNames: list, color: list) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
colorlistRGBA color [r, g, b, a] components in range [0.0, 1.0].

set_corner_bounding_box_color​

Sets the color of the corner bounding box markers.

Signature:

set_corner_bounding_box_color(surfaceNames: list, color: list) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
colorlistRGBA color [r, g, b, a] components in range [0.0, 1.0].

set_axis_labels_color​

Sets the color of the axis labels.

Signature:

set_axis_labels_color(surfaceNames: list, color: list) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
colorlistRGBA color [r, g, b, a] components in range [0.0, 1.0].

get_opacity​

Retrieves the opacity (transparency) value for the specified surface.

Signature:

get_opacity(surfaceName: str) -> float

Parameters:

ParameterTypeDescription
surfaceNamestrName of the surface object. Must exist in the current scene.

Returns: float — Opacity value in range [0.0, 1.0] where 0.0 is fully transparent and 1.0 is opaque.


get_color​

Retrieves the RGB color for the specified surface.

Signature:

get_color(surfaceName: str) -> list

Parameters:

ParameterTypeDescription
surfaceNamestrName of the surface object. Must exist in the current scene.

Returns: list — Array of RGB color components in range [0.0, 1.0].


get_representation​

Retrieves the surface representation mode.

Signature:

get_representation(surfaceName: str) -> SurfaceRepresentation

Parameters:

ParameterTypeDescription
surfaceNamestrName of the surface object. Must exist in the current scene.

Returns: SurfaceRepresentation — The api.SurfaceRepresentation enum value (Points, Wireframe, Solid, or SolidEdges).


get_interpolation​

Retrieves the surface interpolation mode.

Signature:

get_interpolation(surfaceName: str) -> SurfaceInterpolation

Parameters:

ParameterTypeDescription
surfaceNamestrName of the surface object. Must exist in the current scene.

Returns: SurfaceInterpolation — The api.SurfaceInterpolation enum value (Flat, Gouraud, Phong, or PBR).


get_line_width​

Retrieves the line width for the specified surface.

Signature:

get_line_width(surfaceName: str) -> float

Parameters:

ParameterTypeDescription
surfaceNamestrName of the surface object. Must exist in the current scene.

Returns: float — Line width value in pixels.


get_point_size​

Retrieves the point size for the specified surface.

Signature:

get_point_size(surfaceName: str) -> float

Parameters:

ParameterTypeDescription
surfaceNamestrName of the surface object. Must exist in the current scene.

Returns: float — Point size value in pixels.


get_face_culling​

Retrieves the face culling type for the specified surface. Retrieves the face culling type for a single surface object.

Signature:

get_face_culling(surfaceName: str) -> FaceCullingType

Parameters:

ParameterTypeDescription
surfaceNamestrName of the surface object. Must exist in the current scene.

Returns: FaceCullingType — The api.FaceCullingType enum value.


get_scalar_visibility​

Gets the scalar visibility flag for the specified surface.

Signature:

get_scalar_visibility(surfaceName: str) -> bool

Parameters:

ParameterTypeDescription
surfaceNamestrName of the surface object. Must exist in the current scene.

Returns: bool — True if scalar visibility is enabled, false otherwise.


get_ambient_color​

Retrieves the ambient color for the specified surface.

Signature:

get_ambient_color(surfaceName: str) -> list

Parameters:

ParameterTypeDescription
surfaceNamestrName of the surface object. Must exist in the current scene.

Returns: list — Array of RGB color [r, g, b] components in range [0.0, 1.0].


get_diffuse_color​

Retrieves the diffuse color for the specified surface.

Signature:

get_diffuse_color(surfaceName: str) -> list

Parameters:

ParameterTypeDescription
surfaceNamestrName of the surface object. Must exist in the current scene.

Returns: list — Array of RGB color [r, g, b] components in range [0.0, 1.0].


get_specular_color​

Retrieves the specular color for the specified surface.

Signature:

get_specular_color(surfaceName: str) -> list

Parameters:

ParameterTypeDescription
surfaceNamestrName of the surface object. Must exist in the current scene.

Returns: list — Array of RGB color [r, g, b] components in range [0.0, 1.0].


get_ambient_coefficient​

Retrieves the ambient coefficient for the specified surface.

Signature:

get_ambient_coefficient(surfaceName: str) -> float

Parameters:

ParameterTypeDescription
surfaceNamestrName of the surface object. Must exist in the current scene.

Returns: float — Ambient intensity value in range [0.0, 1.0].


get_diffuse_coefficient​

Retrieves the diffuse coefficient for the specified surface.

Signature:

get_diffuse_coefficient(surfaceName: str) -> float

Parameters:

ParameterTypeDescription
surfaceNamestrName of the surface object. Must exist in the current scene.

Returns: float — Diffuse intensity value in range [0.0, 1.0].


get_specular_coefficient​

Retrieves the specular coefficient for the specified surface.

Signature:

get_specular_coefficient(surfaceName: str) -> float

Parameters:

ParameterTypeDescription
surfaceNamestrName of the surface object. Must exist in the current scene.

Returns: float — Specular intensity value in range [0.0, 1.0].


get_specular_power​

Retrieves the specular power for the specified surface.

Signature:

get_specular_power(surfaceName: str) -> float

Parameters:

ParameterTypeDescription
surfaceNamestrName of the surface object. Must exist in the current scene.

Returns: float — Specular power value in range [0.0, 128.0].


get_metallic_coefficient​

Retrieves the metallic coefficient for PBR rendering for the specified surface.

Signature:

get_metallic_coefficient(surfaceName: str) -> float

Parameters:

ParameterTypeDescription
surfaceNamestrName of the surface object. Must exist in the current scene.

Returns: float — Metallic value in range [0.0, 1.0], where 0.0 is non-metallic and 1.0 is fully metallic.


get_roughness_coefficient​

Retrieves the roughness coefficient for PBR rendering for the specified surface.

Signature:

get_roughness_coefficient(surfaceName: str) -> float

Parameters:

ParameterTypeDescription
surfaceNamestrName of the surface object. Must exist in the current scene.

Returns: float — Roughness value in range [0.0, 1.0], where 0.0 is glossy and 1.0 is rough.


get_material_type​

Retrieves the material type for the specified surface.

Signature:

get_material_type(surfaceName: str) -> MaterialType

Parameters:

ParameterTypeDescription
surfaceNamestrName of the surface object. Must exist in the current scene.

Returns: MaterialType — The api.MaterialType enum value (e.g., Aluminium, Brass, etc.).


Modification​

set_clipping_enabled​

Enables or disables 3D clipping plane interactions. When enabled, surfaces can be clipped by active clipping planes.

Signature:

set_clipping_enabled(surfaceNames: list, enable: bool) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
enableboolTrue to enable clipping, false to disable.

set_scale_axes_visible​

Shows or hides the scale axes widget. Displays a 3D coordinate system widget showing the object's orientation and scale.

Signature:

set_scale_axes_visible(surfaceNames: list, visible: bool) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
visibleboolTrue to show scale axes, false to hide.

set_scale_axes_color​

Sets the color of the scale axes widget.

Signature:

set_scale_axes_color(surfaceNames: list, color: list) -> None

Parameters:

ParameterTypeDescription
surfaceNameslistList of surface object names to modify.
colorlistRGBA color [r, g, b, a] components in range [0.0, 1.0].

See Also​