Model

class Model
property id

The id of the model.

Type

str, read-only

property name

The name of the model.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

property lighting_mode

The current lighting mode.

Type

LightingMode

Raises

ReadOnlyError -- If Database is in read only mode.

property active_visibility_layer

The current active visibility layer.

Type

VisibilityLayer

Raises

ReadOnlyError -- If Database is in read only mode.

find_lighting_layer(id)

Find a lighting layer by id.

Parameters

id (str) -- Layer id to find.

Returns

The lighting layer found or None if not found.

Return type

LightingLayer or None

Raises

InvalidIdFormat -- If id is not in GUID format.

list_lighting_layers()

List the lighting layers of the model.

Returns

The list of lighting layers of the model.

Return type

list(LightingLayer)

create_lighting_layer(name)

Create a new lighting layer in this model.

Parameters

name (str) -- Name of the layer.

Returns

The newly created layer.

Return type

LightingLayer

Raises

ReadOnlyError -- If Database is in read only mode.

find_visibility_layer(id)

Find a visibility layer by id.

Parameters

id (str) -- Layer id to find.

Returns

The visibility layer found or None if not found.

Return type

VisibilityLayer or None

Raises

InvalidIdFormat -- If id is not in GUID format.

list_visibility_layers(recursive = True)

List the visibility layers of the model.

Parameters

recursive (bool) -- If True, list all layers in the model, otherwise only the root layers are returned.

Returns

The list of visibility layers of the model.

Return type

list(VisibilityLayer)

create_visibility_layer(name)

Create a new visibility layer in this model.

Parameters

name (str) -- Name of the layer.

Returns

The newly created layer.

Return type

VisibilityLayer

Raises

ReadOnlyError -- If Database is in read only mode.

find_product(id)

Find a product by id.

Parameters

id (str) -- Product id to find.

Returns

The product found or None if not found.

Return type

Product or None

Raises

InvalidIdFormat -- If id is not in GUID format.

list_products()

List the products of the model.

Returns

The list of products of the model.

Return type

list(Product)

create_product(name)

Create a new product in this model.

Parameters

name (str) -- Name of the product.

Returns

The newly created product.

Return type

Product

Raises

ReadOnlyError -- If Database is in read only mode.