# Scene

> Python API functions

### addComponent

Add a component to an occurrence.

```python
scene.addComponent(occurrence, componentType) -> scene.Component
```

Parameters

| Type                                         | Name          | Description                              |
| -------------------------------------------- | ------------- | ---------------------------------------- |
| [Occurrence](./scene_types#occurrence)       | occurrence    | The occurrence to add the new component. |
| [ComponentType](./scene_types#componenttype) | componentType | Type of the component.                   |

Returns

| Type                                 | Name      | Description                            |
| ------------------------------------ | --------- | -------------------------------------- |
| [Component](./scene_types#component) | component | The new component added to occurrence. |

### addComponents

Add a components to each occurrence in the array.

```python
scene.addComponents(occurrences, componentType) -> scene.ComponentList
```

Parameters

| Type                                           | Name          | Description                                      |
| ---------------------------------------------- | ------------- | ------------------------------------------------ |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences   | Occurrences that need the component to be added. |
| [ComponentType](./scene_types#componenttype)   | componentType | Type of the component.                           |

Returns

| Type                                         | Name       | Description                             |
| -------------------------------------------- | ---------- | --------------------------------------- |
| [ComponentList](./scene_types#componentlist) | components | Component that were added or retrieved. |

### addInParentInstances

Add an instance of prototype's child as child in current occurrence recursively.

```python
scene.addInParentInstances(root)
```

Parameters

| Type                                   | Name | Description             |
| -------------------------------------- | ---- | ----------------------- |
| [Occurrence](./scene_types#occurrence) | root | The occurrence to test. |

### cleanUnusedImages

Remove unused images from texture library.

```python
scene.cleanUnusedImages() -> core.Int
```

Returns

| Type                    | Name             | Description                                 |
| ----------------------- | ---------------- | ------------------------------------------- |
| [Int](./core_types#int) | nbTextureDeleted | The number of texture deleted by the clean. |

### cleanUnusedMaterials

Remove unused materials from material library.

```python
scene.cleanUnusedMaterials(cleanImages=False) -> core.Int
```

Parameters

| Type                            | Name        | Description                     |
| ------------------------------- | ----------- | ------------------------------- |
| [Boolean](./core_types#boolean) | cleanImages | Call cleanUnusedImages if true. |

Returns

| Type                    | Name              | Description                                  |
| ----------------------- | ----------------- | -------------------------------------------- |
| [Int](./core_types#int) | nbMaterialDeleted | The number of material deleted by the clean. |

### computeSubTreeChecksum

Compute the checksum of a sub-tree.

```python
scene.computeSubTreeChecksum(root=None) -> core.String
```

Parameters

| Type                                   | Name | Description            |
| -------------------------------------- | ---- | ---------------------- |
| [Occurrence](./scene_types#occurrence) | root | Occurrence to compute. |

Returns

| Type                          | Name     | Description |
| ----------------------------- | -------- | ----------- |
| [String](./core_types#string) | checksum |             |

### configureFunctionLogger

```python
scene.configureFunctionLogger(functionName, enableFunction, enableParameters, enableExecutionTime)
```

Parameters

| Type                            | Name                | Description |
| ------------------------------- | ------------------- | ----------- |
| [String](./core_types#string)   | functionName        |             |
| [Boolean](./core_types#boolean) | enableFunction      |             |
| [Boolean](./core_types#boolean) | enableParameters    |             |
| [Boolean](./core_types#boolean) | enableExecutionTime |             |

### convertMaterialsToColor

Convert all materials to materials with a color pattern, trying to keep the visual aspect as similar as possible.

```python
scene.convertMaterialsToColor(materials=[])
```

Parameters

| Type                                          | Name      | Description                                        |
| --------------------------------------------- | --------- | -------------------------------------------------- |
| [MaterialList](./material_types#materiallist) | materials | Materials to merge (merge all materials if empty). |

### convertMaterialsToPBR

Convert all materials to materials with a PBR pattern, trying to keep the visual aspect as similar as possible.

```python
scene.convertMaterialsToPBR(materials=[])
```

Parameters

| Type                                          | Name      | Description                                        |
| --------------------------------------------- | --------- | -------------------------------------------------- |
| [MaterialList](./material_types#materiallist) | materials | Materials to merge (merge all materials if empty). |

### createOBBMesh

```python
scene.createOBBMesh(occurrence) -> scene.Occurrence
```

Parameters

| Type                                   | Name       | Description |
| -------------------------------------- | ---------- | ----------- |
| [Occurrence](./scene_types#occurrence) | occurrence |             |

Returns

| Type                                   | Name          | Description            |
| -------------------------------------- | ------------- | ---------------------- |
| [Occurrence](./scene_types#occurrence) | obbOccurrence | The create occurrence. |

### createOccurrence

Create a new occurrence.

```python
scene.createOccurrence(name, parent=None) -> scene.Occurrence
```

Parameters

| Type                                   | Name   | Description                                                                     |
| -------------------------------------- | ------ | ------------------------------------------------------------------------------- |
| [String](./core_types#string)          | name   | Name of the new occurrence.                                                     |
| [Occurrence](./scene_types#occurrence) | parent | Create the occurrence as a child of parent, if not set the parent will be root. |

Returns

| Type                                   | Name       | Description         |
| -------------------------------------- | ---------- | ------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | Created occurrence. |

### createOccurrenceFromSelection

Create a new occurrence and add the given occurrences as children.

```python
scene.createOccurrenceFromSelection(name, children, parent, keepMaterialAssignment=True) -> scene.Occurrence
```

Parameters

| Type                                           | Name                   | Description                                                                                                                                                                                                                                  |
| ---------------------------------------------- | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [String](./core_types#string)                  | name                   | Name of the new occurrence.                                                                                                                                                                                                                  |
| [OccurrenceList](./scene_types#occurrencelist) | children               | Add given occurrence as children (if any).                                                                                                                                                                                                   |
| [Occurrence](./scene_types#occurrence)         | parent                 | If defined, the new occurrence will be created as a child of this parent. Else if children are defined, the first common parent of children will be used as a parent for this new occurrence. Last resort will be to use the root as parent. |
| [Boolean](./core_types#boolean)                | keepMaterialAssignment | If defined, material assignation will be updated to keep the visual same aspect.                                                                                                                                                             |

Returns

| Type                                   | Name       | Description         |
| -------------------------------------- | ---------- | ------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | Created occurrence. |

### createOccurrenceFromText

Creates an occurrence from string.

```python
scene.createOccurrenceFromText(text, font="ChicFont", fontSize=64, color=None, heigth3D=40) -> scene.Occurrence
```

Parameters

| Type                                  | Name     | Description            |
| ------------------------------------- | -------- | ---------------------- |
| [String](./core_types#string)         | text     | The occurrence's name. |
| [String](./core_types#string)         | font     | The font to use.       |
| [Int](./core_types#int)               | fontSize | The font size.         |
| [ColorAlpha](./core_types#coloralpha) | color    | The occurrence color.  |
| [Double](./core_types#double)         | heigth3D | 3D height of text.     |

Returns

| Type                                   | Name       | Description |
| -------------------------------------- | ---------- | ----------- |
| [Occurrence](./scene_types#occurrence) | occurrence |             |

### createOccurrences

Create one new occurrence under each given parent.

```python
scene.createOccurrences(name, parents=None) -> scene.OccurrenceList
```

Parameters

| Type                                           | Name    | Description                                                                                                     |
| ---------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------- |
| [String](./core_types#string)                  | name    | Name of the new occurrence.                                                                                     |
| [OccurrenceList](./scene_types#occurrencelist) | parents | Create the occurrences as a child of each parent. If empty, one occurrence will be created with root as parent. |

Returns

| Type                                           | Name        | Description          |
| ---------------------------------------------- | ----------- | -------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | Created occurrences. |

### createPartsFromMeshes

Create a set of Parts given meshes and occurrences.

```python
scene.createPartsFromMeshes(occurrences, meshes) -> scene.PartList
```

Parameters

| Type                                           | Name        | Description                                                                                                                                 |
| ---------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | The occurrence which will contains the part component of the mesh at the same index.                                                        |
| [MeshList](./polygonal_types#meshlist)         | meshes      | List of mesh to create part, if the mesh is invalid (e.g 0) no part will be created and 0 will be returned in the parts list at this index. |

Returns

| Type                               | Name  | Description                                                                                                    |
| ---------------------------------- | ----- | -------------------------------------------------------------------------------------------------------------- |
| [PartList](./scene_types#partlist) | parts | List of created parts components, if there is no mesh at an index, no part is created and the identifier is 0. |

### createSceneFromMeshes

Create a scene tree with a list of meshes, all meshes becomes part occurrences with the same root. The same mesh Id can be used several times to handle create instances (prototypes).

```python
scene.createSceneFromMeshes(meshes, matrices, centerPartPivots=True) -> scene.Occurrence
```

Parameters

| Type                                    | Name             | Description                                                                                                                                                                                                               |
| --------------------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [MeshList](./polygonal_types#meshlist)  | meshes           | List of input meshes.                                                                                                                                                                                                     |
| [Matrix4List](./geom_types#matrix4list) | matrices         | List of matrices of input meshes (if empty Identity will be used).                                                                                                                                                        |
| [Boolean](./core_types#boolean)         | centerPartPivots | If True, the input meshes will be centered in their local coordinate system and the translation will be set as part matrix. If you want to rollback the meshes to their initial pivots use 'resetPartTransform' function. |

Returns

| Type                                   | Name | Description                  |
| -------------------------------------- | ---- | ---------------------------- |
| [Occurrence](./scene_types#occurrence) | root | The created root occurrence. |

### deleteComponentByType

Delete component from type.

```python
scene.deleteComponentByType(componentType, occurrence, followPrototypes=True)
```

Parameters

| Type                                         | Name             | Description                                                                                         |
| -------------------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------- |
| [ComponentType](./scene_types#componenttype) | componentType    | Type of the component.                                                                              |
| [Occurrence](./scene_types#occurrence)       | occurrence       | The occurrence to remove components from.                                                           |
| [Bool](./core_types#bool)                    | followPrototypes | If true and if the component is not set on the occurrence, try to find it on its prototyping chain. |

### deleteComponentsByType

Delete all components on subtree from type.

```python
scene.deleteComponentsByType(componentType, rootOccurrence=None)
```

Parameters

| Type                                         | Name           | Description                                    |
| -------------------------------------------- | -------------- | ---------------------------------------------- |
| [ComponentType](./scene_types#componenttype) | componentType  | Type of the component.                         |
| [Occurrence](./scene_types#occurrence)       | rootOccurrence | The root occurrence to remove components from. |

### deleteEmptyOccurrences

Delete all empty assemblies. An occurrence is considered empty if it doesn't contain any children and has no Part, Light, Animation, Joint, or Camera component attached.

```python
scene.deleteEmptyOccurrences(root=0)
```

Parameters

| Type                                   | Name | Description                      |
| -------------------------------------- | ---- | -------------------------------- |
| [Occurrence](./scene_types#occurrence) | root | Root occurrence for the process. |

### deleteOccurrences

Delete a liste of occurrences.

```python
scene.deleteOccurrences(occurrences)
```

Parameters

| Type                                           | Name        | Description            |
| ---------------------------------------------- | ----------- | ---------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | Occurrences to delete. |

### generateOctaViews

```python
scene.generateOctaViews(radius, XFrames, YFrames, hemi=False) -> scene.Occurrence
```

Parameters

| Type                          | Name    | Description |
| ----------------------------- | ------- | ----------- |
| [Double](./core_types#double) | radius  |             |
| [Int](./core_types#int)       | XFrames |             |
| [Int](./core_types#int)       | YFrames |             |
| [Bool](./core_types#bool)     | hemi    |             |

Returns

| Type                                   | Name       | Description             |
| -------------------------------------- | ---------- | ----------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The created Occurrence. |

### getAABB

Returns the axis aligned bounding box of a list of occurrences.

```python
scene.getAABB(occurrences, precise=False) -> geom.AABB
```

Parameters

| Type                                           | Name        | Description                                                                                                                                                                                                                                                          |
| ---------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | List of occurrences to retrieve the AABB.                                                                                                                                                                                                                            |
| [Boolean](./core_types#boolean)                | precise     | If true, will take more time but returns the minimal AABB and use the current animation pose. If false, fast but the AABB is approximated and multiple rotation matrices in the tree structure may extend it a lot, also the static pose of the meshes will be used. |

Returns

| Type                      | Name | Description                                             |
| ------------------------- | ---- | ------------------------------------------------------- |
| [AABB](./geom_types#aabb) | aabb | The axis aligned bounding box of all given occurrences. |

### getActiveMaterial

Get the active material on occurrence.

```python
scene.getActiveMaterial(occurrence) -> material.Material
```

Parameters

| Type                                   | Name       | Description     |
| -------------------------------------- | ---------- | --------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence. |

Returns

| Type                                  | Name     | Description   |
| ------------------------------------- | -------- | ------------- |
| [Material](./material_types#material) | material | The material. |

### getActiveMaterials

Get the active materials on multiple occurrences.

```python
scene.getActiveMaterials(occurrences) -> material.MaterialList
```

Parameters

| Type                                           | Name        | Description                                     |
| ---------------------------------------------- | ----------- | ----------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | The occurrences to retrieve active material on. |

Returns

| Type                                          | Name      | Description                                    |
| --------------------------------------------- | --------- | ---------------------------------------------- |
| [MaterialList](./material_types#materiallist) | materials | The active material for each given occurrence. |

### getActivePropertyValue

Get the value of a property on the first parent that own it.

```python
scene.getActivePropertyValue(occurrence, propertyName, cacheProperty=False) -> core.String
```

Parameters

| Type                                   | Name          | Description                                                                                                           |
| -------------------------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence    | An occurrence.                                                                                                        |
| [String](./core_types#string)          | propertyName  | Property name.                                                                                                        |
| [Boolean](./core_types#boolean)        | cacheProperty | If true, the property will be copied on all ancestor of occurrence below the property owner to speed up future calls. |

Returns

| Type                          | Name  | Description     |
| ----------------------------- | ----- | --------------- |
| [String](./core_types#string) | value | Property value. |

### getActivePropertyValues

Get the value of a property on the first parent that own it for each given occurrence.

```python
scene.getActivePropertyValues(occurrences, propertyName, cacheProperty=False) -> core.StringList
```

Parameters

| Type                                           | Name          | Description                                                                                                           |
| ---------------------------------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences   | List of occurrences.                                                                                                  |
| [String](./core_types#string)                  | propertyName  | Property name.                                                                                                        |
| [Boolean](./core_types#boolean)                | cacheProperty | If true, the property will be copied on all ancestor of occurrence below the property owner to speed up future calls. |

Returns

| Type                                  | Name   | Description                         |
| ------------------------------------- | ------ | ----------------------------------- |
| [StringList](./core_types#stringlist) | values | Property value for each occurrence. |

### getAncestors

Returns the list of ancestors for one occurrence.

```python
scene.getAncestors(occurrence) -> scene.OccurrenceList
```

Parameters

| Type                                   | Name       | Description             |
| -------------------------------------- | ---------- | ----------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence to test. |

Returns

| Type                                           | Name         | Description            |
| ---------------------------------------------- | ------------ | ---------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | ancestorList | The list of ancestors. |

### getBrepShape

Returns the Brep shape of a part.

```python
scene.getBrepShape(part) -> scene.BRepShape
```

Parameters

| Type                       | Name | Description |
| -------------------------- | ---- | ----------- |
| [Part](./scene_types#part) | part | The Part.   |

Returns

| Type                                 | Name      | Description                 |
| ------------------------------------ | --------- | --------------------------- |
| [BRepShape](./scene_types#brepshape) | brepShape | The brep shape of the part. |

### getComponent

Returns a component on an occurrence.

```python
scene.getComponent(occurrence, componentType, followPrototypes=True) -> scene.Component
```

Parameters

| Type                                         | Name             | Description                                                                                         |
| -------------------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------- |
| [Occurrence](./scene_types#occurrence)       | occurrence       | The occurrence.                                                                                     |
| [ComponentType](./scene_types#componenttype) | componentType    | Type of the component.                                                                              |
| [Bool](./core_types#bool)                    | followPrototypes | If true and if the component is not set on the occurrence, try to find it on its prototyping chain. |

Returns

| Type                                 | Name      | Description    |
| ------------------------------------ | --------- | -------------- |
| [Component](./scene_types#component) | component | The component. |

### getComponentByOccurrence

> **Warning:**
>
> This function is deprecated.

Returns one component of the specified type by occurrence if it exists.

```python
scene.getComponentByOccurrence(occurrences, componentType, followPrototypes=True) -> scene.ComponentList
```

Parameters

| Type                                           | Name             | Description                                                                                         |
| ---------------------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences      | The occurrences list.                                                                               |
| [ComponentType](./scene_types#componenttype)   | componentType    | Type of the component.                                                                              |
| [Bool](./core_types#bool)                      | followPrototypes | If true and if the component is not set on the occurrence, try to find it on its prototyping chain. |

Returns

| Type                                         | Name       | Description                                      |
| -------------------------------------------- | ---------- | ------------------------------------------------ |
| [ComponentList](./scene_types#componentlist) | components | List of component synchronized with occurrences. |

### getComponentOccurrence

Get the occurrence that own a component.

```python
scene.getComponentOccurrence(component) -> scene.Occurrence
```

Parameters

| Type                                 | Name      | Description    |
| ------------------------------------ | --------- | -------------- |
| [Component](./scene_types#component) | component | The component. |

Returns

| Type                                   | Name       | Description     |
| -------------------------------------- | ---------- | --------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence. |

### getComponentType

Get the type of a component.

```python
scene.getComponentType(component) -> scene.ComponentType
```

Parameters

| Type                                 | Name      | Description    |
| ------------------------------------ | --------- | -------------- |
| [Component](./scene_types#component) | component | The component. |

Returns

| Type                                         | Name          | Description            |
| -------------------------------------------- | ------------- | ---------------------- |
| [ComponentType](./scene_types#componenttype) | componentType | Type of the component. |

### getComponents

Returns one component of the specified type by occurrence if it exists.

```python
scene.getComponents(occurrences, componentType, followPrototypes=True) -> scene.ComponentList
```

Parameters

| Type                                           | Name             | Description                                                                                         |
| ---------------------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences      | The occurrences list.                                                                               |
| [ComponentType](./scene_types#componenttype)   | componentType    | Type of the component.                                                                              |
| [Bool](./core_types#bool)                      | followPrototypes | If true and if the component is not set on the occurrence, try to find it on its prototyping chain. |

Returns

| Type                                         | Name       | Description                                      |
| -------------------------------------------- | ---------- | ------------------------------------------------ |
| [ComponentList](./scene_types#componentlist) | components | List of component synchronized with occurrences. |

### getGlobalMatrices

Returns the global matrix for each given occurrence.

```python
scene.getGlobalMatrices(occurrences) -> geom.Matrix4List
```

Parameters

| Type                                           | Name        | Description                    |
| ---------------------------------------------- | ----------- | ------------------------------ |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | Nodes to get the local matrix. |

Returns

| Type                                    | Name     | Description                            |
| --------------------------------------- | -------- | -------------------------------------- |
| [Matrix4List](./geom_types#matrix4list) | matrices | The global matrix for each given node. |

### getGlobalMatrix

Returns the global matrix on an occurrence.

```python
scene.getGlobalMatrix(occurrence) -> geom.Matrix4
```

Parameters

| Type                                   | Name       | Description                          |
| -------------------------------------- | ---------- | ------------------------------------ |
| [Occurrence](./scene_types#occurrence) | occurrence | Occurrence to get the global matrix. |

Returns

| Type                            | Name   | Description                          |
| ------------------------------- | ------ | ------------------------------------ |
| [Matrix4](./geom_types#matrix4) | matrix | The global matrix of the occurrence. |

### getGlobalVisibility

Returns the global visibility of a given occurrence.

```python
scene.getGlobalVisibility(occurrence) -> core.Boolean
```

Parameters

| Type                                   | Name       | Description                              |
| -------------------------------------- | ---------- | ---------------------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | Occurrence to get the global visibility. |

Returns

| Type                            | Name    | Description                                    |
| ------------------------------- | ------- | ---------------------------------------------- |
| [Boolean](./core_types#boolean) | visible | True if the occurrence is visible, else False. |

### getLocalMatrices

Returns the local matrix for each given occurrence.

```python
scene.getLocalMatrices(occurrences) -> geom.Matrix4List
```

Parameters

| Type                                           | Name        | Description                    |
| ---------------------------------------------- | ----------- | ------------------------------ |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | Nodes to get the local matrix. |

Returns

| Type                                    | Name     | Description                           |
| --------------------------------------- | -------- | ------------------------------------- |
| [Matrix4List](./geom_types#matrix4list) | matrices | The local matrix for each given node. |

### getLocalMatrix

Returns the local matrix on an occurrence.

```python
scene.getLocalMatrix(occurrence) -> geom.Matrix4
```

Parameters

| Type                                   | Name       | Description                   |
| -------------------------------------- | ---------- | ----------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | Node to get the local matrix. |

Returns

| Type                            | Name   | Description            |
| ------------------------------- | ------ | ---------------------- |
| [Matrix4](./geom_types#matrix4) | matrix | The node local matrix. |

### getMBB

Returns the Minimum Bounding Box of a list of occurrences.

```python
scene.getMBB(occurrences, forcedAxis=geom.Vector3(0,0,0)) -> geom.MBB
```

Parameters

| Type                                           | Name        | Description                              |
| ---------------------------------------------- | ----------- | ---------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | List of occurrences to retrieve the MBB. |
| [Vector3](./geom_types#vector3)                | forcedAxis  | Forced axis of the mbb.                  |

Returns

| Type                    | Name | Description                                        |
| ----------------------- | ---- | -------------------------------------------------- |
| [MBB](./geom_types#mbb) | mbb  | The minimum bounding box of all given occurrences. |

### getMaterialsFromSubtree

```python
scene.getMaterialsFromSubtree(occurrence) -> material.MaterialList
```

Parameters

| Type                                   | Name       | Description                                                              |
| -------------------------------------- | ---------- | ------------------------------------------------------------------------ |
| [Occurrence](./scene_types#occurrence) | occurrence | Root occurrence of the subtree on which to get the materials and images. |

Returns

| Type                                          | Name      | Description              |
| --------------------------------------------- | --------- | ------------------------ |
| [MaterialList](./material_types#materiallist) | materials | The retrieved materials. |

### getOBB

Returns the Oriented Bounding Box of a list of occurrences (works only on meshes, fast method, not the Minimum Volume Box).

```python
scene.getOBB(occurrences) -> geom.OBB
```

Parameters

| Type                                           | Name        | Description                              |
| ---------------------------------------------- | ----------- | ---------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | List of occurrences to retrieve the OBB. |

Returns

| Type                    | Name | Description                                         |
| ----------------------- | ---- | --------------------------------------------------- |
| [OBB](./geom_types#obb) | obb  | The oriented bounding box of all given occurrences. |

### getOccurrenceActiveMaterial

Returns the active material on a given occurrence.

```python
scene.getOccurrenceActiveMaterial(occurrence) -> material.Material
```

Parameters

| Type                                   | Name       | Description                            |
| -------------------------------------- | ---------- | -------------------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | Occurrence to get the active material. |

Returns

| Type                                  | Name     | Description                            |
| ------------------------------------- | -------- | -------------------------------------- |
| [Material](./material_types#material) | material | The active material of the occurrence. |

### getOccurrenceName

Returns the name of an occurrence.

```python
scene.getOccurrenceName(occurrence) -> core.String
```

Parameters

| Type                                   | Name       | Description                     |
| -------------------------------------- | ---------- | ------------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence to get the name. |

Returns

| Type                          | Name | Description          |
| ----------------------------- | ---- | -------------------- |
| [String](./core_types#string) | name | The occurrence name. |

### getOccurrencesWithComponent

Recursively get all the occurrences containing a component of the specified type.

```python
scene.getOccurrencesWithComponent(componentType, fromOcc=None) -> scene.OccurrenceList
```

Parameters

| Type                                         | Name          | Description                         |
| -------------------------------------------- | ------------- | ----------------------------------- |
| [ComponentType](./scene_types#componenttype) | componentType | The component type.                 |
| [Occurrence](./scene_types#occurrence)       | fromOcc       | Source occurrence of the recursion. |

Returns

| Type                                           | Name        | Description         |
| ---------------------------------------------- | ----------- | ------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | Result occurrences. |

### getPartActiveShape

Returns the active shape of a part.

```python
scene.getPartActiveShape(part) -> scene.Shape
```

Parameters

| Type                       | Name | Description |
| -------------------------- | ---- | ----------- |
| [Part](./scene_types#part) | part | The part.   |

Returns

| Type                         | Name  | Description                 |
| ---------------------------- | ----- | --------------------------- |
| [Shape](./scene_types#shape) | shape | The active shape of a part. |

### getPartLocalMatrix

Returns the local matrix on a part.

```python
scene.getPartLocalMatrix(part) -> geom.Matrix4
```

Parameters

| Type                       | Name | Description                   |
| -------------------------- | ---- | ----------------------------- |
| [Part](./scene_types#part) | part | Part to get the local matrix. |

Returns

| Type                            | Name   | Description            |
| ------------------------------- | ------ | ---------------------- |
| [Matrix4](./geom_types#matrix4) | matrix | The part local matrix. |

### getPartOccurrences

Recursively get all the occurrences containing a part component.

```python
scene.getPartOccurrences(fromOcc=None) -> scene.OccurrenceList
```

Parameters

| Type                                   | Name    | Description                         |
| -------------------------------------- | ------- | ----------------------------------- |
| [Occurrence](./scene_types#occurrence) | fromOcc | Source occurrence of the recursion. |

Returns

| Type                                           | Name        | Description         |
| ---------------------------------------------- | ----------- | ------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | Result occurrences. |

### getPartShapeType

Get the part's shape type.

```python
scene.getPartShapeType(part) -> scene.ShapeType
```

Parameters

| Type                       | Name | Description       |
| -------------------------- | ---- | ----------------- |
| [Part](./scene_types#part) | part | The part to test. |

Returns

| Type                                 | Name      | Description   |
| ------------------------------------ | --------- | ------------- |
| [ShapeType](./scene_types#shapetype) | shapeType | Shape's type. |

### getPolygonCount

Returns the number of polygon in the parts meshes.

```python
scene.getPolygonCount(occurrences, asTriangleCount=False, countOnceEachInstance=False, countHidden=False) -> core.ULong
```

Parameters

| Type                                           | Name                  | Description                                                 |
| ---------------------------------------------- | --------------------- | ----------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences           | The part occurrences.                                       |
| [Bool](./core_types#bool)                      | asTriangleCount       | If true count the equivalent of triangles for each polygon. |
| [Bool](./core_types#bool)                      | countOnceEachInstance | If true ignore multiple instance of each tessellation.      |
| [Bool](./core_types#bool)                      | countHidden           | If true, also count hidden components.                      |

Returns

| Type                        | Name         | Description             |
| --------------------------- | ------------ | ----------------------- |
| [ULong](./core_types#ulong) | polygonCount | The number of polygons. |

### getSubTreeStats

Returns some stats of a sub tree.

```python
scene.getSubTreeStats(roots) -> core.ULong, core.ULong, core.ULong, core.ULong, core.ULong, core.ULong, core.ULong, core.ULong, core.ULong, core.ULong, core.ULong
```

Parameters

| Type                                           | Name  | Description                           |
| ---------------------------------------------- | ----- | ------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | roots | The root occurrences to get stats on. |

Returns

| Type                        | Name                    | Description                                                                                                    |
| --------------------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------- |
| [ULong](./core_types#ulong) | partCount               | Number of parts in the sub-tree (instances are counted once).                                                  |
| [ULong](./core_types#ulong) | partOccurrenceCount     | Number of part occurrence in the sub-tree (instances are counted multiple times).                              |
| [ULong](./core_types#ulong) | triangleCount           | Number of triangles in the sub-tree (instances are counted once, quadrangle count for 2 triangles).            |
| [ULong](./core_types#ulong) | triangleOccurrenceCount | Number of triangles in the sub-tree (instances are counted multiples times, quadrangle count for 2 triangles). |
| [ULong](./core_types#ulong) | vertexCount             | Number of surfacic vertices in the sub-tree (instances are counted once).                                      |
| [ULong](./core_types#ulong) | vertexOccurrenceCount   | Number of surfacic vertices in the sub-tree (instances are counted multiples times).                           |
| [ULong](./core_types#ulong) | pointCount              | Number of free vertices (points) in the sub-tree (instances are counted once).                                 |
| [ULong](./core_types#ulong) | pointOccurrenceCount    | Number of free vertices (points) in the sub-tree (instances are counted multiples times).                      |
| [ULong](./core_types#ulong) | lineCount               | Number of free edges (line) in the sub-tree (instances are counted once).                                      |
| [ULong](./core_types#ulong) | lineOccurrenceCount     | Number of free edges (line) in the sub-tree (instances are counted multiples times).                           |
| [ULong](./core_types#ulong) | patchesCount            | Number of patches in the sub-tree (instances are counted multiples times).                                     |

### getVertexCount

Returns the number of vertices in the parts meshes.

```python
scene.getVertexCount(occurrences, countOnceEachInstance=False, countHidden=False, countPoints=False, countMergedVertices=False) -> core.ULong
```

Parameters

| Type                                           | Name                  | Description                                             |
| ---------------------------------------------- | --------------------- | ------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences           | The part occurrences.                                   |
| [Bool](./core_types#bool)                      | countOnceEachInstance | If true ignore multiple instance of each tessellation.  |
| [Bool](./core_types#bool)                      | countHidden           | If true, also count hidden components.                  |
| [Bool](./core_types#bool)                      | countPoints           | If true, also count points (for points cloud).          |
| [Bool](./core_types#bool)                      | countMergedVertices   | If true count all merged vertices in each tessellation. |

Returns

| Type                        | Name        | Description             |
| --------------------------- | ----------- | ----------------------- |
| [ULong](./core_types#ulong) | vertexCount | The number of vertices. |

### getViewpointsFromCavities

Returns viewpoints from model cavities.

```python
scene.getViewpointsFromCavities(voxelSize, minCavityVolume) -> geom.Point3List, geom.Point3List
```

Parameters

| Type                              | Name            | Description                                 |
| --------------------------------- | --------------- | ------------------------------------------- |
| [Distance](./geom_types#distance) | voxelSize       | Precision for cavities detection.           |
| [Distance](./geom_types#distance) | minCavityVolume | Minimum volume for a cavity to be returned. |

Returns

| Type                                  | Name       | Description                   |
| ------------------------------------- | ---------- | ----------------------------- |
| [Point3List](./geom_types#point3list) | positions  | List of viewpoint positions.  |
| [Point3List](./geom_types#point3list) | directions | List of viewpoint directions. |

### getVolume

Return the volume of the occurrence.

```python
scene.getVolume(occurrence) -> core.Double
```

Parameters

| Type                                   | Name       | Description       |
| -------------------------------------- | ---------- | ----------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | Entry occurrence. |

Returns

| Type                          | Name   | Description          |
| ----------------------------- | ------ | -------------------- |
| [Double](./core_types#double) | volume | The computed volume. |

### getVolumes

Return the volume of a set of root occurrences.

```python
scene.getVolumes(iRoots) -> core.DoubleList
```

Parameters

| Type                                           | Name   | Description    |
| ---------------------------------------------- | ------ | -------------- |
| [OccurrenceList](./scene_types#occurrencelist) | iRoots | List of roots. |

Returns

| Type                                  | Name    | Description           |
| ------------------------------------- | ------- | --------------------- |
| [DoubleList](./core_types#doublelist) | volumes | The computed volumes. |

### hasComponent

Returns True if the given occurrence has the given component type.

```python
scene.hasComponent(occurrence, componentType, followPrototypes=True) -> core.Boolean
```

Parameters

| Type                                         | Name             | Description                                                                                         |
| -------------------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------- |
| [Occurrence](./scene_types#occurrence)       | occurrence       | The occurrence.                                                                                     |
| [ComponentType](./scene_types#componenttype) | componentType    | Type of the component.                                                                              |
| [Bool](./core_types#bool)                    | followPrototypes | If true and if the component is not set on the occurrence, try to find it on its prototyping chain. |

Returns

| Type                            | Name    | Description |
| ------------------------------- | ------- | ----------- |
| [Boolean](./core_types#boolean) | hasComp |             |

### hide

Hide the given occurrences.

```python
scene.hide(occurrences)
```

Parameters

| Type                                           | Name        | Description                      |
| ---------------------------------------------- | ----------- | -------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | The list of occurrences to hide. |

### inverseVisibility

Inverse the visibility of the given occurrences.

```python
scene.inverseVisibility(occurrences)
```

Parameters

| Type                                           | Name        | Description              |
| ---------------------------------------------- | ----------- | ------------------------ |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | The list of occurrences. |

### isAncestorOf

Test if an occurrence is an ancestor of another one.

```python
scene.isAncestorOf(maybeAncestor, occurrence) -> core.Bool
```

Parameters

| Type                                   | Name          | Description                               |
| -------------------------------------- | ------------- | ----------------------------------------- |
| [Occurrence](./scene_types#occurrence) | maybeAncestor | The potential ancestor of the occurrence. |
| [Occurrence](./scene_types#occurrence) | occurrence    | The occurrence to test.                   |

Returns

| Type                      | Name       | Description                                 |
| ------------------------- | ---------- | ------------------------------------------- |
| [Bool](./core_types#bool) | isAncestor | If occurrences are ancestor to one another. |

### keepAncestors

Filter a list of occurrences by removing all occurrences which have an ancestor inside the list.

```python
scene.keepAncestors(occurrences) -> scene.OccurrenceList
```

Parameters

| Type                                           | Name        | Description                      |
| ---------------------------------------------- | ----------- | -------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | The list that shall be filtered. |

Returns

| Type                                           | Name         | Description                              |
| ---------------------------------------------- | ------------ | ---------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | filteredList | The list without descendants of members. |

### listComponent

List all components on a type on the whole tree.

```python
scene.listComponent(componentType) -> scene.ComponentList
```

Parameters

| Type                                         | Name          | Description         |
| -------------------------------------------- | ------------- | ------------------- |
| [ComponentType](./scene_types#componenttype) | componentType | The component type. |

Returns

| Type                                         | Name       | Description                            |
| -------------------------------------------- | ---------- | -------------------------------------- |
| [ComponentList](./scene_types#componentlist) | components | The component list of the type chosen. |

### listComponents

List all components on an occurrence.

```python
scene.listComponents(occurrence, followPrototypes=True) -> scene.ComponentList
```

Parameters

| Type                                   | Name             | Description                                          |
| -------------------------------------- | ---------------- | ---------------------------------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence       | The occurrence to list the components.               |
| [Bool](./core_types#bool)              | followPrototypes | If true list also components owned by the prototype. |

Returns

| Type                                         | Name       | Description                             |
| -------------------------------------------- | ---------- | --------------------------------------- |
| [ComponentList](./scene_types#componentlist) | components | The components owned by the occurrence. |

### mergeImages

Merge all equivalent images (i.e. with same pixels).

```python
scene.mergeImages(images=[]) -> core.Int
```

Parameters

| Type                                    | Name   | Description                                  |
| --------------------------------------- | ------ | -------------------------------------------- |
| [ImageList](./material_types#imagelist) | images | Images to merge (merge all images if empty). |

Returns

| Type                    | Name      | Description                            |
| ----------------------- | --------- | -------------------------------------- |
| [Int](./core_types#int) | nbTexture | The number of texture after the merge. |

### mergeMaterials

Merge all equivalent materials (i.e. with same appearance).

```python
scene.mergeMaterials(materials=[], evaluateNames=False) -> core.Int
```

Parameters

| Type                                          | Name          | Description                                                                                                                                                                          |
| --------------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [MaterialList](./material_types#materiallist) | materials     | Materials to merge (merge all materials if empty).                                                                                                                                   |
| [Boolean](./core_types#boolean)               | evaluateNames | If true, materials names will be taken into consideration (on top of other properties). It means that materials having same properties but different names won't be merged together. |

Returns

| Type                    | Name       | Description                             |
| ----------------------- | ---------- | --------------------------------------- |
| [Int](./core_types#int) | nbMaterial | The number of material after the merge. |

### removeMaterials

Recursively remove all materials.

```python
scene.removeMaterials(roots=None)
```

Parameters

| Type                                           | Name  | Description                                                                           |
| ---------------------------------------------- | ----- | ------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | roots | If specified, remove materials only from the given occurrences and their descendants. |

### renameLongOccurrenceName

Truncate names of occurrence with too long names.

```python
scene.renameLongOccurrenceName(maxLength=128)
```

Parameters

| Type                    | Name      | Description          |
| ----------------------- | --------- | -------------------- |
| [Int](./core_types#int) | maxLength | Maximum name length. |

### replaceMaterial

Replace a material by another everywhere it is used.

```python
scene.replaceMaterial(originalMaterial, newMaterial, occurrences=None)
```

Parameters

| Type                                           | Name             | Description                                           |
| ---------------------------------------------- | ---------------- | ----------------------------------------------------- |
| [Material](./material_types#material)          | originalMaterial | The material to replace everywhere.                   |
| [Material](./material_types#material)          | newMaterial      | The new material to set in place of originalMaterial. |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences      | The occurrences on which replacing the materials.     |

### resizeTextures

Resizes the textures from a selection of occurrences (resizes all textures used by these occurrences), or from a selection of textures.

```python
scene.resizeTextures(inputMode, resizeMode, replaceTextures=True)
```

Parameters

| Type                                                               | Name            | Description                                                                                                                                           |
| ------------------------------------------------------------------ | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| [ResizeTexturesInputMode](./scene_types#resizetexturesinputmode)   | inputMode       | Defines if the textures to resize are textures used by a selection of Occurrences, or a selection among the textures available in the scene.          |
| [ResizeTexturesResizeMode](./scene_types#resizetexturesresizemode) | resizeMode      | Defines if the textures are resized following a ratio or following a maximum size/resolution (only textures above the defined maximum are downsized). |
| [Bool](./core_types#bool)                                          | replaceTextures | If True, overwrites textures from the selection.                                                                                                      |

### setComponentOccurrence

Move a component to an occurrence.

```python
scene.setComponentOccurrence(component, occurrence)
```

Parameters

| Type                                   | Name       | Description     |
| -------------------------------------- | ---------- | --------------- |
| [Component](./scene_types#component)   | component  | The component.  |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence. |

### setDefaultVariant

Set the default variant.

```python
scene.setDefaultVariant()
```

### setOccurrenceMaterial

Set the material on a occurrence.

```python
scene.setOccurrenceMaterial(occurrence, material)
```

Parameters

| Type                                   | Name       | Description                     |
| -------------------------------------- | ---------- | ------------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | Occurrence to set the material. |
| [Material](./material_types#material)  | material   | The new occurrence material.    |

### setOccurrenceName

Returns the name of an occurrence.

```python
scene.setOccurrenceName(occurrence, name)
```

Parameters

| Type                                   | Name       | Description                     |
| -------------------------------------- | ---------- | ------------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence to get the name. |
| [String](./core_types#string)          | name       | The occurrence name.            |

### show

Show the given occurrences.

```python
scene.show(occurrences)
```

Parameters

| Type                                           | Name        | Description                   |
| ---------------------------------------------- | ----------- | ----------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | The list occurrences to show. |

### showOnly

Show only the given occurrences.

```python
scene.showOnly(occurrences)
```

Parameters

| Type                                           | Name        | Description                   |
| ---------------------------------------------- | ----------- | ----------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | The list occurrences to show. |

### transferCADMaterialsOnPartOccurrences

Set all materials on part occurrences.

```python
scene.transferCADMaterialsOnPartOccurrences(rootOccurrence=None)
```

Parameters

| Type                                   | Name           | Description      |
| -------------------------------------- | -------------- | ---------------- |
| [Occurrence](./scene_types#occurrence) | rootOccurrence | Root occurrence. |

### transferMaterialsOnPatches

Take the first instance material and set it one the mesh patches.

```python
scene.transferMaterialsOnPatches(rootOccurrence=None)
```

Parameters

| Type                                   | Name           | Description      |
| -------------------------------------- | -------------- | ---------------- |
| [Occurrence](./scene_types#occurrence) | rootOccurrence | Root occurrence. |

## Clustering

### createHierarchicalClusters

Reorganize a sub tree with hierarchical clustering.

```python
scene.createHierarchicalClusters(root, childrenCountByNode=2, minFitting=-1) -> scene.Occurrence
```

Parameters

| Type                                   | Name                | Description                                                          |
| -------------------------------------- | ------------------- | -------------------------------------------------------------------- |
| [Occurrence](./scene_types#occurrence) | root                | Root of the sub-tree to reorganize.                                  |
| [Int](./core_types#int)                | childrenCountByNode | Order of the hierarchical tree.                                      |
| [Coeff](./core_types#coeff)            | minFitting          | Minimal fitting coefficient to allow 2 nodes to be merged/clustered. |

Returns

| Type                                   | Name | Description                   |
| -------------------------------------- | ---- | ----------------------------- |
| [Occurrence](./scene_types#occurrence) | root | Hierarchical clustering root. |

See also:

* [scene.generateOctree](./scene_functions#generateoctree)
* [scene.getClusters](./scene_functions#getclusters)
* [scene.getPartOccurrencesGroupedBySimilarity](./scene_functions#getpartoccurrencesgroupedbysimilarity)

### generateOctree

Generate a loose octree from the given sub-tree.

```python
scene.generateOctree(occurrence, maxDepth=5, looseFactor=2) -> scene.Occurrence
```

Parameters

| Type                                   | Name        | Description                              |
| -------------------------------------- | ----------- | ---------------------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence  | Root occurrence of the sub-tree.         |
| [Int](./core_types#int)                | maxDepth    | Defines the depth maximum of the octree. |
| [Double](./core_types#double)          | looseFactor | Defines the loose factor of the octree.  |

Returns

| Type                                   | Name         | Description |
| -------------------------------------- | ------------ | ----------- |
| [Occurrence](./scene_types#occurrence) | rootOctreeId |             |

See also:

* [scene.createHierarchicalClusters](./scene_functions#createhierarchicalclusters)
* [scene.getClusters](./scene_functions#getclusters)
* [scene.getPartOccurrencesGroupedBySimilarity](./scene_functions#getpartoccurrencesgroupedbysimilarity)

### getClusters

Get groups of occurrences based on spatial proximity.

```python
scene.getClusters(occurrences, strategy) -> scene.OccurrenceListList
```

Parameters

| Type                                                           | Name        | Description              |
| -------------------------------------------------------------- | ----------- | ------------------------ |
| [OccurrenceList](./scene_types#occurrencelist)                 | occurrences | Input occurrences.       |
| [MergeByRegionsStrategy](./scene_types#mergebyregionsstrategy) | strategy    | Number: number of groups |
|                                                                |             |                          |

Returns

| Type                                                   | Name     | Description            |
| ------------------------------------------------------ | -------- | ---------------------- |
| [OccurrenceListList](./scene_types#occurrencelistlist) | clusters | Groups of occurrences. |

See also:

* [scene.createHierarchicalClusters](./scene_functions#createhierarchicalclusters)
* [scene.generateOctree](./scene_functions#generateoctree)
* [scene.getPartOccurrencesGroupedBySimilarity](./scene_functions#getpartoccurrencesgroupedbysimilarity)

### getPartOccurrencesGroupedBySimilarity

Get groups of occurrences based on various criteria (see parameters). Returns a list of groups ; each group is either a list of parts considered similar (depending on criteria) or is a singleton that has no similar parts.

```python
scene.getPartOccurrencesGroupedBySimilarity(root=0, acceptVolumeRatio=0.01, acceptPolycountRatio=0.1, acceptAABBAxisRatio=0.01, acceptAABBCenterDistance=0.1) -> scene.OccurrenceListList
```

Parameters

| Type                                   | Name                     | Description                                                                                                                   |
| -------------------------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
| [Occurrence](./scene_types#occurrence) | root                     | Root occurrence for the process.                                                                                              |
| [Real](./core_types#real)              | acceptVolumeRatio        | If the ratio of volumes of two parts is lower than acceptVolumeRatio, they will be considered duplicated.                     |
| [Real](./core_types#real)              | acceptPolycountRatio     | If the ratio of polygon counts of two parts is lower than acceptPolycountRatio, they will be considered duplicated.           |
| [Real](./core_types#real)              | acceptAABBAxisRatio      | If the ratio of AABB axis of two parts is lower than acceptAABBAxisRatio, they will be considered duplicated.                 |
| [Distance](./geom_types#distance)      | acceptAABBCenterDistance | If the distance between AABB centers of two parts is lower than acceptAABBCenterDistance, they will be considered duplicated. |

Returns

| Type                                                   | Name                               | Description                                                                                                                                                        |
| ------------------------------------------------------ | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [OccurrenceListList](./scene_types#occurrencelistlist) | partOccurrencesGroupedBySimilarity | All part occurrences grouped by similarity: each element in the list is a list of similar parts (as defined by parameters) or a singleton having no similar parts. |

See also:

* [scene.createHierarchicalClusters](./scene_functions#createhierarchicalclusters)
* [scene.generateOctree](./scene_functions#generateoctree)
* [scene.getClusters](./scene_functions#getclusters)

## Create primitives

### createCapsule

Create a new capsule.

```python
scene.createCapsule(radius=250, height=250, subdivisionLatitude=16, subdivisionLongitude=16, generateUV=True) -> scene.Occurrence
```

Parameters

| Type                            | Name                 | Description                                                     |
| ------------------------------- | -------------------- | --------------------------------------------------------------- |
| [Double](./core_types#double)   | radius               | Radius of the Capsule.                                          |
| [Double](./core_types#double)   | height               | Height of the Capsule (excluding the two size of half spheres). |
| [Int](./core_types#int)         | subdivisionLatitude  | Subdivision of the Capsule on the Latitude.                     |
| [Int](./core_types#int)         | subdivisionLongitude | Subdivision of the Capsule (two half spheres) on the Longitude. |
| [Boolean](./core_types#boolean) | generateUV           | Generation of the UV.                                           |

Returns

| Type                                   | Name       | Description             |
| -------------------------------------- | ---------- | ----------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The created Occurrence. |

See also:

* [scene.createCone](./scene_functions#createcone)
* [scene.createCube](./scene_functions#createcube)
* [scene.createCylinder](./scene_functions#createcylinder)
* [scene.createImmersion](./scene_functions#createimmersion)
* [scene.createPlane](./scene_functions#createplane)
* [scene.createSphere](./scene_functions#createsphere)
* [scene.createTorus](./scene_functions#createtorus)

### createCone

Create a new cone.

```python
scene.createCone(bottomRadius=250, height=500, sides=16, generateUV=True) -> scene.Occurrence
```

Parameters

| Type                            | Name         | Description                        |
| ------------------------------- | ------------ | ---------------------------------- |
| [Double](./core_types#double)   | bottomRadius | Radius of the bottom of the cone . |
| [Double](./core_types#double)   | height       | Height of the cone.                |
| [Int](./core_types#int)         | sides        | Number of sides of the cone.       |
| [Boolean](./core_types#boolean) | generateUV   | Generation of the UV.              |

Returns

| Type                                   | Name       | Description             |
| -------------------------------------- | ---------- | ----------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The created Occurrence. |

See also:

* [scene.createCapsule](./scene_functions#createcapsule)
* [scene.createCube](./scene_functions#createcube)
* [scene.createCylinder](./scene_functions#createcylinder)
* [scene.createImmersion](./scene_functions#createimmersion)
* [scene.createPlane](./scene_functions#createplane)
* [scene.createSphere](./scene_functions#createsphere)
* [scene.createTorus](./scene_functions#createtorus)

### createCube

Create a new cube.

```python
scene.createCube(sizeX=1000, sizeY=1000, sizeZ=1000, subdivision=1, generateUV=True) -> scene.Occurrence
```

Parameters

| Type                            | Name        | Description                              |
| ------------------------------- | ----------- | ---------------------------------------- |
| [Double](./core_types#double)   | sizeX       | Size of the Cube on the x axis.          |
| [Double](./core_types#double)   | sizeY       | Size of the Cube on the y axis.          |
| [Double](./core_types#double)   | sizeZ       | Size of the Cube on the z axis.          |
| [Int](./core_types#int)         | subdivision | Subdivision of the Cube on all the axis. |
| [Boolean](./core_types#boolean) | generateUV  | Generation of the UV.                    |

Returns

| Type                                   | Name       | Description             |
| -------------------------------------- | ---------- | ----------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The created Occurrence. |

See also:

* [scene.createCapsule](./scene_functions#createcapsule)
* [scene.createCone](./scene_functions#createcone)
* [scene.createCylinder](./scene_functions#createcylinder)
* [scene.createImmersion](./scene_functions#createimmersion)
* [scene.createPlane](./scene_functions#createplane)
* [scene.createSphere](./scene_functions#createsphere)
* [scene.createTorus](./scene_functions#createtorus)

### createCylinder

Create a new cylinder.

```python
scene.createCylinder(radius=250, height=1000, sides=16, generateUV=True) -> scene.Occurrence
```

Parameters

| Type                            | Name       | Description                      |
| ------------------------------- | ---------- | -------------------------------- |
| [Double](./core_types#double)   | radius     | Radius of the Cylinder.          |
| [Double](./core_types#double)   | height     | Height of the Cylinder.          |
| [Int](./core_types#int)         | sides      | Number of Sides of the Cylinder. |
| [Boolean](./core_types#boolean) | generateUV | Generation of the UV.            |

Returns

| Type                                   | Name       | Description             |
| -------------------------------------- | ---------- | ----------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The created Occurrence. |

See also:

* [scene.createCapsule](./scene_functions#createcapsule)
* [scene.createCone](./scene_functions#createcone)
* [scene.createCube](./scene_functions#createcube)
* [scene.createImmersion](./scene_functions#createimmersion)
* [scene.createPlane](./scene_functions#createplane)
* [scene.createSphere](./scene_functions#createsphere)
* [scene.createTorus](./scene_functions#createtorus)

### createImmersion

Create a new bagel klein.

```python
scene.createImmersion(radius=2.5, subdivisionX=100, subdivisionY=15) -> scene.Occurrence
```

Parameters

| Type                          | Name         | Description                                    |
| ----------------------------- | ------------ | ---------------------------------------------- |
| [Double](./core_types#double) | radius       | Radius of the Immersion.                       |
| [Int](./core_types#int)       | subdivisionX | Subdivision of the Immersion on the Latitude.  |
| [Int](./core_types#int)       | subdivisionY | Subdivision of the Immersion on the Longitude. |

Returns

| Type                                   | Name       | Description             |
| -------------------------------------- | ---------- | ----------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The created Occurrence. |

See also:

* [scene.createCapsule](./scene_functions#createcapsule)
* [scene.createCone](./scene_functions#createcone)
* [scene.createCube](./scene_functions#createcube)
* [scene.createCylinder](./scene_functions#createcylinder)
* [scene.createPlane](./scene_functions#createplane)
* [scene.createSphere](./scene_functions#createsphere)
* [scene.createTorus](./scene_functions#createtorus)

### createPlane

Create a  new plane.

```python
scene.createPlane(sizeX=1000, sizeY=1000, subdivisionX=1, subdivisionY=1, generateUV=True) -> scene.Occurrence
```

Parameters

| Type                            | Name         | Description                             |
| ------------------------------- | ------------ | --------------------------------------- |
| [Double](./core_types#double)   | sizeX        | Size of the Plane on the x axis.        |
| [Double](./core_types#double)   | sizeY        | Size of the Plane on the y axis.        |
| [Int](./core_types#int)         | subdivisionX | Subdivision of the Plane on the x axis. |
| [Int](./core_types#int)         | subdivisionY | Subdivision of the Plane on the y axis. |
| [Boolean](./core_types#boolean) | generateUV   | Generation of the UV.                   |

Returns

| Type                                   | Name       | Description             |
| -------------------------------------- | ---------- | ----------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The created Occurrence. |

See also:

* [scene.createCapsule](./scene_functions#createcapsule)
* [scene.createCone](./scene_functions#createcone)
* [scene.createCube](./scene_functions#createcube)
* [scene.createCylinder](./scene_functions#createcylinder)
* [scene.createImmersion](./scene_functions#createimmersion)
* [scene.createSphere](./scene_functions#createsphere)
* [scene.createTorus](./scene_functions#createtorus)

### createSphere

Create a new sphere.

```python
scene.createSphere(radius=500, subdivisionLatitude=16, subdivisionLongitude=16, generateUV=True) -> scene.Occurrence
```

Parameters

| Type                            | Name                 | Description                                 |
| ------------------------------- | -------------------- | ------------------------------------------- |
| [Double](./core_types#double)   | radius               | Radius of the Sphere.                       |
| [Int](./core_types#int)         | subdivisionLatitude  | Subdivision of the Sphere on the Latitude.  |
| [Int](./core_types#int)         | subdivisionLongitude | Subdivision of the Sphere on the Longitude. |
| [Boolean](./core_types#boolean) | generateUV           | Generation of the UV.                       |

Returns

| Type                                   | Name       | Description             |
| -------------------------------------- | ---------- | ----------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The created Occurrence. |

See also:

* [scene.createCapsule](./scene_functions#createcapsule)
* [scene.createCone](./scene_functions#createcone)
* [scene.createCube](./scene_functions#createcube)
* [scene.createCylinder](./scene_functions#createcylinder)
* [scene.createImmersion](./scene_functions#createimmersion)
* [scene.createPlane](./scene_functions#createplane)
* [scene.createTorus](./scene_functions#createtorus)

### createTorus

Create a new torus.

```python
scene.createTorus(majorRadius=250, minorRadius=75, subdivisionLatitude=16, subdivisionLongitude=16, generateUV=True) -> scene.Occurrence
```

Parameters

| Type                            | Name                 | Description                                |
| ------------------------------- | -------------------- | ------------------------------------------ |
| [Double](./core_types#double)   | majorRadius          | Major Radius.                              |
| [Double](./core_types#double)   | minorRadius          | Minor Radius.                              |
| [Int](./core_types#int)         | subdivisionLatitude  | Subdivision of the Torus on the Latitude.  |
| [Int](./core_types#int)         | subdivisionLongitude | Subdivision of the Torus on the Longitude. |
| [Boolean](./core_types#boolean) | generateUV           | Generation of the UV.                      |

Returns

| Type                                   | Name       | Description             |
| -------------------------------------- | ---------- | ----------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The created Occurrence. |

See also:

* [scene.createCapsule](./scene_functions#createcapsule)
* [scene.createCone](./scene_functions#createcone)
* [scene.createCube](./scene_functions#createcube)
* [scene.createCylinder](./scene_functions#createcylinder)
* [scene.createImmersion](./scene_functions#createimmersion)
* [scene.createPlane](./scene_functions#createplane)
* [scene.createSphere](./scene_functions#createsphere)

## FindBy

### findDuplicatedPartOccurrences

> **Warning:**
>
> This function is deprecated.

Get parts that are duplicated. This does not include each first occurrence of a set of duplicates.

```python
scene.findDuplicatedPartOccurrences(root=0, acceptVolumeRatio=0.01, acceptPolycountRatio=0.1, acceptAABBAxisRatio=0.01, acceptAABBCenterDistance=0.1) -> scene.OccurrenceList
```

Parameters

| Type                                   | Name                     | Description                                                                                                                   |
| -------------------------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
| [Occurrence](./scene_types#occurrence) | root                     | Root occurrence.                                                                                                              |
| [Real](./core_types#real)              | acceptVolumeRatio        | If the ratio of volumes of two parts is lower than acceptVolumeRatio, they will be considered duplicated.                     |
| [Real](./core_types#real)              | acceptPolycountRatio     | If the ratio of polygon counts of two parts is lower than acceptPolycountRatio, they will be considered duplicated.           |
| [Real](./core_types#real)              | acceptAABBAxisRatio      | If the ratio of AABB axis of two parts is lower than acceptAABBAxisRatio, they will be considered duplicated.                 |
| [Distance](./geom_types#distance)      | acceptAABBCenterDistance | If the distance between AABB centers of two parts is lower than acceptAABBCenterDistance, they will be considered duplicated. |

Returns

| Type                                           | Name                      | Description                                                                                                                |
| ---------------------------------------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | duplicatedPartOccurrences | The duplicated part occurrences. Contains only the duplicates: it excludes the first occurrence of each set of duplicates. |

See also:

* [scene.findOccurrencesByMaterial](./scene_functions#findoccurrencesbymaterial)
* [scene.findOccurrencesByMetadata](./scene_functions#findoccurrencesbymetadata)
* [scene.findOccurrencesByMetadataValue](./scene_functions#findoccurrencesbymetadatavalue)
* [scene.findOccurrencesByProperty](./scene_functions#findoccurrencesbyproperty)
* [scene.findPartOccurrencesByActiveMaterial](./scene_functions#findpartoccurrencesbyactivematerial)
* [scene.findPartOccurrencesByMaximumSize](./scene_functions#findpartoccurrencesbymaximumsize)
* [scene.findPartOccurrencesByMinimumNumberOfInstances](./scene_functions#findpartoccurrencesbyminimumnumberofinstances)
* [scene.findPartOccurrencesByVisibleMaterial](./scene_functions#findpartoccurrencesbyvisiblematerial)

### findOccurrencesByMaterial

Get occurrences for which the property "Material" is the given material.

```python
scene.findOccurrencesByMaterial(material) -> scene.OccurrenceList
```

Parameters

| Type                                  | Name     | Description |
| ------------------------------------- | -------- | ----------- |
| [Material](./material_types#material) | material | A material. |

Returns

| Type                                           | Name     | Description                                   |
| ---------------------------------------------- | -------- | --------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | filtered | The list of occurrences meeting the criteria. |

See also:

* [scene.findDuplicatedPartOccurrences](./scene_functions#findduplicatedpartoccurrences)
* [scene.findOccurrencesByMetadata](./scene_functions#findoccurrencesbymetadata)
* [scene.findOccurrencesByMetadataValue](./scene_functions#findoccurrencesbymetadatavalue)
* [scene.findOccurrencesByProperty](./scene_functions#findoccurrencesbyproperty)
* [scene.findPartOccurrencesByActiveMaterial](./scene_functions#findpartoccurrencesbyactivematerial)
* [scene.findPartOccurrencesByMaximumSize](./scene_functions#findpartoccurrencesbymaximumsize)
* [scene.findPartOccurrencesByMinimumNumberOfInstances](./scene_functions#findpartoccurrencesbyminimumnumberofinstances)
* [scene.findPartOccurrencesByVisibleMaterial](./scene_functions#findpartoccurrencesbyvisiblematerial)

### findOccurrencesByMetadata

Returns all occurrences which a metadata property value matches the given regular expression (ECMAScript).

```python
scene.findOccurrencesByMetadata(property, regex, roots=None, caseInsensitive=False) -> scene.OccurrenceList
```

Parameters

| Type                                           | Name            | Description                                                      |
| ---------------------------------------------- | --------------- | ---------------------------------------------------------------- |
| [String](./core_types#string)                  | property        | Property name.                                                   |
| [Regex](./core_types#regex)                    | regex           | Regular expression (ECMAScript).                                 |
| [OccurrenceList](./scene_types#occurrencelist) | roots           | If specified, restrict the search from the given roots.          |
| [Bool](./core_types#bool)                      | caseInsensitive | If True, the regex will be insensitive to upper and lower cases. |

Returns

| Type                                           | Name        | Description                                             |
| ---------------------------------------------- | ----------- | ------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | Occurrences which matches the given regular expression. |

See also:

* [scene.findDuplicatedPartOccurrences](./scene_functions#findduplicatedpartoccurrences)
* [scene.findOccurrencesByMaterial](./scene_functions#findoccurrencesbymaterial)
* [scene.findOccurrencesByMetadataValue](./scene_functions#findoccurrencesbymetadatavalue)
* [scene.findOccurrencesByProperty](./scene_functions#findoccurrencesbyproperty)
* [scene.findPartOccurrencesByActiveMaterial](./scene_functions#findpartoccurrencesbyactivematerial)
* [scene.findPartOccurrencesByMaximumSize](./scene_functions#findpartoccurrencesbymaximumsize)
* [scene.findPartOccurrencesByMinimumNumberOfInstances](./scene_functions#findpartoccurrencesbyminimumnumberofinstances)
* [scene.findPartOccurrencesByVisibleMaterial](./scene_functions#findpartoccurrencesbyvisiblematerial)

### findOccurrencesByMetadataValue

Returns all occurrences with a metadata value matching the given regular expression (ECMAScript).

```python
scene.findOccurrencesByMetadataValue(regex, roots=None, caseInsensitive=False) -> scene.OccurrenceList
```

Parameters

| Type                                           | Name            | Description                                                      |
| ---------------------------------------------- | --------------- | ---------------------------------------------------------------- |
| [Regex](./core_types#regex)                    | regex           | Regular expression (ECMAScript).                                 |
| [OccurrenceList](./scene_types#occurrencelist) | roots           | If specified, restrict the search from the given roots.          |
| [Bool](./core_types#bool)                      | caseInsensitive | If True, the regex will be insensitive to upper and lower cases. |

Returns

| Type                                           | Name        | Description                                             |
| ---------------------------------------------- | ----------- | ------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | Occurrences which matches the given regular expression. |

See also:

* [scene.findDuplicatedPartOccurrences](./scene_functions#findduplicatedpartoccurrences)
* [scene.findOccurrencesByMaterial](./scene_functions#findoccurrencesbymaterial)
* [scene.findOccurrencesByMetadata](./scene_functions#findoccurrencesbymetadata)
* [scene.findOccurrencesByProperty](./scene_functions#findoccurrencesbyproperty)
* [scene.findPartOccurrencesByActiveMaterial](./scene_functions#findpartoccurrencesbyactivematerial)
* [scene.findPartOccurrencesByMaximumSize](./scene_functions#findpartoccurrencesbymaximumsize)
* [scene.findPartOccurrencesByMinimumNumberOfInstances](./scene_functions#findpartoccurrencesbyminimumnumberofinstances)
* [scene.findPartOccurrencesByVisibleMaterial](./scene_functions#findpartoccurrencesbyvisiblematerial)

### findOccurrencesByProperty

Returns all occurrences which a property value matches the given regular expression (ECMAScript).

```python
scene.findOccurrencesByProperty(property, regex, roots=None, caseInsensitive=False) -> scene.OccurrenceList
```

Parameters

| Type                                           | Name            | Description                                                      |
| ---------------------------------------------- | --------------- | ---------------------------------------------------------------- |
| [String](./core_types#string)                  | property        | Property name.                                                   |
| [Regex](./core_types#regex)                    | regex           | Regular expression (ECMAScript).                                 |
| [OccurrenceList](./scene_types#occurrencelist) | roots           | If specified, restrict the search from the given roots.          |
| [Bool](./core_types#bool)                      | caseInsensitive | If True, the regex will be insensitive to upper and lower cases. |

Returns

| Type                                           | Name        | Description                                             |
| ---------------------------------------------- | ----------- | ------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | Occurrences which matches the given regular expression. |

See also:

* [scene.findDuplicatedPartOccurrences](./scene_functions#findduplicatedpartoccurrences)
* [scene.findOccurrencesByMaterial](./scene_functions#findoccurrencesbymaterial)
* [scene.findOccurrencesByMetadata](./scene_functions#findoccurrencesbymetadata)
* [scene.findOccurrencesByMetadataValue](./scene_functions#findoccurrencesbymetadatavalue)
* [scene.findPartOccurrencesByActiveMaterial](./scene_functions#findpartoccurrencesbyactivematerial)
* [scene.findPartOccurrencesByMaximumSize](./scene_functions#findpartoccurrencesbymaximumsize)
* [scene.findPartOccurrencesByMinimumNumberOfInstances](./scene_functions#findpartoccurrencesbyminimumnumberofinstances)
* [scene.findPartOccurrencesByVisibleMaterial](./scene_functions#findpartoccurrencesbyvisiblematerial)

### findPartOccurrencesByActiveMaterial

Find all part occurrence with a given material as active material (i.e. as seen in the rendering).

```python
scene.findPartOccurrencesByActiveMaterial(material, roots=None) -> scene.OccurrenceList
```

Parameters

| Type                                           | Name     | Description                                             |
| ---------------------------------------------- | -------- | ------------------------------------------------------- |
| [Material](./material_types#material)          | material | A material.                                             |
| [OccurrenceList](./scene_types#occurrencelist) | roots    | If specified, restrict the search from the given roots. |

Returns

| Type                                           | Name       | Description                                                      |
| ---------------------------------------------- | ---------- | ---------------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrence | Occurrences of parts with the given material as active material. |

See also:

* [scene.findDuplicatedPartOccurrences](./scene_functions#findduplicatedpartoccurrences)
* [scene.findOccurrencesByMaterial](./scene_functions#findoccurrencesbymaterial)
* [scene.findOccurrencesByMetadata](./scene_functions#findoccurrencesbymetadata)
* [scene.findOccurrencesByMetadataValue](./scene_functions#findoccurrencesbymetadatavalue)
* [scene.findOccurrencesByProperty](./scene_functions#findoccurrencesbyproperty)
* [scene.findPartOccurrencesByMaximumSize](./scene_functions#findpartoccurrencesbymaximumsize)
* [scene.findPartOccurrencesByMinimumNumberOfInstances](./scene_functions#findpartoccurrencesbyminimumnumberofinstances)
* [scene.findPartOccurrencesByVisibleMaterial](./scene_functions#findpartoccurrencesbyvisiblematerial)

### findPartOccurrencesByMaximumSize

Get part occurrences by size.

```python
scene.findPartOccurrencesByMaximumSize(roots, maxDiagLength=150, maxSize=-1, getHidden=False) -> scene.OccurrenceList
```

Parameters

| Type                                           | Name          | Description                                                                                               |
| ---------------------------------------------- | ------------- | --------------------------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | roots         | Roots occurrences for the process.                                                                        |
| [Distance](./geom_types#distance)              | maxDiagLength | If the diagonal axis of the bounding box is less than maxDiagLength, part will be filtered. -1 to ignore. |
| [Distance](./geom_types#distance)              | maxSize       | If the longer axis of the box is less than maxLength, part will be filtered. -1 to ignore.                |
| [Boolean](./core_types#boolean)                | getHidden     | If true, hidden part occurrences meeting the criteria will be filtered as well.                           |

Returns

| Type                                           | Name     | Description                                   |
| ---------------------------------------------- | -------- | --------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | filtered | The list of occurrences meeting the criteria. |

See also:

* [scene.findDuplicatedPartOccurrences](./scene_functions#findduplicatedpartoccurrences)
* [scene.findOccurrencesByMaterial](./scene_functions#findoccurrencesbymaterial)
* [scene.findOccurrencesByMetadata](./scene_functions#findoccurrencesbymetadata)
* [scene.findOccurrencesByMetadataValue](./scene_functions#findoccurrencesbymetadatavalue)
* [scene.findOccurrencesByProperty](./scene_functions#findoccurrencesbyproperty)
* [scene.findPartOccurrencesByActiveMaterial](./scene_functions#findpartoccurrencesbyactivematerial)
* [scene.findPartOccurrencesByMinimumNumberOfInstances](./scene_functions#findpartoccurrencesbyminimumnumberofinstances)
* [scene.findPartOccurrencesByVisibleMaterial](./scene_functions#findpartoccurrencesbyvisiblematerial)

### findPartOccurrencesByMinimumNumberOfInstances

Get part occurrences with more than "minInstanciationCount" occurrence on the scene.

```python
scene.findPartOccurrencesByMinimumNumberOfInstances(minInstanciationCount=2) -> scene.OccurrenceList
```

Parameters

| Type                    | Name                  | Description           |
| ----------------------- | --------------------- | --------------------- |
| [Int](./core_types#int) | minInstanciationCount | Min occurrence count. |

Returns

| Type                                           | Name     | Description                                   |
| ---------------------------------------------- | -------- | --------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | filtered | The list of occurrences meeting the criteria. |

See also:

* [scene.findDuplicatedPartOccurrences](./scene_functions#findduplicatedpartoccurrences)
* [scene.findOccurrencesByMaterial](./scene_functions#findoccurrencesbymaterial)
* [scene.findOccurrencesByMetadata](./scene_functions#findoccurrencesbymetadata)
* [scene.findOccurrencesByMetadataValue](./scene_functions#findoccurrencesbymetadatavalue)
* [scene.findOccurrencesByProperty](./scene_functions#findoccurrencesbyproperty)
* [scene.findPartOccurrencesByActiveMaterial](./scene_functions#findpartoccurrencesbyactivematerial)
* [scene.findPartOccurrencesByMaximumSize](./scene_functions#findpartoccurrencesbymaximumsize)
* [scene.findPartOccurrencesByVisibleMaterial](./scene_functions#findpartoccurrencesbyvisiblematerial)

### findPartOccurrencesByVisibleMaterial

Get part occurrences for which the given material is visible in the viewer.

```python
scene.findPartOccurrencesByVisibleMaterial(material) -> scene.OccurrenceList
```

Parameters

| Type                                  | Name     | Description |
| ------------------------------------- | -------- | ----------- |
| [Material](./material_types#material) | material | A material. |

Returns

| Type                                           | Name     | Description                                   |
| ---------------------------------------------- | -------- | --------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | filtered | The list of occurrences meeting the criteria. |

See also:

* [scene.findDuplicatedPartOccurrences](./scene_functions#findduplicatedpartoccurrences)
* [scene.findOccurrencesByMaterial](./scene_functions#findoccurrencesbymaterial)
* [scene.findOccurrencesByMetadata](./scene_functions#findoccurrencesbymetadata)
* [scene.findOccurrencesByMetadataValue](./scene_functions#findoccurrencesbymetadatavalue)
* [scene.findOccurrencesByProperty](./scene_functions#findoccurrencesbyproperty)
* [scene.findPartOccurrencesByActiveMaterial](./scene_functions#findpartoccurrencesbyactivematerial)
* [scene.findPartOccurrencesByMaximumSize](./scene_functions#findpartoccurrencesbymaximumsize)
* [scene.findPartOccurrencesByMinimumNumberOfInstances](./scene_functions#findpartoccurrencesbyminimumnumberofinstances)

## FindIn

### findPartOccurrencesInAABB

Find part occurrences in the scene in a given axis aligned bounding box.

```python
scene.findPartOccurrencesInAABB(aabb) -> scene.OccurrenceList
```

Parameters

| Type                      | Name | Description                    |
| ------------------------- | ---- | ------------------------------ |
| [AABB](./geom_types#aabb) | aabb | The axis aligned bounding box. |

Returns

| Type                                           | Name        | Description                                              |
| ---------------------------------------------- | ----------- | -------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | Occurrences found in the given axis aligned bounded box. |

See also:

* [scene.findPartOccurrencesInBox](./scene_functions#findpartoccurrencesinbox)

### findPartOccurrencesInBox

Get part occurrences contained in a given box.

```python
scene.findPartOccurrencesInBox(box, strictlyIncludes) -> scene.OccurrenceList
```

Parameters

| Type                                    | Name             | Description                                                    |
| --------------------------------------- | ---------------- | -------------------------------------------------------------- |
| [ExtendedBox](./geom_types#extendedbox) | box              | The extension box.                                             |
| [Boolean](./core_types#boolean)         | strictlyIncludes | If false, parts only need to intersect the box to be selected. |

Returns

| Type                                           | Name        | Description                            |
| ---------------------------------------------- | ----------- | -------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | Part occurrences contained in the box. |

See also:

* [scene.findPartOccurrencesInAABB](./scene_functions#findpartoccurrencesinaabb)

## Hierarchy

### createSubTree

Create a complete scene tree.

```python
scene.createSubTree(tree, root=0, replaceRoot=True) -> scene.OccurrenceList
```

Parameters

| Type                                   | Name        | Description                                                                                                    |
| -------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------- |
| [PackedTree](./scene_types#packedtree) | tree        |                                                                                                                |
| [Occurrence](./scene_types#occurrence) | root        | Specify the root occurrence of the scene.                                                                      |
| [Bool](./core_types#bool)              | replaceRoot | If true, the root occurrence will be replaced by the root of the given tree, else it will be added as a child. |

Returns

| Type                                           | Name        | Description                                          |
| ---------------------------------------------- | ----------- | ---------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | Create occurrences (equivalent to tree.occurrences). |

See also:

* [scene.getChildren](./scene_functions#getchildren)
* [scene.getChildrenCount](./scene_functions#getchildrencount)
* [scene.getCurrentVariantRoot](./scene_functions#getcurrentvariantroot)
* [scene.getFirstChild](./scene_functions#getfirstchild)
* [scene.getNextSibling](./scene_functions#getnextsibling)
* [scene.getOccurrenceAncestors](./scene_functions#getoccurrenceancestors)
* [scene.getOccurrencesAncestors](./scene_functions#getoccurrencesancestors)
* [scene.getParent](./scene_functions#getparent)
* [scene.getPreviousSibling](./scene_functions#getprevioussibling)
* [scene.getRoot](./scene_functions#getroot)
* [scene.getSubTree](./scene_functions#getsubtree)
* [scene.moveOccurrences](./scene_functions#moveoccurrences)
* [scene.setParent](./scene_functions#setparent)

### getChildren

Get the children of an occurrence.

```python
scene.getChildren(occurrence) -> scene.OccurrenceList
```

Parameters

| Type                                   | Name       | Description     |
| -------------------------------------- | ---------- | --------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence. |

Returns

| Type                                           | Name     | Description           |
| ---------------------------------------------- | -------- | --------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | children | Children occurrences. |

See also:

* [scene.createSubTree](./scene_functions#createsubtree)
* [scene.getChildrenCount](./scene_functions#getchildrencount)
* [scene.getCurrentVariantRoot](./scene_functions#getcurrentvariantroot)
* [scene.getFirstChild](./scene_functions#getfirstchild)
* [scene.getNextSibling](./scene_functions#getnextsibling)
* [scene.getOccurrenceAncestors](./scene_functions#getoccurrenceancestors)
* [scene.getOccurrencesAncestors](./scene_functions#getoccurrencesancestors)
* [scene.getParent](./scene_functions#getparent)
* [scene.getPreviousSibling](./scene_functions#getprevioussibling)
* [scene.getRoot](./scene_functions#getroot)
* [scene.getSubTree](./scene_functions#getsubtree)
* [scene.moveOccurrences](./scene_functions#moveoccurrences)
* [scene.setParent](./scene_functions#setparent)

### getChildrenCount

Get the children count of an occurrence.

```python
scene.getChildrenCount(occurrence) -> core.Int
```

Parameters

| Type                                   | Name       | Description     |
| -------------------------------------- | ---------- | --------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence. |

Returns

| Type                    | Name          | Description     |
| ----------------------- | ------------- | --------------- |
| [Int](./core_types#int) | childrenCount | Children count. |

See also:

* [scene.createSubTree](./scene_functions#createsubtree)
* [scene.getChildren](./scene_functions#getchildren)
* [scene.getCurrentVariantRoot](./scene_functions#getcurrentvariantroot)
* [scene.getFirstChild](./scene_functions#getfirstchild)
* [scene.getNextSibling](./scene_functions#getnextsibling)
* [scene.getOccurrenceAncestors](./scene_functions#getoccurrenceancestors)
* [scene.getOccurrencesAncestors](./scene_functions#getoccurrencesancestors)
* [scene.getParent](./scene_functions#getparent)
* [scene.getPreviousSibling](./scene_functions#getprevioussibling)
* [scene.getRoot](./scene_functions#getroot)
* [scene.getSubTree](./scene_functions#getsubtree)
* [scene.moveOccurrences](./scene_functions#moveoccurrences)
* [scene.setParent](./scene_functions#setparent)

### getCurrentVariantRoot

Get the current active root. Returns active variant's root if one or global root.

```python
scene.getCurrentVariantRoot() -> scene.Occurrence
```

Returns

| Type                                   | Name | Description                                                             |
| -------------------------------------- | ---- | ----------------------------------------------------------------------- |
| [Occurrence](./scene_types#occurrence) | root | The active variant root occurrence or global root if no active variant. |

See also:

* [scene.createSubTree](./scene_functions#createsubtree)
* [scene.getChildren](./scene_functions#getchildren)
* [scene.getChildrenCount](./scene_functions#getchildrencount)
* [scene.getFirstChild](./scene_functions#getfirstchild)
* [scene.getNextSibling](./scene_functions#getnextsibling)
* [scene.getOccurrenceAncestors](./scene_functions#getoccurrenceancestors)
* [scene.getOccurrencesAncestors](./scene_functions#getoccurrencesancestors)
* [scene.getParent](./scene_functions#getparent)
* [scene.getPreviousSibling](./scene_functions#getprevioussibling)
* [scene.getRoot](./scene_functions#getroot)
* [scene.getSubTree](./scene_functions#getsubtree)
* [scene.moveOccurrences](./scene_functions#moveoccurrences)
* [scene.setParent](./scene_functions#setparent)

### getFirstChild

Get the children of an occurrence.

```python
scene.getFirstChild(occurrence) -> scene.Occurrence
```

Parameters

| Type                                   | Name       | Description     |
| -------------------------------------- | ---------- | --------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence. |

Returns

| Type                                   | Name  | Description       |
| -------------------------------------- | ----- | ----------------- |
| [Occurrence](./scene_types#occurrence) | child | Child occurrence. |

See also:

* [scene.createSubTree](./scene_functions#createsubtree)
* [scene.getChildren](./scene_functions#getchildren)
* [scene.getChildrenCount](./scene_functions#getchildrencount)
* [scene.getCurrentVariantRoot](./scene_functions#getcurrentvariantroot)
* [scene.getNextSibling](./scene_functions#getnextsibling)
* [scene.getOccurrenceAncestors](./scene_functions#getoccurrenceancestors)
* [scene.getOccurrencesAncestors](./scene_functions#getoccurrencesancestors)
* [scene.getParent](./scene_functions#getparent)
* [scene.getPreviousSibling](./scene_functions#getprevioussibling)
* [scene.getRoot](./scene_functions#getroot)
* [scene.getSubTree](./scene_functions#getsubtree)
* [scene.moveOccurrences](./scene_functions#moveoccurrences)
* [scene.setParent](./scene_functions#setparent)

### getNextSibling

Get the next occurrence in parent children.

```python
scene.getNextSibling(occurrence) -> scene.Occurrence
```

Parameters

| Type                                   | Name       | Description     |
| -------------------------------------- | ---------- | --------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence. |

Returns

| Type                                   | Name        | Description              |
| -------------------------------------- | ----------- | ------------------------ |
| [Occurrence](./scene_types#occurrence) | nextSibling | Next sibling occurrence. |

See also:

* [scene.createSubTree](./scene_functions#createsubtree)
* [scene.getChildren](./scene_functions#getchildren)
* [scene.getChildrenCount](./scene_functions#getchildrencount)
* [scene.getCurrentVariantRoot](./scene_functions#getcurrentvariantroot)
* [scene.getFirstChild](./scene_functions#getfirstchild)
* [scene.getOccurrenceAncestors](./scene_functions#getoccurrenceancestors)
* [scene.getOccurrencesAncestors](./scene_functions#getoccurrencesancestors)
* [scene.getParent](./scene_functions#getparent)
* [scene.getPreviousSibling](./scene_functions#getprevioussibling)
* [scene.getRoot](./scene_functions#getroot)
* [scene.getSubTree](./scene_functions#getsubtree)
* [scene.moveOccurrences](./scene_functions#moveoccurrences)
* [scene.setParent](./scene_functions#setparent)

### getOccurrenceAncestors

Get all ancestors from occurrence until root (occurrence is not included).

```python
scene.getOccurrenceAncestors(occurrence) -> scene.OccurrenceList
```

Parameters

| Type                                   | Name       | Description                       |
| -------------------------------------- | ---------- | --------------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence to find ancestors. |

Returns

| Type                                           | Name      | Description                                                                                            |
| ---------------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------ |
| [OccurrenceList](./scene_types#occurrencelist) | ancestors | List of ancestors (start with the root and end with occurrence parent). Empty if occurrence is a root. |

See also:

* [scene.createSubTree](./scene_functions#createsubtree)
* [scene.getChildren](./scene_functions#getchildren)
* [scene.getChildrenCount](./scene_functions#getchildrencount)
* [scene.getCurrentVariantRoot](./scene_functions#getcurrentvariantroot)
* [scene.getFirstChild](./scene_functions#getfirstchild)
* [scene.getNextSibling](./scene_functions#getnextsibling)
* [scene.getOccurrencesAncestors](./scene_functions#getoccurrencesancestors)
* [scene.getParent](./scene_functions#getparent)
* [scene.getPreviousSibling](./scene_functions#getprevioussibling)
* [scene.getRoot](./scene_functions#getroot)
* [scene.getSubTree](./scene_functions#getsubtree)
* [scene.moveOccurrences](./scene_functions#moveoccurrences)
* [scene.setParent](./scene_functions#setparent)

### getOccurrencesAncestors

Batch version of getOccurrenceAncestors.

```python
scene.getOccurrencesAncestors(occurrences) -> scene.OccurrenceListList
```

Parameters

| Type                                           | Name        | Description                                |
| ---------------------------------------------- | ----------- | ------------------------------------------ |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | The list of occurrences to find ancestors. |

Returns

| Type                                                   | Name          | Description                                                                                                                           |
| ------------------------------------------------------ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| [OccurrenceListList](./scene_types#occurrencelistlist) | ancestorsList | For each given occurrence, the list of ancestors (start with the root and end with occurrence parent). Empty if occurrence is a root. |

See also:

* [scene.createSubTree](./scene_functions#createsubtree)
* [scene.getChildren](./scene_functions#getchildren)
* [scene.getChildrenCount](./scene_functions#getchildrencount)
* [scene.getCurrentVariantRoot](./scene_functions#getcurrentvariantroot)
* [scene.getFirstChild](./scene_functions#getfirstchild)
* [scene.getNextSibling](./scene_functions#getnextsibling)
* [scene.getOccurrenceAncestors](./scene_functions#getoccurrenceancestors)
* [scene.getParent](./scene_functions#getparent)
* [scene.getPreviousSibling](./scene_functions#getprevioussibling)
* [scene.getRoot](./scene_functions#getroot)
* [scene.getSubTree](./scene_functions#getsubtree)
* [scene.moveOccurrences](./scene_functions#moveoccurrences)
* [scene.setParent](./scene_functions#setparent)

### getParent

Get the parent of an occurrence.

```python
scene.getParent(occurrence) -> scene.Occurrence
```

Parameters

| Type                                   | Name       | Description     |
| -------------------------------------- | ---------- | --------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence. |

Returns

| Type                                   | Name   | Description            |
| -------------------------------------- | ------ | ---------------------- |
| [Occurrence](./scene_types#occurrence) | parent | The parent occurrence. |

See also:

* [scene.createSubTree](./scene_functions#createsubtree)
* [scene.getChildren](./scene_functions#getchildren)
* [scene.getChildrenCount](./scene_functions#getchildrencount)
* [scene.getCurrentVariantRoot](./scene_functions#getcurrentvariantroot)
* [scene.getFirstChild](./scene_functions#getfirstchild)
* [scene.getNextSibling](./scene_functions#getnextsibling)
* [scene.getOccurrenceAncestors](./scene_functions#getoccurrenceancestors)
* [scene.getOccurrencesAncestors](./scene_functions#getoccurrencesancestors)
* [scene.getPreviousSibling](./scene_functions#getprevioussibling)
* [scene.getRoot](./scene_functions#getroot)
* [scene.getSubTree](./scene_functions#getsubtree)
* [scene.moveOccurrences](./scene_functions#moveoccurrences)
* [scene.setParent](./scene_functions#setparent)

### getPreviousSibling

Get the previous occurrence in parent children.

```python
scene.getPreviousSibling(occurrence) -> scene.Occurrence
```

Parameters

| Type                                   | Name       | Description     |
| -------------------------------------- | ---------- | --------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence. |

Returns

| Type                                   | Name            | Description                  |
| -------------------------------------- | --------------- | ---------------------------- |
| [Occurrence](./scene_types#occurrence) | previousSibling | Previous sibling occurrence. |

See also:

* [scene.createSubTree](./scene_functions#createsubtree)
* [scene.getChildren](./scene_functions#getchildren)
* [scene.getChildrenCount](./scene_functions#getchildrencount)
* [scene.getCurrentVariantRoot](./scene_functions#getcurrentvariantroot)
* [scene.getFirstChild](./scene_functions#getfirstchild)
* [scene.getNextSibling](./scene_functions#getnextsibling)
* [scene.getOccurrenceAncestors](./scene_functions#getoccurrenceancestors)
* [scene.getOccurrencesAncestors](./scene_functions#getoccurrencesancestors)
* [scene.getParent](./scene_functions#getparent)
* [scene.getRoot](./scene_functions#getroot)
* [scene.getSubTree](./scene_functions#getsubtree)
* [scene.moveOccurrences](./scene_functions#moveoccurrences)
* [scene.setParent](./scene_functions#setparent)

### getRoot

Get the root occurrence of the product structure.

```python
scene.getRoot() -> scene.Occurrence
```

Returns

| Type                                   | Name | Description          |
| -------------------------------------- | ---- | -------------------- |
| [Occurrence](./scene_types#occurrence) | root | The root occurrence. |

See also:

* [scene.createSubTree](./scene_functions#createsubtree)
* [scene.getChildren](./scene_functions#getchildren)
* [scene.getChildrenCount](./scene_functions#getchildrencount)
* [scene.getCurrentVariantRoot](./scene_functions#getcurrentvariantroot)
* [scene.getFirstChild](./scene_functions#getfirstchild)
* [scene.getNextSibling](./scene_functions#getnextsibling)
* [scene.getOccurrenceAncestors](./scene_functions#getoccurrenceancestors)
* [scene.getOccurrencesAncestors](./scene_functions#getoccurrencesancestors)
* [scene.getParent](./scene_functions#getparent)
* [scene.getPreviousSibling](./scene_functions#getprevioussibling)
* [scene.getSubTree](./scene_functions#getsubtree)
* [scene.moveOccurrences](./scene_functions#moveoccurrences)
* [scene.setParent](./scene_functions#setparent)

### getSubTree

Returns a packed version of the whole scene tree.

```python
scene.getSubTree(root=0, visibilityMode=1, depth=-1) -> scene.PackedTree
```

Parameters

| Type                                           | Name           | Description                             |
| ---------------------------------------------- | -------------- | --------------------------------------- |
| [Occurrence](./scene_types#occurrence)         | root           | Specify the root of the returned scene. |
| [VisibilityMode](./scene_types#visibilitymode) | visibilityMode | The visibility mode.                    |
| [Int](./core_types#int)                        | depth          | Maximum depth.                          |

Returns

| Type                                   | Name | Description |
| -------------------------------------- | ---- | ----------- |
| [PackedTree](./scene_types#packedtree) | tree |             |

See also:

* [scene.createSubTree](./scene_functions#createsubtree)
* [scene.getChildren](./scene_functions#getchildren)
* [scene.getChildrenCount](./scene_functions#getchildrencount)
* [scene.getCurrentVariantRoot](./scene_functions#getcurrentvariantroot)
* [scene.getFirstChild](./scene_functions#getfirstchild)
* [scene.getNextSibling](./scene_functions#getnextsibling)
* [scene.getOccurrenceAncestors](./scene_functions#getoccurrenceancestors)
* [scene.getOccurrencesAncestors](./scene_functions#getoccurrencesancestors)
* [scene.getParent](./scene_functions#getparent)
* [scene.getPreviousSibling](./scene_functions#getprevioussibling)
* [scene.getRoot](./scene_functions#getroot)
* [scene.moveOccurrences](./scene_functions#moveoccurrences)
* [scene.setParent](./scene_functions#setparent)

### moveOccurrences

Move an occurrence, adjusting the transformation to keep objects at the same place in the world space.

```python
scene.moveOccurrences(occurrences, destination, insertBefore=0)
```

Parameters

| Type                                           | Name         | Description                                                              |
| ---------------------------------------------- | ------------ | ------------------------------------------------------------------------ |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences  | The occurrences to move.                                                 |
| [Occurrence](./scene_types#occurrence)         | destination  | Destination occurrence (the new parent).                                 |
| [Occurrence](./scene_types#occurrence)         | insertBefore | Occurrence before witch to move, if null append to destination children. |

See also:

* [scene.createSubTree](./scene_functions#createsubtree)
* [scene.getChildren](./scene_functions#getchildren)
* [scene.getChildrenCount](./scene_functions#getchildrencount)
* [scene.getCurrentVariantRoot](./scene_functions#getcurrentvariantroot)
* [scene.getFirstChild](./scene_functions#getfirstchild)
* [scene.getNextSibling](./scene_functions#getnextsibling)
* [scene.getOccurrenceAncestors](./scene_functions#getoccurrenceancestors)
* [scene.getOccurrencesAncestors](./scene_functions#getoccurrencesancestors)
* [scene.getParent](./scene_functions#getparent)
* [scene.getPreviousSibling](./scene_functions#getprevioussibling)
* [scene.getRoot](./scene_functions#getroot)
* [scene.getSubTree](./scene_functions#getsubtree)
* [scene.setParent](./scene_functions#setparent)

### setParent

Set the parent of an occurrence.

```python
scene.setParent(occurrence, parent, addInParentInstances=False, insertBefore=None, worldPositionStays=False)
```

Parameters

| Type                                   | Name                 | Description                                                                                                                                                    |
| -------------------------------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence           | The occurrence.                                                                                                                                                |
| [Occurrence](./scene_types#occurrence) | parent               | The parent occurrence.                                                                                                                                         |
| [Boolean](./core_types#boolean)        | addInParentInstances | If True, each occurrence whose prototype is the target parent will generate a child whose prototype is the occurrence itself.                                  |
| [Occurrence](./scene_types#occurrence) | insertBefore         | Add before this child occurrence in the children list of the parent occurrence.                                                                                |
| [Boolean](./core_types#boolean)        | worldPositionStays   | If true, the parent-relative position, scale and rotation are modified such that the object keeps the same world space position, rotation and scale as before. |

See also:

* [scene.createSubTree](./scene_functions#createsubtree)
* [scene.getChildren](./scene_functions#getchildren)
* [scene.getChildrenCount](./scene_functions#getchildrencount)
* [scene.getCurrentVariantRoot](./scene_functions#getcurrentvariantroot)
* [scene.getFirstChild](./scene_functions#getfirstchild)
* [scene.getNextSibling](./scene_functions#getnextsibling)
* [scene.getOccurrenceAncestors](./scene_functions#getoccurrenceancestors)
* [scene.getOccurrencesAncestors](./scene_functions#getoccurrencesancestors)
* [scene.getParent](./scene_functions#getparent)
* [scene.getPreviousSibling](./scene_functions#getprevioussibling)
* [scene.getRoot](./scene_functions#getroot)
* [scene.getSubTree](./scene_functions#getsubtree)
* [scene.moveOccurrences](./scene_functions#moveoccurrences)

## Lights

### addLightComponent

Add a light component to an occurrence.

```python
scene.addLightComponent(occurrence, lightType, color=core.Color(1,1,1,1), power=1.0, cutOff=20.0) -> scene.Component
```

Parameters

| Type                                   | Name       | Description                              |
| -------------------------------------- | ---------- | ---------------------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence to add the new component. |
| [LightType](./scene_types#lighttype)   | lightType  | The type of the light.                   |
| [Color](./core_types#color)            | color      | Color of the light.                      |
| [Double](./core_types#double)          | power      | The power of the light.                  |
| [Angle](./geom_types#angle)            | cutOff     | The cutoff angle of the light.           |

Returns

| Type                                 | Name      | Description                            |
| ------------------------------------ | --------- | -------------------------------------- |
| [Component](./scene_types#component) | component | The new component added to occurrence. |

See also:

* [scene.createLight](./scene_functions#createlight)

### createLight

Create an occurrence with a light component.

```python
scene.createLight(name, lightType, color=core.Color(1,1,1,1), power=1.0, cutOff=20.0, parent=0) -> scene.Occurrence
```

Parameters

| Type                                   | Name      | Description                         |
| -------------------------------------- | --------- | ----------------------------------- |
| [String](./core_types#string)          | name      | Name of the light.                  |
| [LightType](./scene_types#lighttype)   | lightType | The type of the light.              |
| [Color](./core_types#color)            | color     | Color of the light.                 |
| [Double](./core_types#double)          | power     | The power of the light.             |
| [Angle](./geom_types#angle)            | cutOff    | The cutoff angle of the light.      |
| [Occurrence](./scene_types#occurrence) | parent    | The parent of the light occurrence. |

Returns

| Type                                   | Name       | Description        |
| -------------------------------------- | ---------- | ------------------ |
| [Occurrence](./scene_types#occurrence) | occurrence | The light created. |

See also:

* [scene.addLightComponent](./scene_functions#addlightcomponent)

## Metadata

### addMetadata

Add a new metadata property to a metadata component.

```python
scene.addMetadata(metadata, name, value)
```

Parameters

| Type                               | Name     | Description             |
| ---------------------------------- | -------- | ----------------------- |
| [Metadata](./scene_types#metadata) | metadata | The metadata component. |
| [String](./core_types#string)      | name     | The new property name.  |
| [String](./core_types#string)      | value    | The new property value. |

See also:

* [scene.addMetadataBlock](./scene_functions#addmetadatablock)
* [scene.createMetadatasFromDefinitions](./scene_functions#createmetadatasfromdefinitions)
* [scene.getMetadata](./scene_functions#getmetadata)
* [scene.getMetadatasDefinitions](./scene_functions#getmetadatasdefinitions)
* [scene.removeMetadata](./scene_functions#removemetadata)

### addMetadataBlock

Add a new metadata property to a metadata component.

```python
scene.addMetadataBlock(metadata, names, values)
```

Parameters

| Type                                  | Name     | Description                |
| ------------------------------------- | -------- | -------------------------- |
| [Metadata](./scene_types#metadata)    | metadata | The metadata component.    |
| [StringList](./core_types#stringlist) | names    | The new properties names.  |
| [StringList](./core_types#stringlist) | values   | The new properties values. |

See also:

* [scene.addMetadata](./scene_functions#addmetadata)
* [scene.createMetadatasFromDefinitions](./scene_functions#createmetadatasfromdefinitions)
* [scene.getMetadata](./scene_functions#getmetadata)
* [scene.getMetadatasDefinitions](./scene_functions#getmetadatasdefinitions)
* [scene.removeMetadata](./scene_functions#removemetadata)

### createMetadatasFromDefinitions

Create Metadata components from definitions.

```python
scene.createMetadatasFromDefinitions(occurrences, definitions) -> scene.MetadataList
```

Parameters

| Type                                                           | Name        | Description                                         |
| -------------------------------------------------------------- | ----------- | --------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist)                 | occurrences | List of occurrences to add the metadata components. |
| [MetadataDefinitionList](./scene_types#metadatadefinitionlist) | definitions | List of metadata definition.                        |

Returns

| Type                                       | Name      | Description                                                                                            |
| ------------------------------------------ | --------- | ------------------------------------------------------------------------------------------------------ |
| [MetadataList](./scene_types#metadatalist) | metadatas | List of metadata components created from definitions (if definition is empty no component is created). |

See also:

* [scene.addMetadata](./scene_functions#addmetadata)
* [scene.addMetadataBlock](./scene_functions#addmetadatablock)
* [scene.getMetadata](./scene_functions#getmetadata)
* [scene.getMetadatasDefinitions](./scene_functions#getmetadatasdefinitions)
* [scene.removeMetadata](./scene_functions#removemetadata)

### getMetadata

Get a metadata property value from a metadata component.

```python
scene.getMetadata(metadata, name) -> core.String
```

Parameters

| Type                               | Name     | Description                 |
| ---------------------------------- | -------- | --------------------------- |
| [Metadata](./scene_types#metadata) | metadata | The metadata component.     |
| [String](./core_types#string)      | name     | The metadata property name. |

Returns

| Type                          | Name      | Description         |
| ----------------------------- | --------- | ------------------- |
| [String](./core_types#string) | component | The property value. |

See also:

* [scene.addMetadata](./scene_functions#addmetadata)
* [scene.addMetadataBlock](./scene_functions#addmetadatablock)
* [scene.createMetadatasFromDefinitions](./scene_functions#createmetadatasfromdefinitions)
* [scene.getMetadatasDefinitions](./scene_functions#getmetadatasdefinitions)
* [scene.removeMetadata](./scene_functions#removemetadata)

### getMetadatasDefinitions

Returns definition of Metadata components.

```python
scene.getMetadatasDefinitions(metadatas) -> scene.MetadataDefinitionList
```

Parameters

| Type                                       | Name      | Description                                        |
| ------------------------------------------ | --------- | -------------------------------------------------- |
| [MetadataList](./scene_types#metadatalist) | metadatas | List of metadata component to retrieve definition. |

Returns

| Type                                                           | Name        | Description                                                    |
| -------------------------------------------------------------- | ----------- | -------------------------------------------------------------- |
| [MetadataDefinitionList](./scene_types#metadatadefinitionlist) | definitions | List of metadata definition for each given metadata component. |

See also:

* [scene.addMetadata](./scene_functions#addmetadata)
* [scene.addMetadataBlock](./scene_functions#addmetadatablock)
* [scene.createMetadatasFromDefinitions](./scene_functions#createmetadatasfromdefinitions)
* [scene.getMetadata](./scene_functions#getmetadata)
* [scene.removeMetadata](./scene_functions#removemetadata)

### removeMetadata

Remove a property from a metadata.

```python
scene.removeMetadata(metadata, name)
```

Parameters

| Type                               | Name     | Description               |
| ---------------------------------- | -------- | ------------------------- |
| [Metadata](./scene_types#metadata) | metadata | The occurrence.           |
| [String](./core_types#string)      | name     | The name of the property. |

See also:

* [scene.addMetadata](./scene_functions#addmetadata)
* [scene.addMetadataBlock](./scene_functions#addmetadatablock)
* [scene.createMetadatasFromDefinitions](./scene_functions#createmetadatasfromdefinitions)
* [scene.getMetadata](./scene_functions#getmetadata)
* [scene.getMetadatasDefinitions](./scene_functions#getmetadatasdefinitions)

## Subpart materials

### getMaterialsFromSubPart

Returns a list of all the materials in the set subPartMaterialComponent.

```python
scene.getMaterialsFromSubPart(component) -> material.MaterialList
```

Parameters

| Type                                                               | Name      | Description                                          |
| ------------------------------------------------------------------ | --------- | ---------------------------------------------------- |
| [SubPartMaterialComponent](./scene_types#subpartmaterialcomponent) | component | The subPartMaterial Component we want the materials. |

Returns

| Type                                          | Name      | Description                                         |
| --------------------------------------------- | --------- | --------------------------------------------------- |
| [MaterialList](./material_types#materiallist) | materials | All the materials of the subpartMaterial Component. |

See also:

* [scene.getSubpartMaterial](./scene_functions#getsubpartmaterial)
* [scene.listActiveShapeMaterials](./scene_functions#listactiveshapematerials)
* [scene.listSubpartMaterials](./scene_functions#listsubpartmaterials)
* [scene.listSubpartVariantMaterials](./scene_functions#listsubpartvariantmaterials)
* [scene.setSubpartMaterial](./scene_functions#setsubpartmaterial)
* [scene.setSubpartMaterials](./scene_functions#setsubpartmaterials)
* [scene.setSubpartVariantMaterials](./scene_functions#setsubpartvariantmaterials)
* [scene.setSubpartVariantMaterialsList](./scene_functions#setsubpartvariantmaterialslist)
* [scene.transferSubpartMaterialsOnPatches](./scene_functions#transfersubpartmaterialsonpatches)

### getSubpartMaterial

Get a subpart material assignment according to overrides on the scene tree with SubpartMaterial components.

```python
scene.getSubpartMaterial(occurrence, subpartIndex) -> material.Material
```

Parameters

| Type                                   | Name         | Description        |
| -------------------------------------- | ------------ | ------------------ |
| [Occurrence](./scene_types#occurrence) | occurrence   | The Occurrence.    |
| [UInt](./core_types#uint)              | subpartIndex | The subpart index. |

Returns

| Type                                  | Name     | Description            |
| ------------------------------------- | -------- | ---------------------- |
| [Material](./material_types#material) | material | The assigned material. |

See also:

* [scene.getMaterialsFromSubPart](./scene_functions#getmaterialsfromsubpart)
* [scene.listActiveShapeMaterials](./scene_functions#listactiveshapematerials)
* [scene.listSubpartMaterials](./scene_functions#listsubpartmaterials)
* [scene.listSubpartVariantMaterials](./scene_functions#listsubpartvariantmaterials)
* [scene.setSubpartMaterial](./scene_functions#setsubpartmaterial)
* [scene.setSubpartMaterials](./scene_functions#setsubpartmaterials)
* [scene.setSubpartVariantMaterials](./scene_functions#setsubpartvariantmaterials)
* [scene.setSubpartVariantMaterialsList](./scene_functions#setsubpartvariantmaterialslist)
* [scene.transferSubpartMaterialsOnPatches](./scene_functions#transfersubpartmaterialsonpatches)

### listActiveShapeMaterials

List all the materials used in the part shape.

```python
scene.listActiveShapeMaterials(part) -> material.MaterialList
```

Parameters

| Type                       | Name | Description                            |
| -------------------------- | ---- | -------------------------------------- |
| [Part](./scene_types#part) | part | The part which contains sub materials. |

Returns

| Type                                          | Name      | Description     |
| --------------------------------------------- | --------- | --------------- |
| [MaterialList](./material_types#materiallist) | materials | Used materials. |

See also:

* [scene.getMaterialsFromSubPart](./scene_functions#getmaterialsfromsubpart)
* [scene.getSubpartMaterial](./scene_functions#getsubpartmaterial)
* [scene.listSubpartMaterials](./scene_functions#listsubpartmaterials)
* [scene.listSubpartVariantMaterials](./scene_functions#listsubpartvariantmaterials)
* [scene.setSubpartMaterial](./scene_functions#setsubpartmaterial)
* [scene.setSubpartMaterials](./scene_functions#setsubpartmaterials)
* [scene.setSubpartVariantMaterials](./scene_functions#setsubpartvariantmaterials)
* [scene.setSubpartVariantMaterialsList](./scene_functions#setsubpartvariantmaterialslist)
* [scene.transferSubpartMaterialsOnPatches](./scene_functions#transfersubpartmaterialsonpatches)

### listSubpartMaterials

List all the materials used in the part shape or overrided with a SubpartMaterial component.

```python
scene.listSubpartMaterials(occurrence) -> material.MaterialList
```

Parameters

| Type                                   | Name       | Description                                  |
| -------------------------------------- | ---------- | -------------------------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence which contains sub materials. |

Returns

| Type                                          | Name      | Description     |
| --------------------------------------------- | --------- | --------------- |
| [MaterialList](./material_types#materiallist) | materials | Used materials. |

See also:

* [scene.getMaterialsFromSubPart](./scene_functions#getmaterialsfromsubpart)
* [scene.getSubpartMaterial](./scene_functions#getsubpartmaterial)
* [scene.listActiveShapeMaterials](./scene_functions#listactiveshapematerials)
* [scene.listSubpartVariantMaterials](./scene_functions#listsubpartvariantmaterials)
* [scene.setSubpartMaterial](./scene_functions#setsubpartmaterial)
* [scene.setSubpartMaterials](./scene_functions#setsubpartmaterials)
* [scene.setSubpartVariantMaterials](./scene_functions#setsubpartvariantmaterials)
* [scene.setSubpartVariantMaterialsList](./scene_functions#setsubpartvariantmaterialslist)
* [scene.transferSubpartMaterialsOnPatches](./scene_functions#transfersubpartmaterialsonpatches)

### listSubpartVariantMaterials

List all the materials variants in subpart .

```python
scene.listSubpartVariantMaterials(occurrence) -> scene.VariantMaterialList
```

Parameters

| Type                                   | Name       | Description                             |
| -------------------------------------- | ---------- | --------------------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence which contains variants. |

Returns

| Type                                                     | Name             | Description                    |
| -------------------------------------------------------- | ---------------- | ------------------------------ |
| [VariantMaterialList](./scene_types#variantmateriallist) | variantMaterials | List of variant and materials. |

See also:

* [scene.getMaterialsFromSubPart](./scene_functions#getmaterialsfromsubpart)
* [scene.getSubpartMaterial](./scene_functions#getsubpartmaterial)
* [scene.listActiveShapeMaterials](./scene_functions#listactiveshapematerials)
* [scene.listSubpartMaterials](./scene_functions#listsubpartmaterials)
* [scene.setSubpartMaterial](./scene_functions#setsubpartmaterial)
* [scene.setSubpartMaterials](./scene_functions#setsubpartmaterials)
* [scene.setSubpartVariantMaterials](./scene_functions#setsubpartvariantmaterials)
* [scene.setSubpartVariantMaterialsList](./scene_functions#setsubpartvariantmaterialslist)
* [scene.transferSubpartMaterialsOnPatches](./scene_functions#transfersubpartmaterialsonpatches)

### setSubpartMaterial

Set a subpart material assignment using a SubpartMaterial component.

```python
scene.setSubpartMaterial(occurrence, subpartIndex, material)
```

Parameters

| Type                                   | Name         | Description        |
| -------------------------------------- | ------------ | ------------------ |
| [Occurrence](./scene_types#occurrence) | occurrence   | The Occurrence.    |
| [UInt](./core_types#uint)              | subpartIndex | The subpart index. |
| [Material](./material_types#material)  | material     | The material.      |

See also:

* [scene.getMaterialsFromSubPart](./scene_functions#getmaterialsfromsubpart)
* [scene.getSubpartMaterial](./scene_functions#getsubpartmaterial)
* [scene.listActiveShapeMaterials](./scene_functions#listactiveshapematerials)
* [scene.listSubpartMaterials](./scene_functions#listsubpartmaterials)
* [scene.listSubpartVariantMaterials](./scene_functions#listsubpartvariantmaterials)
* [scene.setSubpartMaterials](./scene_functions#setsubpartmaterials)
* [scene.setSubpartVariantMaterials](./scene_functions#setsubpartvariantmaterials)
* [scene.setSubpartVariantMaterialsList](./scene_functions#setsubpartvariantmaterialslist)
* [scene.transferSubpartMaterialsOnPatches](./scene_functions#transfersubpartmaterialsonpatches)

### setSubpartMaterials

Set multiple subpart materials at once using a SubpartMaterial component.

```python
scene.setSubpartMaterials(occurrence, materials, startIndex=0)
```

Parameters

| Type                                          | Name       | Description                                     |
| --------------------------------------------- | ---------- | ----------------------------------------------- |
| [Occurrence](./scene_types#occurrence)        | occurrence | The Occurrence on which to apply the materials. |
| [MaterialList](./material_types#materiallist) | materials  | Materials to set.                               |
| [UInt](./core_types#uint)                     | startIndex | The subpart start index.                        |

See also:

* [scene.getMaterialsFromSubPart](./scene_functions#getmaterialsfromsubpart)
* [scene.getSubpartMaterial](./scene_functions#getsubpartmaterial)
* [scene.listActiveShapeMaterials](./scene_functions#listactiveshapematerials)
* [scene.listSubpartMaterials](./scene_functions#listsubpartmaterials)
* [scene.listSubpartVariantMaterials](./scene_functions#listsubpartvariantmaterials)
* [scene.setSubpartMaterial](./scene_functions#setsubpartmaterial)
* [scene.setSubpartVariantMaterials](./scene_functions#setsubpartvariantmaterials)
* [scene.setSubpartVariantMaterialsList](./scene_functions#setsubpartvariantmaterialslist)
* [scene.transferSubpartMaterialsOnPatches](./scene_functions#transfersubpartmaterialsonpatches)

### setSubpartVariantMaterials

Set materials in variant .

```python
scene.setSubpartVariantMaterials(occurrence, variantMaterials)
```

Parameters

| Type                                                     | Name             | Description                             |
| -------------------------------------------------------- | ---------------- | --------------------------------------- |
| [Occurrence](./scene_types#occurrence)                   | occurrence       | The occurrence which contains variants. |
| [VariantMaterialList](./scene_types#variantmateriallist) | variantMaterials | List of variant and materials.          |

See also:

* [scene.getMaterialsFromSubPart](./scene_functions#getmaterialsfromsubpart)
* [scene.getSubpartMaterial](./scene_functions#getsubpartmaterial)
* [scene.listActiveShapeMaterials](./scene_functions#listactiveshapematerials)
* [scene.listSubpartMaterials](./scene_functions#listsubpartmaterials)
* [scene.listSubpartVariantMaterials](./scene_functions#listsubpartvariantmaterials)
* [scene.setSubpartMaterial](./scene_functions#setsubpartmaterial)
* [scene.setSubpartMaterials](./scene_functions#setsubpartmaterials)
* [scene.setSubpartVariantMaterialsList](./scene_functions#setsubpartvariantmaterialslist)
* [scene.transferSubpartMaterialsOnPatches](./scene_functions#transfersubpartmaterialsonpatches)

### setSubpartVariantMaterialsList

Set all the materials list in variants .

```python
scene.setSubpartVariantMaterialsList(variants, materialListList) -> scene.VariantMaterialList
```

Parameters

| Type                                                  | Name             | Description                                                |
| ----------------------------------------------------- | ---------------- | ---------------------------------------------------------- |
| [VariantList](./scene_types#variantlist)              | variants         | The part which contains variants.                          |
| [MaterialListList](./material_types#materiallistlist) | materialListList | The part which contains the list of material variant list. |

Returns

| Type                                                     | Name             | Description                    |
| -------------------------------------------------------- | ---------------- | ------------------------------ |
| [VariantMaterialList](./scene_types#variantmateriallist) | materialsVariant | List of variant and materials. |

See also:

* [scene.getMaterialsFromSubPart](./scene_functions#getmaterialsfromsubpart)
* [scene.getSubpartMaterial](./scene_functions#getsubpartmaterial)
* [scene.listActiveShapeMaterials](./scene_functions#listactiveshapematerials)
* [scene.listSubpartMaterials](./scene_functions#listsubpartmaterials)
* [scene.listSubpartVariantMaterials](./scene_functions#listsubpartvariantmaterials)
* [scene.setSubpartMaterial](./scene_functions#setsubpartmaterial)
* [scene.setSubpartMaterials](./scene_functions#setsubpartmaterials)
* [scene.setSubpartVariantMaterials](./scene_functions#setsubpartvariantmaterials)
* [scene.transferSubpartMaterialsOnPatches](./scene_functions#transfersubpartmaterialsonpatches)

### transferSubpartMaterialsOnPatches

Assign SubpartMaterialComponent materials on the occurrence's part shapes. This might affect other Part in the scene if not singularized before.

```python
scene.transferSubpartMaterialsOnPatches(occurrence)
```

Parameters

| Type                                   | Name       | Description                                      |
| -------------------------------------- | ---------- | ------------------------------------------------ |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence which has sub materials assigned. |

See also:

* [scene.getMaterialsFromSubPart](./scene_functions#getmaterialsfromsubpart)
* [scene.getSubpartMaterial](./scene_functions#getsubpartmaterial)
* [scene.listActiveShapeMaterials](./scene_functions#listactiveshapematerials)
* [scene.listSubpartMaterials](./scene_functions#listsubpartmaterials)
* [scene.listSubpartVariantMaterials](./scene_functions#listsubpartvariantmaterials)
* [scene.setSubpartMaterial](./scene_functions#setsubpartmaterial)
* [scene.setSubpartMaterials](./scene_functions#setsubpartmaterials)
* [scene.setSubpartVariantMaterials](./scene_functions#setsubpartvariantmaterials)
* [scene.setSubpartVariantMaterialsList](./scene_functions#setsubpartvariantmaterialslist)

## alternative trees

### createAlternativeTree

Create a new alternative tree.

```python
scene.createAlternativeTree(name, root=None) -> scene.AlternativeTree
```

Parameters

| Type                                   | Name | Description                           |
| -------------------------------------- | ---- | ------------------------------------- |
| [String](./core_types#string)          | name | The name of the new alternative tree. |
| [Occurrence](./scene_types#occurrence) | root | The root occurrence.                  |

Returns

| Type                                             | Name | Description               |
| ------------------------------------------------ | ---- | ------------------------- |
| [AlternativeTree](./scene_types#alternativetree) | tree | The new alternative tree. |

See also:

* [scene.getAlternativeTreeRoot](./scene_functions#getalternativetreeroot)
* [scene.listAlternativeTrees](./scene_functions#listalternativetrees)

### getAlternativeTreeRoot

Returns the root occurrence associated with the given AlternativeTree.

```python
scene.getAlternativeTreeRoot(tree) -> scene.Occurrence
```

Parameters

| Type                                             | Name | Description                |
| ------------------------------------------------ | ---- | -------------------------- |
| [AlternativeTree](./scene_types#alternativetree) | tree | Targeted alternative tree. |

Returns

| Type                                   | Name | Description          |
| -------------------------------------- | ---- | -------------------- |
| [Occurrence](./scene_types#occurrence) | root | The root occurrence. |

See also:

* [scene.createAlternativeTree](./scene_functions#createalternativetree)
* [scene.listAlternativeTrees](./scene_functions#listalternativetrees)

### listAlternativeTrees

Returns all the available alternative trees.

```python
scene.listAlternativeTrees() -> scene.AlternativeTreeList
```

Returns

| Type                                                     | Name  | Description            |
| -------------------------------------------------------- | ----- | ---------------------- |
| [AlternativeTreeList](./scene_types#alternativetreelist) | trees | All alternative trees. |

See also:

* [scene.createAlternativeTree](./scene_functions#createalternativetree)
* [scene.getAlternativeTreeRoot](./scene_functions#getalternativetreeroot)

## animations

### addAnimation

Add an animation in Animation library.

```python
scene.addAnimation(animation)
```

Parameters

| Type                                 | Name      | Description       |
| ------------------------------------ | --------- | ----------------- |
| [Animation](./scene_types#animation) | animation | Animation to add. |

See also:

* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### addKeyframe

Adds a keyframe in the curve.

```python
scene.addKeyframe(channel, time, value) -> scene.Keyframe
```

Parameters

| Type                                         | Name    | Description                                 |
| -------------------------------------------- | ------- | ------------------------------------------- |
| [AnimChannel](./scene_types#animchannel)     | channel | The channel one wants to add a keyframe in. |
| [AnimationTime](./scene_types#animationtime) | time    | The time.                                   |
| [Double](./core_types#double)                | value   | The value.                                  |

Returns

| Type                               | Name     | Description                 |
| ---------------------------------- | -------- | --------------------------- |
| [Keyframe](./scene_types#keyframe) | keyframe | The corresponding keyframe. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### addKeyframeFromCurrentPosition

Adds keyframes in a given AnimChannel based on current position.

```python
scene.addKeyframeFromCurrentPosition(channel, time)
```

Parameters

| Type                                         | Name    | Description                                 |
| -------------------------------------------- | ------- | ------------------------------------------- |
| [AnimChannel](./scene_types#animchannel)     | channel | The channel one wants to add a keyframe in. |
| [AnimationTime](./scene_types#animationtime) | time    | The time.                                   |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### animatesThisOccurrence

Does this Animation animates this Occurrence - or one of its parents (thus animating it indirectly) ?.

```python
scene.animatesThisOccurrence(animation, occurrence) -> core.Bool
```

Parameters

| Type                                   | Name       | Description                         |
| -------------------------------------- | ---------- | ----------------------------------- |
| [Animation](./scene_types#animation)   | animation  | The Animation.                      |
| [Occurrence](./scene_types#occurrence) | occurrence | The supposedly animated occurrence. |

Returns

| Type                      | Name       | Description                  |
| ------------------------- | ---------- | ---------------------------- |
| [Bool](./core_types#bool) | isAnimated | The answer to this question. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### bakeAnimation

> **Important:**
>
> This function is tagged as experimental.

Bake an animation. The values are now precalculated and no longer interpolated.

```python
scene.bakeAnimation(animation, occurrence, end, interval)
```

Parameters

| Type                                         | Name       | Description            |
| -------------------------------------------- | ---------- | ---------------------- |
| [Animation](./scene_types#animation)         | animation  | The Animation.         |
| [Occurrence](./scene_types#occurrence)       | occurrence | The occurrence.        |
| [Occurrence](./scene_types#occurrence)       | end        | The parent occurrence. |
| [AnimationTime](./scene_types#animationtime) | interval   | The interval.          |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### createAnimation

Creates an animation, need to use addAnimation when animation is filled.

```python
scene.createAnimation(name) -> scene.Animation
```

Parameters

| Type                          | Name | Description            |
| ----------------------------- | ---- | ---------------------- |
| [String](./core_types#string) | name | Name of the animation. |

Returns

| Type                                 | Name      | Description            |
| ------------------------------------ | --------- | ---------------------- |
| [Animation](./scene_types#animation) | animation | The created animation. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### createSkeletonMesh

Create a skeleton mesh from a joint component tree.

```python
scene.createSkeletonMesh(root) -> scene.Occurrence
```

Parameters

| Type                                   | Name | Description                |
| -------------------------------------- | ---- | -------------------------- |
| [Occurrence](./scene_types#occurrence) | root | Root joint component node. |

Returns

| Type                                   | Name        | Description                                  |
| -------------------------------------- | ----------- | -------------------------------------------- |
| [Occurrence](./scene_types#occurrence) | skeletonOcc | New occurrence containing the skeleton mesh. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### decimateAnimChannelBySegment

Decimates by segment a given AnimChannel.

```python
scene.decimateAnimChannelBySegment(channel, precision)
```

Parameters

| Type                                     | Name      | Description    |
| ---------------------------------------- | --------- | -------------- |
| [AnimChannel](./scene_types#animchannel) | channel   | The channel.   |
| [Double](./core_types#double)            | precision | The precision. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### deleteAnimation

Deletes an animation.

```python
scene.deleteAnimation(animation)
```

Parameters

| Type                                 | Name      | Description            |
| ------------------------------------ | --------- | ---------------------- |
| [Animation](./scene_types#animation) | animation | The created animation. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### deleteEmptyAnimation

Delete all animation that contain 0 keyframes.

```python
scene.deleteEmptyAnimation()
```

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### displayAllKeyframesFromAnimChannel

Displays info on the selected AnimChannel.

```python
scene.displayAllKeyframesFromAnimChannel(channel)
```

Parameters

| Type                                     | Name    | Description  |
| ---------------------------------------- | ------- | ------------ |
| [AnimChannel](./scene_types#animchannel) | channel | The channel. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### displayAllKeyframesFromAnimation

Displays info on the selected animation.

```python
scene.displayAllKeyframesFromAnimation(animation)
```

Parameters

| Type                                 | Name      | Description    |
| ------------------------------------ | --------- | -------------- |
| [Animation](./scene_types#animation) | animation | The animation. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### displayValueFromAnimChannelAtTime

Displays the value.

```python
scene.displayValueFromAnimChannelAtTime(channel, time, defaultValue=False)
```

Parameters

| Type                                         | Name         | Description             |
| -------------------------------------------- | ------------ | ----------------------- |
| [AnimChannel](./scene_types#animchannel)     | channel      | The channel.            |
| [AnimationTime](./scene_types#animationtime) | time         | The time.               |
| [Bool](./core_types#bool)                    | defaultValue | Show default instead ?. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### getAnimChannelIfExists

Returns the main AnimChannel of an Occurrence according to a given Animation.

```python
scene.getAnimChannelIfExists(animation, occurrence) -> scene.AnimChannel
```

Parameters

| Type                                   | Name       | Description     |
| -------------------------------------- | ---------- | --------------- |
| [Animation](./scene_types#animation)   | animation  | The Animation.  |
| [Occurrence](./scene_types#occurrence) | occurrence | The Occurrence. |

Returns

| Type                                     | Name    | Description  |
| ---------------------------------------- | ------- | ------------ |
| [AnimChannel](./scene_types#animchannel) | channel | The channel. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### getAnimChannelInfo

> **Important:**
>
> This function is tagged as experimental.

Get an animation channel informations.

```python
scene.getAnimChannelInfo(channel) -> scene.AnimChannelInfo
```

Parameters

| Type                                     | Name    | Description               |
| ---------------------------------------- | ------- | ------------------------- |
| [AnimChannel](./scene_types#animchannel) | channel | Animation to get info of. |

Returns

| Type                                             | Name        | Description |
| ------------------------------------------------ | ----------- | ----------- |
| [AnimChannelInfo](./scene_types#animchannelinfo) | channelInfo |             |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### getAnimChannelOccurrence

Returns the Occurrence related to a given AnimChannel.

```python
scene.getAnimChannelOccurrence(channel) -> scene.Occurrence
```

Parameters

| Type                                     | Name    | Description  |
| ---------------------------------------- | ------- | ------------ |
| [AnimChannel](./scene_types#animchannel) | channel | The channel. |

Returns

| Type                                   | Name       | Description                   |
| -------------------------------------- | ---------- | ----------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The corresponding occurrence. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### getAnimationComponentPropertyBinderLists

> **Important:**
>
> This function is tagged as experimental.

Packs all animation-related info in an object.

```python
scene.getAnimationComponentPropertyBinderLists(animationComponent) -> scene.AnimPropertyBinderList
```

Parameters

| Type                                                   | Name               | Description               |
| ------------------------------------------------------ | ------------------ | ------------------------- |
| [AnimationComponent](./scene_types#animationcomponent) | animationComponent | Animation to get info of. |

Returns

| Type                                                           | Name                   | Description |
| -------------------------------------------------------------- | ---------------------- | ----------- |
| [AnimPropertyBinderList](./scene_types#animpropertybinderlist) | animPropertyBinderList |             |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### getAnimationInfo

> **Important:**
>
> This function is tagged as experimental.

Packs all animation-related info in an object.

```python
scene.getAnimationInfo(animation) -> scene.AnimationInfo
```

Parameters

| Type                                 | Name      | Description               |
| ------------------------------------ | --------- | ------------------------- |
| [Animation](./scene_types#animation) | animation | Animation to get info of. |

Returns

| Type                                         | Name          | Description |
| -------------------------------------------- | ------------- | ----------- |
| [AnimationInfo](./scene_types#animationinfo) | animationInfo |             |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### getAnimationPropertyBinderLists

> **Important:**
>
> This function is tagged as experimental.

Packs all animation-related info in an object.

```python
scene.getAnimationPropertyBinderLists(animation) -> scene.AnimPropertyBinderList
```

Parameters

| Type                                 | Name      | Description               |
| ------------------------------------ | --------- | ------------------------- |
| [Animation](./scene_types#animation) | animation | Animation to get info of. |

Returns

| Type                                                           | Name                   | Description |
| -------------------------------------------------------------- | ---------------------- | ----------- |
| [AnimPropertyBinderList](./scene_types#animpropertybinderlist) | animPropertyBinderList |             |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### getJointDefinition

Get joint definition from id.

```python
scene.getJointDefinition(joint) -> scene.JointDefinition
```

Parameters

| Type                             | Name  | Description      |
| -------------------------------- | ----- | ---------------- |
| [Joint](./polygonal_types#joint) | joint | Id of the joint. |

Returns

| Type                                             | Name            | Description                                   |
| ------------------------------------------------ | --------------- | --------------------------------------------- |
| [JointDefinition](./scene_types#jointdefinition) | jointDefinition | The jointDefinition matching the id provided. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### getJointDefinitions

Get joint definition from id.

```python
scene.getJointDefinitions(joints) -> scene.JointDefinitionList
```

Parameters

| Type                                     | Name   | Description    |
| ---------------------------------------- | ------ | -------------- |
| [JointList](./polygonal_types#jointlist) | joints | Ids of joints. |

Returns

| Type                                                     | Name             | Description                                              |
| -------------------------------------------------------- | ---------------- | -------------------------------------------------------- |
| [JointDefinitionList](./scene_types#jointdefinitionlist) | jointDefinitions | An array of all jointDefinition matching joint provided. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### getKeyframeParentAnimChannel

Returns the parent AnimChannel of a given Keyframe.

```python
scene.getKeyframeParentAnimChannel(keyframe) -> scene.AnimChannel
```

Parameters

| Type                               | Name     | Description                           |
| ---------------------------------- | -------- | ------------------------------------- |
| [Keyframe](./scene_types#keyframe) | keyframe | The keyframe one wants the parent of. |

Returns

| Type                                     | Name        | Description |
| ---------------------------------------- | ----------- | ----------- |
| [AnimChannel](./scene_types#animchannel) | animChannel | The Parent. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### getKeyframes

Returns a list of all keyframes of a simple animChannel.

```python
scene.getKeyframes(channel) -> scene.KeyframeList
```

Parameters

| Type                                     | Name    | Description                                         |
| ---------------------------------------- | ------- | --------------------------------------------------- |
| [AnimChannel](./scene_types#animchannel) | channel | The channel one wants to extract the keyframs from. |

Returns

| Type                                       | Name         | Description            |
| ------------------------------------------ | ------------ | ---------------------- |
| [KeyframeList](./scene_types#keyframelist) | keyframelist | The list of keyframes. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### getMainChannel

Returns the main AnimChannel of a given AnimChannel.

```python
scene.getMainChannel(channel) -> scene.AnimChannel
```

Parameters

| Type                                     | Name    | Description                        |
| ---------------------------------------- | ------- | ---------------------------------- |
| [AnimChannel](./scene_types#animchannel) | channel | The channel one wants the main of. |

Returns

| Type                                     | Name        | Description                     |
| ---------------------------------------- | ----------- | ------------------------------- |
| [AnimChannel](./scene_types#animchannel) | mainChannel | The corresponding main Channel. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### getOccurrenceJoint

Returns the Joint assigned to an occurrence if any.

```python
scene.getOccurrenceJoint(occurrence) -> polygonal.Joint
```

Parameters

| Type                                   | Name       | Description     |
| -------------------------------------- | ---------- | --------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence. |

Returns

| Type                             | Name  | Description                                 |
| -------------------------------- | ----- | ------------------------------------------- |
| [Joint](./polygonal_types#joint) | joint | The joint assigned to the given occurrence. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### getParentChannel

Returns (if exists) the parent AnimChannel of a given AnimChannel.

```python
scene.getParentChannel(channel) -> scene.AnimChannel
```

Parameters

| Type                                     | Name    | Description                          |
| ---------------------------------------- | ------- | ------------------------------------ |
| [AnimChannel](./scene_types#animchannel) | channel | The channel one wants the parent of. |

Returns

| Type                                     | Name          | Description                       |
| ---------------------------------------- | ------------- | --------------------------------- |
| [AnimChannel](./scene_types#animchannel) | parentChannel | The corresponding parent Channel. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### getSubChannel

Returns the subchannel of a given name from an AnimChannel.

```python
scene.getSubChannel(channel, name) -> scene.AnimChannel
```

Parameters

| Type                                     | Name    | Description                              |
| ---------------------------------------- | ------- | ---------------------------------------- |
| [AnimChannel](./scene_types#animchannel) | channel | The channel one wants the subchannel of. |
| [String](./core_types#string)            | name    | The name of the subchannel.              |

Returns

| Type                                     | Name       | Description                   |
| ---------------------------------------- | ---------- | ----------------------------- |
| [AnimChannel](./scene_types#animchannel) | subChannel | The corresponding subchannel. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### getSubChannels

Returns all the sub channel of an AnimChannel.

```python
scene.getSubChannels(channel) -> scene.AnimChannelList
```

Parameters

| Type                                     | Name    | Description                              |
| ---------------------------------------- | ------- | ---------------------------------------- |
| [AnimChannel](./scene_types#animchannel) | channel | The channel one wants the subchannel of. |

Returns

| Type                                             | Name        | Description                      |
| ------------------------------------------------ | ----------- | -------------------------------- |
| [AnimChannelList](./scene_types#animchannellist) | subChannels | The list of direct sub channels. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### linkPropertyToAnimation

Creates a Binder in an Animation stack to animate an entity's property.

```python
scene.linkPropertyToAnimation(animation, entity, propertyName) -> scene.AnimChannel
```

Parameters

| Type                                 | Name         | Description                                           |
| ------------------------------------ | ------------ | ----------------------------------------------------- |
| [Animation](./scene_types#animation) | animation    | The Animation stack where to put a animated property. |
| [Entity](./core_types#entity)        | entity       | The entity object to animate.                         |
| [String](./core_types#string)        | propertyName | The name of the property to animate.                  |

Returns

| Type                                     | Name        | Description                     |
| ---------------------------------------- | ----------- | ------------------------------- |
| [AnimChannel](./scene_types#animchannel) | mainChannel | The main channel of the binder. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### listAnimations

List all Animations from the scene.

```python
scene.listAnimations() -> scene.AnimationList
```

Returns

| Type                                         | Name     | Description                     |
| -------------------------------------------- | -------- | ------------------------------- |
| [AnimationList](./scene_types#animationlist) | animList | The list containing animations. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### listMainChannels

List all main AnimChannel from a given Animation.

```python
scene.listMainChannels(animation) -> scene.AnimChannelList
```

Parameters

| Type                                 | Name      | Description                                        |
| ------------------------------------ | --------- | -------------------------------------------------- |
| [Animation](./scene_types#animation) | animation | The Animation one wants to list the channels from. |

Returns

| Type                                             | Name        | Description                           |
| ------------------------------------------------ | ----------- | ------------------------------------- |
| [AnimChannelList](./scene_types#animchannellist) | channelList | The list containing the AnimChannels. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### makeDefaultKeyframe

Creates keyframes with the default values of the channel at time 0.

```python
scene.makeDefaultKeyframe(channel)
```

Parameters

| Type                                     | Name    | Description  |
| ---------------------------------------- | ------- | ------------ |
| [AnimChannel](./scene_types#animchannel) | channel | The channel. |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### moveAnimation

Moving animation.

```python
scene.moveAnimation(animation, target, newParent, interval)
```

Parameters

| Type                                         | Name      | Description                |
| -------------------------------------------- | --------- | -------------------------- |
| [Animation](./scene_types#animation)         | animation | The Animation.             |
| [Occurrence](./scene_types#occurrence)       | target    | The target occurrence.     |
| [Occurrence](./scene_types#occurrence)       | newParent | The new parent occurrence. |
| [AnimationTime](./scene_types#animationtime) | interval  | The interval.              |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.removeKeyframe](./scene_functions#removekeyframe)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### removeKeyframe

Removes a keyframe in the curve.

```python
scene.removeKeyframe(channel, time)
```

Parameters

| Type                                         | Name    | Description                                      |
| -------------------------------------------- | ------- | ------------------------------------------------ |
| [AnimChannel](./scene_types#animchannel)     | channel | The channel one wants to remove a keyframe from. |
| [AnimationTime](./scene_types#animationtime) | time    | The time.                                        |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.unlinkPropertyToAnimation](./scene_functions#unlinkpropertytoanimation)

### unlinkPropertyToAnimation

Unlinks a binder.

```python
scene.unlinkPropertyToAnimation(animation, entity, propertyName)
```

Parameters

| Type                                 | Name         | Description                                           |
| ------------------------------------ | ------------ | ----------------------------------------------------- |
| [Animation](./scene_types#animation) | animation    | The Animation stack where to put a animated property. |
| [Entity](./core_types#entity)        | entity       | The entity object to animate.                         |
| [String](./core_types#string)        | propertyName | The name of the property to animate.                  |

See also:

* [scene.addAnimation](./scene_functions#addanimation)
* [scene.addKeyframe](./scene_functions#addkeyframe)
* [scene.addKeyframeFromCurrentPosition](./scene_functions#addkeyframefromcurrentposition)
* [scene.animatesThisOccurrence](./scene_functions#animatesthisoccurrence)
* [scene.bakeAnimation](./scene_functions#bakeanimation)
* [scene.createAnimation](./scene_functions#createanimation)
* [scene.createSkeletonMesh](./scene_functions#createskeletonmesh)
* [scene.decimateAnimChannelBySegment](./scene_functions#decimateanimchannelbysegment)
* [scene.deleteAnimation](./scene_functions#deleteanimation)
* [scene.deleteEmptyAnimation](./scene_functions#deleteemptyanimation)
* [scene.displayAllKeyframesFromAnimChannel](./scene_functions#displayallkeyframesfromanimchannel)
* [scene.displayAllKeyframesFromAnimation](./scene_functions#displayallkeyframesfromanimation)
* [scene.displayValueFromAnimChannelAtTime](./scene_functions#displayvaluefromanimchannelattime)
* [scene.getAnimChannelIfExists](./scene_functions#getanimchannelifexists)
* [scene.getAnimChannelInfo](./scene_functions#getanimchannelinfo)
* [scene.getAnimChannelOccurrence](./scene_functions#getanimchanneloccurrence)
* [scene.getAnimationComponentPropertyBinderLists](./scene_functions#getanimationcomponentpropertybinderlists)
* [scene.getAnimationInfo](./scene_functions#getanimationinfo)
* [scene.getAnimationPropertyBinderLists](./scene_functions#getanimationpropertybinderlists)
* [scene.getJointDefinition](./scene_functions#getjointdefinition)
* [scene.getJointDefinitions](./scene_functions#getjointdefinitions)
* [scene.getKeyframeParentAnimChannel](./scene_functions#getkeyframeparentanimchannel)
* [scene.getKeyframes](./scene_functions#getkeyframes)
* [scene.getMainChannel](./scene_functions#getmainchannel)
* [scene.getOccurrenceJoint](./scene_functions#getoccurrencejoint)
* [scene.getParentChannel](./scene_functions#getparentchannel)
* [scene.getSubChannel](./scene_functions#getsubchannel)
* [scene.getSubChannels](./scene_functions#getsubchannels)
* [scene.linkPropertyToAnimation](./scene_functions#linkpropertytoanimation)
* [scene.listAnimations](./scene_functions#listanimations)
* [scene.listMainChannels](./scene_functions#listmainchannels)
* [scene.makeDefaultKeyframe](./scene_functions#makedefaultkeyframe)
* [scene.moveAnimation](./scene_functions#moveanimation)
* [scene.removeKeyframe](./scene_functions#removekeyframe)

## debug

### getBRepInfos

Get BRep info.

```python
scene.getBRepInfos() -> core.Int, core.Int, core.Int, core.Int, core.Int, core.Int, core.Int, core.Int, core.Int, core.Int, core.Double, core.Int, core.Int, core.Int
```

Returns

| Type                          | Name                 | Description                  |
| ----------------------------- | -------------------- | ---------------------------- |
| [Int](./core_types#int)       | partCount            | The part count.              |
| [Int](./core_types#int)       | totalPartCount       | The total part count.        |
| [Int](./core_types#int)       | vertexCount          | The vertex count.            |
| [Int](./core_types#int)       | totalVertexCount     | The total vertex count.      |
| [Int](./core_types#int)       | edgeCount            | The edge count.              |
| [Int](./core_types#int)       | totalEdgeCount       | The total edge count.        |
| [Int](./core_types#int)       | openShellCount       | The open shell count.        |
| [Int](./core_types#int)       | totalOpenShellCount  | The total open shell count.  |
| [Int](./core_types#int)       | bodyCount            | The body count.              |
| [Int](./core_types#int)       | totalBodyCount       | The total body count.        |
| [Double](./core_types#double) | area2Dsum            | The 2D area sum.             |
| [Int](./core_types#int)       | boundaryCount        | The boundary count.          |
| [Int](./core_types#int)       | boundaryEdgeCount    | The boundary edge count.     |
| [Int](./core_types#int)       | nonManifoldEdgeCount | The non manifold edge count. |

See also:

* [scene.getTessellationInfos](./scene_functions#gettessellationinfos)
* [scene.getTessellationParameters](./scene_functions#gettessellationparameters)
* [scene.print](./scene_functions#print)

### getTessellationInfos

Get tessellation info.

```python
scene.getTessellationInfos(root=0) -> core.Int, core.Int, core.Int, core.Int, core.Int, core.Int, core.Int, core.Int, core.Int, core.Int, core.Int, core.Int, core.Int
```

Parameters

| Type                                   | Name | Description           |
| -------------------------------------- | ---- | --------------------- |
| [Occurrence](./scene_types#occurrence) | root | Occurrence tree root. |

Returns

| Type                    | Name                 | Description                  |
| ----------------------- | -------------------- | ---------------------------- |
| [Int](./core_types#int) | partCount            | The part count.              |
| [Int](./core_types#int) | totalPartCount       | The total part count.        |
| [Int](./core_types#int) | vertexCount          | The vertex count.            |
| [Int](./core_types#int) | totalVertexCount     | The total vertex count.      |
| [Int](./core_types#int) | edgeCount            | The edge count.              |
| [Int](./core_types#int) | totalEdgeCount       | The total edge count.        |
| [Int](./core_types#int) | polygonCount         | The polygon count.           |
| [Int](./core_types#int) | totalPolygonCount    | The total polygon count.     |
| [Int](./core_types#int) | patchCount           | The patch count.             |
| [Int](./core_types#int) | totalPatchCount      | The total patch count.       |
| [Int](./core_types#int) | boundaryCount        | The boundary count.          |
| [Int](./core_types#int) | boundaryEdgeCount    | The boundary edge count.     |
| [Int](./core_types#int) | nonManifoldEdgeCount | The non manifold edge count. |

See also:

* [scene.getBRepInfos](./scene_functions#getbrepinfos)
* [scene.getTessellationParameters](./scene_functions#gettessellationparameters)
* [scene.print](./scene_functions#print)

### getTessellationParameters

Get tessellation parameters.

```python
scene.getTessellationParameters(part) -> core.Double, core.Double, core.Double, core.Bool, scene.UVGenerationMode, core.Int, core.Double, core.Bool, core.Bool
```

Parameters

| Type                       | Name | Description           |
| -------------------------- | ---- | --------------------- |
| [Part](./scene_types#part) | part | The tessellated part. |

Returns

| Type                                               | Name             | Description                      |
| -------------------------------------------------- | ---------------- | -------------------------------- |
| [Double](./core_types#double)                      | maxSag           | The MaxSag value in mm.          |
| [Double](./core_types#double)                      | maxLength        | The maximum length in mm.        |
| [Double](./core_types#double)                      | maxAngle         |                                  |
| [Bool](./core_types#bool)                          | createNormals    | Whether normals were created.    |
| [UVGenerationMode](./scene_types#uvgenerationmode) | uvGenerationMode | The uv generation mode.          |
| [Int](./core_types#int)                            | uvChannel        | The UV channel.                  |
| [Double](./core_types#double)                      | uvPadding        | The UV padding.                  |
| [Bool](./core_types#bool)                          | createTangents   | Whether tangents were created.   |
| [Bool](./core_types#bool)                          | createFreeEdges  | Whether free edges were created. |

See also:

* [scene.getBRepInfos](./scene_functions#getbrepinfos)
* [scene.getTessellationInfos](./scene_functions#gettessellationinfos)
* [scene.print](./scene_functions#print)

### print

Print an occurrence tree on log.

```python
scene.print(root=0)
```

Parameters

| Type                                   | Name | Description           |
| -------------------------------------- | ---- | --------------------- |
| [Occurrence](./scene_types#occurrence) | root | Occurrence tree root. |

See also:

* [scene.getBRepInfos](./scene_functions#getbrepinfos)
* [scene.getTessellationInfos](./scene_functions#gettessellationinfos)
* [scene.getTessellationParameters](./scene_functions#gettessellationparameters)

## filters

### addFilterToLibrary

Add a filter to the filters library.

```python
scene.addFilterToLibrary(name, expr) -> core.Ident
```

Parameters

| Type                                               | Name | Description            |
| -------------------------------------------------- | ---- | ---------------------- |
| [String](./core_types#string)                      | name | Name of the filter.    |
| [FilterExpression](./scene_types#filterexpression) | expr | The filter expression. |

Returns

| Type                        | Name     | Description                       |
| --------------------------- | -------- | --------------------------------- |
| [Ident](./core_types#ident) | filterId | Identifier of the created filter. |

See also:

* [scene.evaluateExpression](./scene_functions#evaluateexpression)
* [scene.evaluateExpressionOnOccurrences](./scene_functions#evaluateexpressiononoccurrences)
* [scene.evaluateExpressionOnSubTree](./scene_functions#evaluateexpressiononsubtree)
* [scene.exportFilterLibrary](./scene_functions#exportfilterlibrary)
* [scene.findFilterByName](./scene_functions#findfilterbyname)
* [scene.getFilterExpression](./scene_functions#getfilterexpression)
* [scene.getFilterFromLibrary](./scene_functions#getfilterfromlibrary)
* [scene.getFilteredOccurrences](./scene_functions#getfilteredoccurrences)
* [scene.importFilterLibrary](./scene_functions#importfilterlibrary)
* [scene.listFilterLibrary](./scene_functions#listfilterlibrary)
* [scene.removeFilterFromLibrary](./scene_functions#removefilterfromlibrary)

### evaluateExpression

Evaluate the given filter expression.

```python
scene.evaluateExpression(filter) -> core.String
```

Parameters

| Type                                               | Name   | Description            |
| -------------------------------------------------- | ------ | ---------------------- |
| [FilterExpression](./scene_types#filterexpression) | filter | The filter expression. |

Returns

| Type                          | Name   | Description                     |
| ----------------------------- | ------ | ------------------------------- |
| [String](./core_types#string) | result | Result of the given expression. |

See also:

* [scene.addFilterToLibrary](./scene_functions#addfiltertolibrary)
* [scene.evaluateExpressionOnOccurrences](./scene_functions#evaluateexpressiononoccurrences)
* [scene.evaluateExpressionOnSubTree](./scene_functions#evaluateexpressiononsubtree)
* [scene.exportFilterLibrary](./scene_functions#exportfilterlibrary)
* [scene.findFilterByName](./scene_functions#findfilterbyname)
* [scene.getFilterExpression](./scene_functions#getfilterexpression)
* [scene.getFilterFromLibrary](./scene_functions#getfilterfromlibrary)
* [scene.getFilteredOccurrences](./scene_functions#getfilteredoccurrences)
* [scene.importFilterLibrary](./scene_functions#importfilterlibrary)
* [scene.listFilterLibrary](./scene_functions#listfilterlibrary)
* [scene.removeFilterFromLibrary](./scene_functions#removefilterfromlibrary)

### evaluateExpressionOnOccurrences

Evaluate the given filter expression on all occurrences under the given occurrence and returns the result.

```python
scene.evaluateExpressionOnOccurrences(occurrences, filter) -> core.StringList
```

Parameters

| Type                                               | Name        | Description                                      |
| -------------------------------------------------- | ----------- | ------------------------------------------------ |
| [OccurrenceList](./scene_types#occurrencelist)     | occurrences | Occurrences on which to evaluate the expression. |
| [FilterExpression](./scene_types#filterexpression) | filter      | The filter expression.                           |

Returns

| Type                                  | Name        | Description                                                                                |
| ------------------------------------- | ----------- | ------------------------------------------------------------------------------------------ |
| [StringList](./core_types#stringlist) | evaluations | The evaluation of the expression on the occurrence at the same index in given occurrences. |

See also:

* [scene.addFilterToLibrary](./scene_functions#addfiltertolibrary)
* [scene.evaluateExpression](./scene_functions#evaluateexpression)
* [scene.evaluateExpressionOnSubTree](./scene_functions#evaluateexpressiononsubtree)
* [scene.exportFilterLibrary](./scene_functions#exportfilterlibrary)
* [scene.findFilterByName](./scene_functions#findfilterbyname)
* [scene.getFilterExpression](./scene_functions#getfilterexpression)
* [scene.getFilterFromLibrary](./scene_functions#getfilterfromlibrary)
* [scene.getFilteredOccurrences](./scene_functions#getfilteredoccurrences)
* [scene.importFilterLibrary](./scene_functions#importfilterlibrary)
* [scene.listFilterLibrary](./scene_functions#listfilterlibrary)
* [scene.removeFilterFromLibrary](./scene_functions#removefilterfromlibrary)

### evaluateExpressionOnSubTree

Evaluate the given filter expression on all occurrences under the given occurrence and returns the result.

```python
scene.evaluateExpressionOnSubTree(filter, fromOcc=None) -> scene.OccurrenceList, core.StringList
```

Parameters

| Type                                               | Name    | Description                         |
| -------------------------------------------------- | ------- | ----------------------------------- |
| [FilterExpression](./scene_types#filterexpression) | filter  | The filter expression.              |
| [Occurrence](./scene_types#occurrence)             | fromOcc | Source occurrence of the recursion. |

Returns

| Type                                           | Name        | Description                                                                          |
| ---------------------------------------------- | ----------- | ------------------------------------------------------------------------------------ |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences |                                                                                      |
| [StringList](./core_types#stringlist)          | evaluations | The evaluation of the expression on the occurrence at the same index in occurrences. |

See also:

* [scene.addFilterToLibrary](./scene_functions#addfiltertolibrary)
* [scene.evaluateExpression](./scene_functions#evaluateexpression)
* [scene.evaluateExpressionOnOccurrences](./scene_functions#evaluateexpressiononoccurrences)
* [scene.exportFilterLibrary](./scene_functions#exportfilterlibrary)
* [scene.findFilterByName](./scene_functions#findfilterbyname)
* [scene.getFilterExpression](./scene_functions#getfilterexpression)
* [scene.getFilterFromLibrary](./scene_functions#getfilterfromlibrary)
* [scene.getFilteredOccurrences](./scene_functions#getfilteredoccurrences)
* [scene.importFilterLibrary](./scene_functions#importfilterlibrary)
* [scene.listFilterLibrary](./scene_functions#listfilterlibrary)
* [scene.removeFilterFromLibrary](./scene_functions#removefilterfromlibrary)

### exportFilterLibrary

Export filters from a given file.

```python
scene.exportFilterLibrary(file)
```

Parameters

| Type                              | Name | Description          |
| --------------------------------- | ---- | -------------------- |
| [FilePath](./core_types#filepath) | file | File path to export. |

See also:

* [scene.addFilterToLibrary](./scene_functions#addfiltertolibrary)
* [scene.evaluateExpression](./scene_functions#evaluateexpression)
* [scene.evaluateExpressionOnOccurrences](./scene_functions#evaluateexpressiononoccurrences)
* [scene.evaluateExpressionOnSubTree](./scene_functions#evaluateexpressiononsubtree)
* [scene.findFilterByName](./scene_functions#findfilterbyname)
* [scene.getFilterExpression](./scene_functions#getfilterexpression)
* [scene.getFilterFromLibrary](./scene_functions#getfilterfromlibrary)
* [scene.getFilteredOccurrences](./scene_functions#getfilteredoccurrences)
* [scene.importFilterLibrary](./scene_functions#importfilterlibrary)
* [scene.listFilterLibrary](./scene_functions#listfilterlibrary)
* [scene.removeFilterFromLibrary](./scene_functions#removefilterfromlibrary)

### findFilterByName

Returns the first filter in the filter library with the given name.

```python
scene.findFilterByName(name) -> scene.Filter
```

Parameters

| Type                          | Name | Description                                      |
| ----------------------------- | ---- | ------------------------------------------------ |
| [String](./core_types#string) | name | Name of the filter to retrieve (case sensitive). |

Returns

| Type                           | Name   | Description           |
| ------------------------------ | ------ | --------------------- |
| [Filter](./scene_types#filter) | filter | The retrieved filter. |

See also:

* [scene.addFilterToLibrary](./scene_functions#addfiltertolibrary)
* [scene.evaluateExpression](./scene_functions#evaluateexpression)
* [scene.evaluateExpressionOnOccurrences](./scene_functions#evaluateexpressiononoccurrences)
* [scene.evaluateExpressionOnSubTree](./scene_functions#evaluateexpressiononsubtree)
* [scene.exportFilterLibrary](./scene_functions#exportfilterlibrary)
* [scene.getFilterExpression](./scene_functions#getfilterexpression)
* [scene.getFilterFromLibrary](./scene_functions#getfilterfromlibrary)
* [scene.getFilteredOccurrences](./scene_functions#getfilteredoccurrences)
* [scene.importFilterLibrary](./scene_functions#importfilterlibrary)
* [scene.listFilterLibrary](./scene_functions#listfilterlibrary)
* [scene.removeFilterFromLibrary](./scene_functions#removefilterfromlibrary)

### getFilterExpression

Returns the filter expression (string) from a filter id stored in the library.

```python
scene.getFilterExpression(filterId) -> scene.FilterExpression
```

Parameters

| Type                        | Name     | Description                        |
| --------------------------- | -------- | ---------------------------------- |
| [Ident](./core_types#ident) | filterId | Identifier of the filter to fetch. |

Returns

| Type                                               | Name | Description        |
| -------------------------------------------------- | ---- | ------------------ |
| [FilterExpression](./scene_types#filterexpression) | expr | Filter expression. |

See also:

* [scene.addFilterToLibrary](./scene_functions#addfiltertolibrary)
* [scene.evaluateExpression](./scene_functions#evaluateexpression)
* [scene.evaluateExpressionOnOccurrences](./scene_functions#evaluateexpressiononoccurrences)
* [scene.evaluateExpressionOnSubTree](./scene_functions#evaluateexpressiononsubtree)
* [scene.exportFilterLibrary](./scene_functions#exportfilterlibrary)
* [scene.findFilterByName](./scene_functions#findfilterbyname)
* [scene.getFilterFromLibrary](./scene_functions#getfilterfromlibrary)
* [scene.getFilteredOccurrences](./scene_functions#getfilteredoccurrences)
* [scene.importFilterLibrary](./scene_functions#importfilterlibrary)
* [scene.listFilterLibrary](./scene_functions#listfilterlibrary)
* [scene.removeFilterFromLibrary](./scene_functions#removefilterfromlibrary)

### getFilterFromLibrary

Retrieve a filter from the library with its identifier.

```python
scene.getFilterFromLibrary(filterId) -> scene.Filter
```

Parameters

| Type                        | Name     | Description                           |
| --------------------------- | -------- | ------------------------------------- |
| [Ident](./core_types#ident) | filterId | Identifier of the filter to retrieve. |

Returns

| Type                           | Name   | Description           |
| ------------------------------ | ------ | --------------------- |
| [Filter](./scene_types#filter) | filter | The retrieved filter. |

See also:

* [scene.addFilterToLibrary](./scene_functions#addfiltertolibrary)
* [scene.evaluateExpression](./scene_functions#evaluateexpression)
* [scene.evaluateExpressionOnOccurrences](./scene_functions#evaluateexpressiononoccurrences)
* [scene.evaluateExpressionOnSubTree](./scene_functions#evaluateexpressiononsubtree)
* [scene.exportFilterLibrary](./scene_functions#exportfilterlibrary)
* [scene.findFilterByName](./scene_functions#findfilterbyname)
* [scene.getFilterExpression](./scene_functions#getfilterexpression)
* [scene.getFilteredOccurrences](./scene_functions#getfilteredoccurrences)
* [scene.importFilterLibrary](./scene_functions#importfilterlibrary)
* [scene.listFilterLibrary](./scene_functions#listfilterlibrary)
* [scene.removeFilterFromLibrary](./scene_functions#removefilterfromlibrary)

### getFilteredOccurrences

Recursively get all the occurrences validating the given filter expression.

```python
scene.getFilteredOccurrences(filter, fromOcc=None) -> scene.OccurrenceList
```

Parameters

| Type                                               | Name    | Description                         |
| -------------------------------------------------- | ------- | ----------------------------------- |
| [FilterExpression](./scene_types#filterexpression) | filter  | The filter expression.              |
| [Occurrence](./scene_types#occurrence)             | fromOcc | Source occurrence of the recursion. |

Returns

| Type                                           | Name        | Description         |
| ---------------------------------------------- | ----------- | ------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | Result occurrences. |

See also:

* [scene.addFilterToLibrary](./scene_functions#addfiltertolibrary)
* [scene.evaluateExpression](./scene_functions#evaluateexpression)
* [scene.evaluateExpressionOnOccurrences](./scene_functions#evaluateexpressiononoccurrences)
* [scene.evaluateExpressionOnSubTree](./scene_functions#evaluateexpressiononsubtree)
* [scene.exportFilterLibrary](./scene_functions#exportfilterlibrary)
* [scene.findFilterByName](./scene_functions#findfilterbyname)
* [scene.getFilterExpression](./scene_functions#getfilterexpression)
* [scene.getFilterFromLibrary](./scene_functions#getfilterfromlibrary)
* [scene.importFilterLibrary](./scene_functions#importfilterlibrary)
* [scene.listFilterLibrary](./scene_functions#listfilterlibrary)
* [scene.removeFilterFromLibrary](./scene_functions#removefilterfromlibrary)

### importFilterLibrary

Import filters from a given file.

```python
scene.importFilterLibrary(file)
```

Parameters

| Type                              | Name | Description                         |
| --------------------------------- | ---- | ----------------------------------- |
| [FilePath](./core_types#filepath) | file | File containing the filter library. |

See also:

* [scene.addFilterToLibrary](./scene_functions#addfiltertolibrary)
* [scene.evaluateExpression](./scene_functions#evaluateexpression)
* [scene.evaluateExpressionOnOccurrences](./scene_functions#evaluateexpressiononoccurrences)
* [scene.evaluateExpressionOnSubTree](./scene_functions#evaluateexpressiononsubtree)
* [scene.exportFilterLibrary](./scene_functions#exportfilterlibrary)
* [scene.findFilterByName](./scene_functions#findfilterbyname)
* [scene.getFilterExpression](./scene_functions#getfilterexpression)
* [scene.getFilterFromLibrary](./scene_functions#getfilterfromlibrary)
* [scene.getFilteredOccurrences](./scene_functions#getfilteredoccurrences)
* [scene.listFilterLibrary](./scene_functions#listfilterlibrary)
* [scene.removeFilterFromLibrary](./scene_functions#removefilterfromlibrary)

### listFilterLibrary

Returns all the filter stored in the filter library.

```python
scene.listFilterLibrary() -> scene.FilterList
```

Returns

| Type                                   | Name    | Description                                   |
| -------------------------------------- | ------- | --------------------------------------------- |
| [FilterList](./scene_types#filterlist) | filters | All the filters stored in the filter library. |

See also:

* [scene.addFilterToLibrary](./scene_functions#addfiltertolibrary)
* [scene.evaluateExpression](./scene_functions#evaluateexpression)
* [scene.evaluateExpressionOnOccurrences](./scene_functions#evaluateexpressiononoccurrences)
* [scene.evaluateExpressionOnSubTree](./scene_functions#evaluateexpressiononsubtree)
* [scene.exportFilterLibrary](./scene_functions#exportfilterlibrary)
* [scene.findFilterByName](./scene_functions#findfilterbyname)
* [scene.getFilterExpression](./scene_functions#getfilterexpression)
* [scene.getFilterFromLibrary](./scene_functions#getfilterfromlibrary)
* [scene.getFilteredOccurrences](./scene_functions#getfilteredoccurrences)
* [scene.importFilterLibrary](./scene_functions#importfilterlibrary)
* [scene.removeFilterFromLibrary](./scene_functions#removefilterfromlibrary)

### removeFilterFromLibrary

Remove a filter from the filters library.

```python
scene.removeFilterFromLibrary(filterId)
```

Parameters

| Type                        | Name     | Description                         |
| --------------------------- | -------- | ----------------------------------- |
| [Ident](./core_types#ident) | filterId | Identifier of the filter to remove. |

See also:

* [scene.addFilterToLibrary](./scene_functions#addfiltertolibrary)
* [scene.evaluateExpression](./scene_functions#evaluateexpression)
* [scene.evaluateExpressionOnOccurrences](./scene_functions#evaluateexpressiononoccurrences)
* [scene.evaluateExpressionOnSubTree](./scene_functions#evaluateexpressiononsubtree)
* [scene.exportFilterLibrary](./scene_functions#exportfilterlibrary)
* [scene.findFilterByName](./scene_functions#findfilterbyname)
* [scene.getFilterExpression](./scene_functions#getfilterexpression)
* [scene.getFilterFromLibrary](./scene_functions#getfilterfromlibrary)
* [scene.getFilteredOccurrences](./scene_functions#getfilteredoccurrences)
* [scene.importFilterLibrary](./scene_functions#importfilterlibrary)
* [scene.listFilterLibrary](./scene_functions#listfilterlibrary)

## isolate

### getIsolatedOccurrences

Get Occurrences currently being isolated.

```python
scene.getIsolatedOccurrences() -> scene.OccurrenceList
```

Returns

| Type                                           | Name        | Description                       |
| ---------------------------------------------- | ----------- | --------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | The list of occurrences isolated. |

See also:

* [scene.isIsolated](./scene_functions#isisolated)
* [scene.isolate](./scene_functions#isolate)
* [scene.unisolate](./scene_functions#unisolate)

### isIsolated

Is in isolate mode.

```python
scene.isIsolated() -> core.Boolean
```

Returns

| Type                            | Name     | Description                     |
| ------------------------------- | -------- | ------------------------------- |
| [Boolean](./core_types#boolean) | isolated | Returns is it in isolated mode. |

See also:

* [scene.getIsolatedOccurrences](./scene_functions#getisolatedoccurrences)
* [scene.isolate](./scene_functions#isolate)
* [scene.unisolate](./scene_functions#unisolate)

### isolate

Enter isolate mode by isolating a subset of the scene for process, export, viewer, ...

```python
scene.isolate(occurrences)
```

Parameters

| Type                                           | Name        | Description             |
| ---------------------------------------------- | ----------- | ----------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | Occurrences to isolate. |

See also:

* [scene.getIsolatedOccurrences](./scene_functions#getisolatedoccurrences)
* [scene.isIsolated](./scene_functions#isisolated)
* [scene.unisolate](./scene_functions#unisolate)

### unisolate

Exit the isolate mode.

```python
scene.unisolate()
```

See also:

* [scene.getIsolatedOccurrences](./scene_functions#getisolatedoccurrences)
* [scene.isIsolated](./scene_functions#isisolated)
* [scene.isolate](./scene_functions#isolate)

## locks

### sceneReadLock

Lock the scene to prevent modification while allowing reading from other threads.

```python
scene.sceneReadLock()
```

See also:

* [scene.sceneReadUnlock](./scene_functions#scenereadunlock)
* [scene.sceneTryReadLock](./scene_functions#scenetryreadlock)
* [scene.sceneWriteLock](./scene_functions#scenewritelock)
* [scene.sceneWriteUnlock](./scene_functions#scenewriteunlock)

### sceneReadUnlock

Unlock the scene for modification.

```python
scene.sceneReadUnlock()
```

See also:

* [scene.sceneReadLock](./scene_functions#scenereadlock)
* [scene.sceneTryReadLock](./scene_functions#scenetryreadlock)
* [scene.sceneWriteLock](./scene_functions#scenewritelock)
* [scene.sceneWriteUnlock](./scene_functions#scenewriteunlock)

### sceneTryReadLock

Try lock the scene to prevent modification while allowing reading from other threads.

```python
scene.sceneTryReadLock() -> core.Boolean
```

Returns

| Type                            | Name        | Description                           |
| ------------------------------- | ----------- | ------------------------------------- |
| [Boolean](./core_types#boolean) | sceneLocked | Returns if the scene has been locked. |

See also:

* [scene.sceneReadLock](./scene_functions#scenereadlock)
* [scene.sceneReadUnlock](./scene_functions#scenereadunlock)
* [scene.sceneWriteLock](./scene_functions#scenewritelock)
* [scene.sceneWriteUnlock](./scene_functions#scenewriteunlock)

### sceneWriteLock

Lock the scene from being read/write by other threads.

```python
scene.sceneWriteLock()
```

See also:

* [scene.sceneReadLock](./scene_functions#scenereadlock)
* [scene.sceneReadUnlock](./scene_functions#scenereadunlock)
* [scene.sceneTryReadLock](./scene_functions#scenetryreadlock)
* [scene.sceneWriteUnlock](./scene_functions#scenewriteunlock)

### sceneWriteUnlock

Unlock the scene for modification and reading.

```python
scene.sceneWriteUnlock()
```

See also:

* [scene.sceneReadLock](./scene_functions#scenereadlock)
* [scene.sceneReadUnlock](./scene_functions#scenereadunlock)
* [scene.sceneTryReadLock](./scene_functions#scenetryreadlock)
* [scene.sceneWriteLock](./scene_functions#scenewritelock)

## merging

### findPartOccurrencesWithUnstitchedOpenShells

Find Part occurrences containing multiple unstitched openShell entities.

```python
scene.findPartOccurrencesWithUnstitchedOpenShells(root) -> scene.OccurrenceList
```

Parameters

| Type                                   | Name | Description      |
| -------------------------------------- | ---- | ---------------- |
| [Occurrence](./scene_types#occurrence) | root | Root occurrence. |

Returns

| Type                                           | Name                       | Description                   |
| ---------------------------------------------- | -------------------------- | ----------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | unstitchedFacesOccurrences | Unstitched faces occurrences. |

See also:

* [scene.mergeOccurrencesByTreeLevel](./scene_functions#mergeoccurrencesbytreelevel)
* [scene.mergePartOccurrences](./scene_functions#mergepartoccurrences)
* [scene.mergePartOccurrencesByAssemblies](./scene_functions#mergepartoccurrencesbyassemblies)
* [scene.mergePartOccurrencesByFinalAssemblies](./scene_functions#mergepartoccurrencesbyfinalassemblies)
* [scene.mergePartOccurrencesByMaterials](./scene_functions#mergepartoccurrencesbymaterials)
* [scene.mergePartOccurrencesByName](./scene_functions#mergepartoccurrencesbyname)
* [scene.mergePartOccurrencesByRegions](./scene_functions#mergepartoccurrencesbyregions)
* [scene.mergePartOccurrencesWithSingleOpenShellByAssemblies](./scene_functions#mergepartoccurrenceswithsingleopenshellbyassemblies)

### mergeOccurrencesByTreeLevel

Merge all parts over maxLevel level.

```python
scene.mergeOccurrencesByTreeLevel(roots, maxLevel=5, mergeHiddenPartsMode=2)
```

Parameters

| Type                                                       | Name                 | Description                                                                 |
| ---------------------------------------------------------- | -------------------- | --------------------------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist)             | roots                | Roots occurrences for the process.                                          |
| [Int](./core_types#int)                                    | maxLevel             | Maximum tree level.                                                         |
| [MergeHiddenPartsMode](./scene_types#mergehiddenpartsmode) | mergeHiddenPartsMode | Hidden parts handling mode, Destroy them, make visible or merge separately. |

See also:

* [scene.findPartOccurrencesWithUnstitchedOpenShells](./scene_functions#findpartoccurrenceswithunstitchedopenshells)
* [scene.mergePartOccurrences](./scene_functions#mergepartoccurrences)
* [scene.mergePartOccurrencesByAssemblies](./scene_functions#mergepartoccurrencesbyassemblies)
* [scene.mergePartOccurrencesByFinalAssemblies](./scene_functions#mergepartoccurrencesbyfinalassemblies)
* [scene.mergePartOccurrencesByMaterials](./scene_functions#mergepartoccurrencesbymaterials)
* [scene.mergePartOccurrencesByName](./scene_functions#mergepartoccurrencesbyname)
* [scene.mergePartOccurrencesByRegions](./scene_functions#mergepartoccurrencesbyregions)
* [scene.mergePartOccurrencesWithSingleOpenShellByAssemblies](./scene_functions#mergepartoccurrenceswithsingleopenshellbyassemblies)

### mergePartOccurrences

Merge a set of parts.

```python
scene.mergePartOccurrences(partOccurrences, mergeHiddenPartsMode=2) -> scene.OccurrenceList
```

Parameters

| Type                                                       | Name                 | Description                                                                 |
| ---------------------------------------------------------- | -------------------- | --------------------------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist)             | partOccurrences      | Occurrence of the parts to merge.                                           |
| [MergeHiddenPartsMode](./scene_types#mergehiddenpartsmode) | mergeHiddenPartsMode | Hidden parts handling mode, Destroy them, make visible or merge separately. |

Returns

| Type                                           | Name              | Description                   |
| ---------------------------------------------- | ----------------- | ----------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | mergedOccurrences | Resulting merged occurrences. |

See also:

* [scene.findPartOccurrencesWithUnstitchedOpenShells](./scene_functions#findpartoccurrenceswithunstitchedopenshells)
* [scene.mergeOccurrencesByTreeLevel](./scene_functions#mergeoccurrencesbytreelevel)
* [scene.mergePartOccurrencesByAssemblies](./scene_functions#mergepartoccurrencesbyassemblies)
* [scene.mergePartOccurrencesByFinalAssemblies](./scene_functions#mergepartoccurrencesbyfinalassemblies)
* [scene.mergePartOccurrencesByMaterials](./scene_functions#mergepartoccurrencesbymaterials)
* [scene.mergePartOccurrencesByName](./scene_functions#mergepartoccurrencesbyname)
* [scene.mergePartOccurrencesByRegions](./scene_functions#mergepartoccurrencesbyregions)
* [scene.mergePartOccurrencesWithSingleOpenShellByAssemblies](./scene_functions#mergepartoccurrenceswithsingleopenshellbyassemblies)

### mergePartOccurrencesByAssemblies

Merge all parts under each assembly together (grouped by shape type: BRep, Tesselled surface, Joint).

```python
scene.mergePartOccurrencesByAssemblies(roots=None, mergeHiddenPartsMode=2)
```

Parameters

| Type                                                       | Name                 | Description                                                                 |
| ---------------------------------------------------------- | -------------------- | --------------------------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist)             | roots                | Roots occurrences for the process (will not be removed).                    |
| [MergeHiddenPartsMode](./scene_types#mergehiddenpartsmode) | mergeHiddenPartsMode | Hidden parts handling mode, Destroy them, make visible or merge separately. |

See also:

* [scene.findPartOccurrencesWithUnstitchedOpenShells](./scene_functions#findpartoccurrenceswithunstitchedopenshells)
* [scene.mergeOccurrencesByTreeLevel](./scene_functions#mergeoccurrencesbytreelevel)
* [scene.mergePartOccurrences](./scene_functions#mergepartoccurrences)
* [scene.mergePartOccurrencesByFinalAssemblies](./scene_functions#mergepartoccurrencesbyfinalassemblies)
* [scene.mergePartOccurrencesByMaterials](./scene_functions#mergepartoccurrencesbymaterials)
* [scene.mergePartOccurrencesByName](./scene_functions#mergepartoccurrencesbyname)
* [scene.mergePartOccurrencesByRegions](./scene_functions#mergepartoccurrencesbyregions)
* [scene.mergePartOccurrencesWithSingleOpenShellByAssemblies](./scene_functions#mergepartoccurrenceswithsingleopenshellbyassemblies)

### mergePartOccurrencesByFinalAssemblies

Merge all final-level parts (ie occurrences having for children exclusively occurrences with part components) under each assembly together (grouped by shape type: BRep, Tesselled surface, Joint).

```python
scene.mergePartOccurrencesByFinalAssemblies(roots=None, mergeHiddenPartsMode=0, CollapseToParent=True)
```

Parameters

| Type                                                       | Name                 | Description                                                                 |
| ---------------------------------------------------------- | -------------------- | --------------------------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist)             | roots                | Roots occurrences for the process (will not be removed).                    |
| [MergeHiddenPartsMode](./scene_types#mergehiddenpartsmode) | mergeHiddenPartsMode | Hidden parts handling mode, Destroy them, make visible or merge separately. |
| [Boolean](./core_types#boolean)                            | CollapseToParent     | If true, final level unique merged part will replace it's parent.           |

See also:

* [scene.findPartOccurrencesWithUnstitchedOpenShells](./scene_functions#findpartoccurrenceswithunstitchedopenshells)
* [scene.mergeOccurrencesByTreeLevel](./scene_functions#mergeoccurrencesbytreelevel)
* [scene.mergePartOccurrences](./scene_functions#mergepartoccurrences)
* [scene.mergePartOccurrencesByAssemblies](./scene_functions#mergepartoccurrencesbyassemblies)
* [scene.mergePartOccurrencesByMaterials](./scene_functions#mergepartoccurrencesbymaterials)
* [scene.mergePartOccurrencesByName](./scene_functions#mergepartoccurrencesbyname)
* [scene.mergePartOccurrencesByRegions](./scene_functions#mergepartoccurrencesbyregions)
* [scene.mergePartOccurrencesWithSingleOpenShellByAssemblies](./scene_functions#mergepartoccurrenceswithsingleopenshellbyassemblies)

### mergePartOccurrencesByMaterials

Merge a set of parts by materials.

```python
scene.mergePartOccurrencesByMaterials(partOccurrences, mergeNoMaterials=True, mergeHiddenPartsMode=2, combineMeshes=True) -> scene.OccurrenceList
```

Parameters

| Type                                                       | Name                 | Description                                                                        |
| ---------------------------------------------------------- | -------------------- | ---------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist)             | partOccurrences      | Occurrence of the parts to merge.                                                  |
| [Boolean](./core_types#boolean)                            | mergeNoMaterials     | If true, merge all parts with no active material together, else do not merge them. |
| [MergeHiddenPartsMode](./scene_types#mergehiddenpartsmode) | mergeHiddenPartsMode | Hidden parts handling mode, Destroy them, make visible or merge separately.        |
| [Boolean](./core_types#boolean)                            | combineMeshes        | If true, explode and remerge the input parts by visible materials.                 |

Returns

| Type                                           | Name              | Description                   |
| ---------------------------------------------- | ----------------- | ----------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | mergedOccurrences | Resulting merged occurrences. |

See also:

* [scene.findPartOccurrencesWithUnstitchedOpenShells](./scene_functions#findpartoccurrenceswithunstitchedopenshells)
* [scene.mergeOccurrencesByTreeLevel](./scene_functions#mergeoccurrencesbytreelevel)
* [scene.mergePartOccurrences](./scene_functions#mergepartoccurrences)
* [scene.mergePartOccurrencesByAssemblies](./scene_functions#mergepartoccurrencesbyassemblies)
* [scene.mergePartOccurrencesByFinalAssemblies](./scene_functions#mergepartoccurrencesbyfinalassemblies)
* [scene.mergePartOccurrencesByName](./scene_functions#mergepartoccurrencesbyname)
* [scene.mergePartOccurrencesByRegions](./scene_functions#mergepartoccurrencesbyregions)
* [scene.mergePartOccurrencesWithSingleOpenShellByAssemblies](./scene_functions#mergepartoccurrenceswithsingleopenshellbyassemblies)

### mergePartOccurrencesByName

Merge all parts by occurrences names.

```python
scene.mergePartOccurrencesByName(root=0, mergeHiddenPartsMode=2)
```

Parameters

| Type                                                       | Name                 | Description                                                                 |
| ---------------------------------------------------------- | -------------------- | --------------------------------------------------------------------------- |
| [Occurrence](./scene_types#occurrence)                     | root                 | Root occurrence of the subtree to process.                                  |
| [MergeHiddenPartsMode](./scene_types#mergehiddenpartsmode) | mergeHiddenPartsMode | Hidden parts handling mode, Destroy them, make visible or merge separately. |

See also:

* [scene.findPartOccurrencesWithUnstitchedOpenShells](./scene_functions#findpartoccurrenceswithunstitchedopenshells)
* [scene.mergeOccurrencesByTreeLevel](./scene_functions#mergeoccurrencesbytreelevel)
* [scene.mergePartOccurrences](./scene_functions#mergepartoccurrences)
* [scene.mergePartOccurrencesByAssemblies](./scene_functions#mergepartoccurrencesbyassemblies)
* [scene.mergePartOccurrencesByFinalAssemblies](./scene_functions#mergepartoccurrencesbyfinalassemblies)
* [scene.mergePartOccurrencesByMaterials](./scene_functions#mergepartoccurrencesbymaterials)
* [scene.mergePartOccurrencesByRegions](./scene_functions#mergepartoccurrencesbyregions)
* [scene.mergePartOccurrencesWithSingleOpenShellByAssemblies](./scene_functions#mergepartoccurrenceswithsingleopenshellbyassemblies)

### mergePartOccurrencesByRegions

Merge all parts within the same area.

```python
scene.mergePartOccurrencesByRegions(roots, mergeBy, strategy) -> scene.OccurrenceList
```

Parameters

| Type                                                           | Name     | Description                                              |
| -------------------------------------------------------------- | -------- | -------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist)                 | roots    | Roots occurrences for the process (will not be removed). |
| [MergeByRegionsStrategy](./scene_types#mergebyregionsstrategy) | mergeBy  | Number: number of output parts (or regions of parts)     |
|                                                                |          |                                                          |
| [MergeStrategy](./scene_types#mergestrategy)                   | strategy | Choose the regions merging strategy.                     |

Returns

| Type                                           | Name              | Description                   |
| ---------------------------------------------- | ----------------- | ----------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | mergedOccurrences | Resulting merged occurrences. |

See also:

* [scene.findPartOccurrencesWithUnstitchedOpenShells](./scene_functions#findpartoccurrenceswithunstitchedopenshells)
* [scene.mergeOccurrencesByTreeLevel](./scene_functions#mergeoccurrencesbytreelevel)
* [scene.mergePartOccurrences](./scene_functions#mergepartoccurrences)
* [scene.mergePartOccurrencesByAssemblies](./scene_functions#mergepartoccurrencesbyassemblies)
* [scene.mergePartOccurrencesByFinalAssemblies](./scene_functions#mergepartoccurrencesbyfinalassemblies)
* [scene.mergePartOccurrencesByMaterials](./scene_functions#mergepartoccurrencesbymaterials)
* [scene.mergePartOccurrencesByName](./scene_functions#mergepartoccurrencesbyname)
* [scene.mergePartOccurrencesWithSingleOpenShellByAssemblies](./scene_functions#mergepartoccurrenceswithsingleopenshellbyassemblies)

### mergePartOccurrencesWithSingleOpenShellByAssemblies

Merge Part occurrences containing a single openShell entity, by assemblies.

```python
scene.mergePartOccurrencesWithSingleOpenShellByAssemblies(root) -> scene.OccurrenceList
```

Parameters

| Type                                   | Name | Description                         |
| -------------------------------------- | ---- | ----------------------------------- |
| [Occurrence](./scene_types#occurrence) | root | Root of the main assembly to merge. |

Returns

| Type                                           | Name              | Description                                                  |
| ---------------------------------------------- | ----------------- | ------------------------------------------------------------ |
| [OccurrenceList](./scene_types#occurrencelist) | mergedOccurrences | List of the merged occurrence that contained only openShell. |

See also:

* [scene.findPartOccurrencesWithUnstitchedOpenShells](./scene_functions#findpartoccurrenceswithunstitchedopenshells)
* [scene.mergeOccurrencesByTreeLevel](./scene_functions#mergeoccurrencesbytreelevel)
* [scene.mergePartOccurrences](./scene_functions#mergepartoccurrences)
* [scene.mergePartOccurrencesByAssemblies](./scene_functions#mergepartoccurrencesbyassemblies)
* [scene.mergePartOccurrencesByFinalAssemblies](./scene_functions#mergepartoccurrencesbyfinalassemblies)
* [scene.mergePartOccurrencesByMaterials](./scene_functions#mergepartoccurrencesbymaterials)
* [scene.mergePartOccurrencesByName](./scene_functions#mergepartoccurrencesbyname)
* [scene.mergePartOccurrencesByRegions](./scene_functions#mergepartoccurrencesbyregions)

## modification

### applyTransformation

Apply a transformation to the local matrix of an occurrence.

```python
scene.applyTransformation(occurrence, matrix)
```

Parameters

| Type                                   | Name       | Description                        |
| -------------------------------------- | ---------- | ---------------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | Occurrence to apply the matrix on. |
| [Matrix4](./geom_types#matrix4)        | matrix     | Transformation to matrix.          |

See also:

* [scene.createSymmetry](./scene_functions#createsymmetry)
* [scene.rotate](./scene_functions#rotate)
* [scene.setLocalMatrices](./scene_functions#setlocalmatrices)
* [scene.setLocalMatrix](./scene_functions#setlocalmatrix)

### createSymmetry

Create symmetries from selection.

```python
scene.createSymmetry(occurrences, plane)
```

Parameters

| Type                                           | Name        | Description               |
| ---------------------------------------------- | ----------- | ------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | Selection of occurrences. |
| [AxisPlane](./geom_types#axisplane)            | plane       | Symmetry plane.           |

See also:

* [scene.applyTransformation](./scene_functions#applytransformation)
* [scene.rotate](./scene_functions#rotate)
* [scene.setLocalMatrices](./scene_functions#setlocalmatrices)
* [scene.setLocalMatrix](./scene_functions#setlocalmatrix)

### rotate

Modify the local matrix of the scene node to apply a rotation.

```python
scene.rotate(occurrence, axis, angle)
```

Parameters

| Type                                   | Name       | Description           |
| -------------------------------------- | ---------- | --------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | Occurrence to rotate. |
| [Vector3](./geom_types#vector3)        | axis       | Axis of rotation.     |
| [Angle](./geom_types#angle)            | angle      | Angle of rotation.    |

See also:

* [scene.applyTransformation](./scene_functions#applytransformation)
* [scene.createSymmetry](./scene_functions#createsymmetry)
* [scene.setLocalMatrices](./scene_functions#setlocalmatrices)
* [scene.setLocalMatrix](./scene_functions#setlocalmatrix)

### setLocalMatrices

Change the local matrices on a list of occurrences.

```python
scene.setLocalMatrices(occurrencesIds, matrices, batchSize)
```

Parameters

| Type                                           | Name           | Description                                             |
| ---------------------------------------------- | -------------- | ------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrencesIds | List of occurrences on which to set the local matrices. |
| [Matrix4List](./geom_types#matrix4list)        | matrices       | The occurrences' new local matrices.                    |
| [UInt](./core_types#uint)                      | batchSize      | Number of matrices to be set per thread.                |

See also:

* [scene.applyTransformation](./scene_functions#applytransformation)
* [scene.createSymmetry](./scene_functions#createsymmetry)
* [scene.rotate](./scene_functions#rotate)
* [scene.setLocalMatrix](./scene_functions#setlocalmatrix)

### setLocalMatrix

Change the local matrix on an occurrence.

```python
scene.setLocalMatrix(occurrence, matrix)
```

Parameters

| Type                                   | Name       | Description                         |
| -------------------------------------- | ---------- | ----------------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | Occurrence to set the local matrix. |
| [Matrix4](./geom_types#matrix4)        | matrix     | The new occurrence local matrix.    |

See also:

* [scene.applyTransformation](./scene_functions#applytransformation)
* [scene.createSymmetry](./scene_functions#createsymmetry)
* [scene.rotate](./scene_functions#rotate)
* [scene.setLocalMatrices](./scene_functions#setlocalmatrices)

## part

### getPartMesh

Return the mesh of the TesselatedShape.

```python
scene.getPartMesh(part) -> polygonal.Mesh
```

Parameters

| Type                       | Name | Description         |
| -------------------------- | ---- | ------------------- |
| [Part](./scene_types#part) | part | The part component. |

Returns

| Type                           | Name | Description                                    |
| ------------------------------ | ---- | ---------------------------------------------- |
| [Mesh](./polygonal_types#mesh) | mesh | The mesh of the tessellated shape of the part. |

See also:

* [scene.getPartModel](./scene_functions#getpartmodel)
* [scene.getPartsMeshes](./scene_functions#getpartsmeshes)
* [scene.getPartsModels](./scene_functions#getpartsmodels)
* [scene.getPartsTransforms](./scene_functions#getpartstransforms)
* [scene.getPartsTransformsIndexed](./scene_functions#getpartstransformsindexed)
* [scene.setPartMesh](./scene_functions#setpartmesh)
* [scene.setPartModel](./scene_functions#setpartmodel)
* [scene.setPartsTransforms](./scene_functions#setpartstransforms)
* [scene.setPartsTransformsIndexed](./scene_functions#setpartstransformsindexed)

### getPartModel

Return the model of the BRepShape.

```python
scene.getPartModel(part) -> cad.Model
```

Parameters

| Type                       | Name | Description         |
| -------------------------- | ---- | ------------------- |
| [Part](./scene_types#part) | part | The part component. |

Returns

| Type                       | Name  | Description                              |
| -------------------------- | ----- | ---------------------------------------- |
| [Model](./cad_types#model) | model | The model of the BRep shape of the part. |

See also:

* [scene.getPartMesh](./scene_functions#getpartmesh)
* [scene.getPartsMeshes](./scene_functions#getpartsmeshes)
* [scene.getPartsModels](./scene_functions#getpartsmodels)
* [scene.getPartsTransforms](./scene_functions#getpartstransforms)
* [scene.getPartsTransformsIndexed](./scene_functions#getpartstransformsindexed)
* [scene.setPartMesh](./scene_functions#setpartmesh)
* [scene.setPartModel](./scene_functions#setpartmodel)
* [scene.setPartsTransforms](./scene_functions#setpartstransforms)
* [scene.setPartsTransformsIndexed](./scene_functions#setpartstransformsindexed)

### getPartsMeshes

Return the meshes of the TesselatedShape for each given parts if any.

```python
scene.getPartsMeshes(parts) -> polygonal.MeshList
```

Parameters

| Type                               | Name  | Description                 |
| ---------------------------------- | ----- | --------------------------- |
| [PartList](./scene_types#partlist) | parts | The list of part component. |

Returns

| Type                                   | Name   | Description                                             |
| -------------------------------------- | ------ | ------------------------------------------------------- |
| [MeshList](./polygonal_types#meshlist) | meshes | The list of mesh of the tessellated shape of each part. |

See also:

* [scene.getPartMesh](./scene_functions#getpartmesh)
* [scene.getPartModel](./scene_functions#getpartmodel)
* [scene.getPartsModels](./scene_functions#getpartsmodels)
* [scene.getPartsTransforms](./scene_functions#getpartstransforms)
* [scene.getPartsTransformsIndexed](./scene_functions#getpartstransformsindexed)
* [scene.setPartMesh](./scene_functions#setpartmesh)
* [scene.setPartModel](./scene_functions#setpartmodel)
* [scene.setPartsTransforms](./scene_functions#setpartstransforms)
* [scene.setPartsTransformsIndexed](./scene_functions#setpartstransformsindexed)

### getPartsModels

Return the models of the BRepShape for each given parts if any.

```python
scene.getPartsModels(parts) -> cad.ModelList
```

Parameters

| Type                               | Name  | Description                 |
| ---------------------------------- | ----- | --------------------------- |
| [PartList](./scene_types#partlist) | parts | The list of part component. |

Returns

| Type                               | Name   | Description                                        |
| ---------------------------------- | ------ | -------------------------------------------------- |
| [ModelList](./cad_types#modellist) | models | The list of models of the BRep shape of each part. |

See also:

* [scene.getPartMesh](./scene_functions#getpartmesh)
* [scene.getPartModel](./scene_functions#getpartmodel)
* [scene.getPartsMeshes](./scene_functions#getpartsmeshes)
* [scene.getPartsTransforms](./scene_functions#getpartstransforms)
* [scene.getPartsTransformsIndexed](./scene_functions#getpartstransformsindexed)
* [scene.setPartMesh](./scene_functions#setpartmesh)
* [scene.setPartModel](./scene_functions#setpartmodel)
* [scene.setPartsTransforms](./scene_functions#setpartstransforms)
* [scene.setPartsTransformsIndexed](./scene_functions#setpartstransformsindexed)

### getPartsTransforms

Returns the transform matrix of each given parts.

```python
scene.getPartsTransforms(parts) -> geom.Matrix4List
```

Parameters

| Type                               | Name  | Description                      |
| ---------------------------------- | ----- | -------------------------------- |
| [PartList](./scene_types#partlist) | parts | The parts to retrieve transform. |

Returns

| Type                                    | Name       | Description                        |
| --------------------------------------- | ---------- | ---------------------------------- |
| [Matrix4List](./geom_types#matrix4list) | transforms | The transform matrix of each part. |

See also:

* [scene.getPartMesh](./scene_functions#getpartmesh)
* [scene.getPartModel](./scene_functions#getpartmodel)
* [scene.getPartsMeshes](./scene_functions#getpartsmeshes)
* [scene.getPartsModels](./scene_functions#getpartsmodels)
* [scene.getPartsTransformsIndexed](./scene_functions#getpartstransformsindexed)
* [scene.setPartMesh](./scene_functions#setpartmesh)
* [scene.setPartModel](./scene_functions#setpartmodel)
* [scene.setPartsTransforms](./scene_functions#setpartstransforms)
* [scene.setPartsTransformsIndexed](./scene_functions#setpartstransformsindexed)

### getPartsTransformsIndexed

Returns the transform matrix of each given parts (indexed mode).

```python
scene.getPartsTransformsIndexed(parts) -> core.IntList, geom.Matrix4List
```

Parameters

| Type                               | Name  | Description                      |
| ---------------------------------- | ----- | -------------------------------- |
| [PartList](./scene_types#partlist) | parts | The parts to retrieve transform. |

Returns

| Type                                    | Name       | Description                                                    |
| --------------------------------------- | ---------- | -------------------------------------------------------------- |
| [IntList](./core_types#intlist)         | indices    | The transform matrix index for each parts (0 for Identity).    |
| [Matrix4List](./geom_types#matrix4list) | transforms | The list of transform matrices (the first is always Identity). |

See also:

* [scene.getPartMesh](./scene_functions#getpartmesh)
* [scene.getPartModel](./scene_functions#getpartmodel)
* [scene.getPartsMeshes](./scene_functions#getpartsmeshes)
* [scene.getPartsModels](./scene_functions#getpartsmodels)
* [scene.getPartsTransforms](./scene_functions#getpartstransforms)
* [scene.setPartMesh](./scene_functions#setpartmesh)
* [scene.setPartModel](./scene_functions#setpartmodel)
* [scene.setPartsTransforms](./scene_functions#setpartstransforms)
* [scene.setPartsTransformsIndexed](./scene_functions#setpartstransformsindexed)

### setPartMesh

Add a mesh to a part (create a TessellatedShape on the part).

```python
scene.setPartMesh(part, mesh)
```

Parameters

| Type                           | Name | Description                  |
| ------------------------------ | ---- | ---------------------------- |
| [Part](./scene_types#part)     | part | The part component.          |
| [Mesh](./polygonal_types#mesh) | mesh | The mesh to add to the part. |

See also:

* [scene.getPartMesh](./scene_functions#getpartmesh)
* [scene.getPartModel](./scene_functions#getpartmodel)
* [scene.getPartsMeshes](./scene_functions#getpartsmeshes)
* [scene.getPartsModels](./scene_functions#getpartsmodels)
* [scene.getPartsTransforms](./scene_functions#getpartstransforms)
* [scene.getPartsTransformsIndexed](./scene_functions#getpartstransformsindexed)
* [scene.setPartModel](./scene_functions#setpartmodel)
* [scene.setPartsTransforms](./scene_functions#setpartstransforms)
* [scene.setPartsTransformsIndexed](./scene_functions#setpartstransformsindexed)

### setPartModel

Add a model to a part (create a BRepShape on the part).

```python
scene.setPartModel(part, model)
```

Parameters

| Type                       | Name  | Description                   |
| -------------------------- | ----- | ----------------------------- |
| [Part](./scene_types#part) | part  | The part component.           |
| [Model](./cad_types#model) | model | The model to add to the part. |

See also:

* [scene.getPartMesh](./scene_functions#getpartmesh)
* [scene.getPartModel](./scene_functions#getpartmodel)
* [scene.getPartsMeshes](./scene_functions#getpartsmeshes)
* [scene.getPartsModels](./scene_functions#getpartsmodels)
* [scene.getPartsTransforms](./scene_functions#getpartstransforms)
* [scene.getPartsTransformsIndexed](./scene_functions#getpartstransformsindexed)
* [scene.setPartMesh](./scene_functions#setpartmesh)
* [scene.setPartsTransforms](./scene_functions#setpartstransforms)
* [scene.setPartsTransformsIndexed](./scene_functions#setpartstransformsindexed)

### setPartsTransforms

Set the transform matrix of each given parts.

```python
scene.setPartsTransforms(parts, transforms)
```

Parameters

| Type                                    | Name       | Description                        |
| --------------------------------------- | ---------- | ---------------------------------- |
| [PartList](./scene_types#partlist)      | parts      | The parts to retrieve transform.   |
| [Matrix4List](./geom_types#matrix4list) | transforms | The transform matrix of each part. |

See also:

* [scene.getPartMesh](./scene_functions#getpartmesh)
* [scene.getPartModel](./scene_functions#getpartmodel)
* [scene.getPartsMeshes](./scene_functions#getpartsmeshes)
* [scene.getPartsModels](./scene_functions#getpartsmodels)
* [scene.getPartsTransforms](./scene_functions#getpartstransforms)
* [scene.getPartsTransformsIndexed](./scene_functions#getpartstransformsindexed)
* [scene.setPartMesh](./scene_functions#setpartmesh)
* [scene.setPartModel](./scene_functions#setpartmodel)
* [scene.setPartsTransformsIndexed](./scene_functions#setpartstransformsindexed)

### setPartsTransformsIndexed

Set the transform matrix of each given parts (indexed mode).

```python
scene.setPartsTransformsIndexed(parts, indices, transforms)
```

Parameters

| Type                                    | Name       | Description                                |
| --------------------------------------- | ---------- | ------------------------------------------ |
| [PartList](./scene_types#partlist)      | parts      | The parts to retrieve transform.           |
| [IntList](./core_types#intlist)         | indices    | The transform matrix index for each parts. |
| [Matrix4List](./geom_types#matrix4list) | transforms | The list of transform matrices.            |

See also:

* [scene.getPartMesh](./scene_functions#getpartmesh)
* [scene.getPartModel](./scene_functions#getpartmodel)
* [scene.getPartsMeshes](./scene_functions#getpartsmeshes)
* [scene.getPartsModels](./scene_functions#getpartsmodels)
* [scene.getPartsTransforms](./scene_functions#getpartstransforms)
* [scene.getPartsTransformsIndexed](./scene_functions#getpartstransformsindexed)
* [scene.setPartMesh](./scene_functions#setpartmesh)
* [scene.setPartModel](./scene_functions#setpartmodel)
* [scene.setPartsTransforms](./scene_functions#setpartstransforms)

## partialLoading

### getPartialLoadingStatus

Get the current status of a partial loading component.

```python
scene.getPartialLoadingStatus(component) -> scene.PartialLoad_Status
```

Parameters

| Type                                                             | Name      | Description                |
| ---------------------------------------------------------------- | --------- | -------------------------- |
| [ReferencedDataComponent](./scene_types#referenceddatacomponent) | component | Referenced Data component. |

Returns

| Type                                                    | Name   | Description         |
| ------------------------------------------------------- | ------ | ------------------- |
| [PartialLoad\_Status](./scene_types#partialload_status) | status | The current status. |

See also:

* [scene.setReferencedDataComponentParent](./scene_functions#setreferenceddatacomponentparent)
* [scene.setReferencedDataComponentPath](./scene_functions#setreferenceddatacomponentpath)

### setReferencedDataComponentParent

Defines which referenced data is parent to the given component.

```python
scene.setReferencedDataComponentParent(component, parent)
```

Parameters

| Type                                                             | Name      | Description                             |
| ---------------------------------------------------------------- | --------- | --------------------------------------- |
| [ReferencedDataComponent](./scene_types#referenceddatacomponent) | component | The referenced data component to alter. |
| [ReferencedDataComponent](./scene_types#referenceddatacomponent) | parent    | The parent.                             |

See also:

* [scene.getPartialLoadingStatus](./scene_functions#getpartialloadingstatus)
* [scene.setReferencedDataComponentPath](./scene_functions#setreferenceddatacomponentpath)

### setReferencedDataComponentPath

Defines which path the referenced data is at.

```python
scene.setReferencedDataComponentPath(component, filePath)
```

Parameters

| Type                                                             | Name      | Description                             |
| ---------------------------------------------------------------- | --------- | --------------------------------------- |
| [ReferencedDataComponent](./scene_types#referenceddatacomponent) | component | The referenced data component to alter. |
| [String](./core_types#string)                                    | filePath  | The filepath.                           |

See also:

* [scene.getPartialLoadingStatus](./scene_functions#getpartialloadingstatus)
* [scene.setReferencedDataComponentParent](./scene_functions#setreferenceddatacomponentparent)

## pivots

### alignPivotPointToWorld

Re-orient the Pivot Point straight to world origin (the grid).

```python
scene.alignPivotPointToWorld(occurrences, applyToChildren=False)
```

Parameters

| Type                                           | Name            | Description                                                                            |
| ---------------------------------------------- | --------------- | -------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences     | The occurrences to modify.                                                             |
| [Bool](./core_types#bool)                      | applyToChildren | If True, all the pivot of the descending occurrences from occurrence will be affected. |

See also:

* [scene.movePivotPointToOccurrenceCenter](./scene_functions#movepivotpointtooccurrencecenter)
* [scene.movePivotPointToOrigin](./scene_functions#movepivotpointtoorigin)
* [scene.movePivotPointToSelectionCenter](./scene_functions#movepivotpointtoselectioncenter)
* [scene.movePivotPointToTargetedOccurrenceCenter](./scene_functions#movepivotpointtotargetedoccurrencecenter)
* [scene.setPivotOnly](./scene_functions#setpivotonly)

### movePivotPointToOccurrenceCenter

Move the pivot point of each occurrence listed in the function input, to the center of its bounding box (and of its children if the parameter is True).

```python
scene.movePivotPointToOccurrenceCenter(occurrences, applyToChildren=False)
```

Parameters

| Type                                           | Name            | Description                                                                            |
| ---------------------------------------------- | --------------- | -------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences     | Occurrences (or the roots occurrences if recursively=True).                            |
| [Bool](./core_types#bool)                      | applyToChildren | If True, all the pivot of the descending occurrences from occurrence will be affected. |

See also:

* [scene.alignPivotPointToWorld](./scene_functions#alignpivotpointtoworld)
* [scene.movePivotPointToOrigin](./scene_functions#movepivotpointtoorigin)
* [scene.movePivotPointToSelectionCenter](./scene_functions#movepivotpointtoselectioncenter)
* [scene.movePivotPointToTargetedOccurrenceCenter](./scene_functions#movepivotpointtotargetedoccurrencecenter)
* [scene.setPivotOnly](./scene_functions#setpivotonly)

### movePivotPointToOrigin

Move the pivot point of an occurrence (and its descendants if recursively) to the origin (0,0,0).

```python
scene.movePivotPointToOrigin(occurrence, applyToChildren=False)
```

Parameters

| Type                                   | Name            | Description                                                                            |
| -------------------------------------- | --------------- | -------------------------------------------------------------------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence      | The occurrence (or the root occurrence if recursively=True).                           |
| [Bool](./core_types#bool)              | applyToChildren | If True, all the pivot of the descending occurrences from occurrence will be affected. |

See also:

* [scene.alignPivotPointToWorld](./scene_functions#alignpivotpointtoworld)
* [scene.movePivotPointToOccurrenceCenter](./scene_functions#movepivotpointtooccurrencecenter)
* [scene.movePivotPointToSelectionCenter](./scene_functions#movepivotpointtoselectioncenter)
* [scene.movePivotPointToTargetedOccurrenceCenter](./scene_functions#movepivotpointtotargetedoccurrencecenter)
* [scene.setPivotOnly](./scene_functions#setpivotonly)

### movePivotPointToSelectionCenter

Move the pivot point of all given occurrences to the center of all occurrences.

```python
scene.movePivotPointToSelectionCenter(occurrences)
```

Parameters

| Type                                           | Name        | Description                |
| ---------------------------------------------- | ----------- | -------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | The occurrences to modify. |

See also:

* [scene.alignPivotPointToWorld](./scene_functions#alignpivotpointtoworld)
* [scene.movePivotPointToOccurrenceCenter](./scene_functions#movepivotpointtooccurrencecenter)
* [scene.movePivotPointToOrigin](./scene_functions#movepivotpointtoorigin)
* [scene.movePivotPointToTargetedOccurrenceCenter](./scene_functions#movepivotpointtotargetedoccurrencecenter)
* [scene.setPivotOnly](./scene_functions#setpivotonly)

### movePivotPointToTargetedOccurrenceCenter

Move the pivot point of each occurrence listed in the function input, to the center of the targeted occurrence Center (and of its children if the parameter is True).

```python
scene.movePivotPointToTargetedOccurrenceCenter(occurrences, target, applyToChildren=False)
```

Parameters

| Type                                           | Name            | Description                                                                            |
| ---------------------------------------------- | --------------- | -------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences     | The occurrence (or the root occurrence if recursively=True).                           |
| [Occurrence](./scene_types#occurrence)         | target          | The target occurrence.                                                                 |
| [Bool](./core_types#bool)                      | applyToChildren | If True, all the pivot of the descending occurrences from occurrence will be affected. |

See also:

* [scene.alignPivotPointToWorld](./scene_functions#alignpivotpointtoworld)
* [scene.movePivotPointToOccurrenceCenter](./scene_functions#movepivotpointtooccurrencecenter)
* [scene.movePivotPointToOrigin](./scene_functions#movepivotpointtoorigin)
* [scene.movePivotPointToSelectionCenter](./scene_functions#movepivotpointtoselectioncenter)
* [scene.setPivotOnly](./scene_functions#setpivotonly)

### setPivotOnly

Set the pivot of an occurrence to the given transformation matrix, the geometry will not be moved (warning: do not confuse with property Transform which actually move the occurrence).

```python
scene.setPivotOnly(occurrence, pivot)
```

Parameters

| Type                                   | Name       | Description                                               |
| -------------------------------------- | ---------- | --------------------------------------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence to move the pivot.                         |
| [Matrix4](./geom_types#matrix4)        | pivot      | The new transformation matrix for the occurrence (pivot). |

See also:

* [scene.alignPivotPointToWorld](./scene_functions#alignpivotpointtoworld)
* [scene.movePivotPointToOccurrenceCenter](./scene_functions#movepivotpointtooccurrencecenter)
* [scene.movePivotPointToOrigin](./scene_functions#movepivotpointtoorigin)
* [scene.movePivotPointToSelectionCenter](./scene_functions#movepivotpointtoselectioncenter)
* [scene.movePivotPointToTargetedOccurrenceCenter](./scene_functions#movepivotpointtotargetedoccurrencecenter)

## pmi

### addAnnotationGroup

Add a Annotation Group to the pmi component.

```python
scene.addAnnotationGroup(component, name) -> scene.AnnotationGroup
```

Parameters

| Type                                       | Name      | Description                            |
| ------------------------------------------ | --------- | -------------------------------------- |
| [PMIComponent](./scene_types#pmicomponent) | component | Component to add the Annotation Group. |
| [String](./core_types#string)              | name      | Name of the annotation group.          |

Returns

| Type                                             | Name  | Description               |
| ------------------------------------------------ | ----- | ------------------------- |
| [AnnotationGroup](./scene_types#annotationgroup) | group | Annotation group created. |

See also:

* [scene.addAnnotationToProductView](./scene_functions#addannotationtoproductview)
* [scene.addMeshToAnnotation](./scene_functions#addmeshtoannotation)
* [scene.convertPMIToOccurrences](./scene_functions#convertpmitooccurrences)
* [scene.createAnnotationFromDefinition](./scene_functions#createannotationfromdefinition)
* [scene.createOccurrenceFromAnnotation](./scene_functions#createoccurrencefromannotation)
* [scene.createProductView](./scene_functions#createproductview)
* [scene.getAnnotationDefinition](./scene_functions#getannotationdefinition)
* [scene.getAnnotationGroups](./scene_functions#getannotationgroups)
* [scene.getAnnotationListAABB](./scene_functions#getannotationlistaabb)
* [scene.getAnnotations](./scene_functions#getannotations)
* [scene.getOccurrenceAnnotationDefinitions](./scene_functions#getoccurrenceannotationdefinitions)
* [scene.getProductViewDefinition](./scene_functions#getproductviewdefinition)
* [scene.getProductViewDefinitions](./scene_functions#getproductviewdefinitions)
* [scene.setAnnotationToGroup](./scene_functions#setannotationtogroup)

### addAnnotationToProductView

Add an annotation to a product view.

```python
scene.addAnnotationToProductView(productView, annotation)
```

Parameters

| Type                                     | Name        | Description |
| ---------------------------------------- | ----------- | ----------- |
| [ProductView](./scene_types#productview) | productView |             |
| [Annotation](./scene_types#annotation)   | annotation  |             |

See also:

* [scene.addAnnotationGroup](./scene_functions#addannotationgroup)
* [scene.addMeshToAnnotation](./scene_functions#addmeshtoannotation)
* [scene.convertPMIToOccurrences](./scene_functions#convertpmitooccurrences)
* [scene.createAnnotationFromDefinition](./scene_functions#createannotationfromdefinition)
* [scene.createOccurrenceFromAnnotation](./scene_functions#createoccurrencefromannotation)
* [scene.createProductView](./scene_functions#createproductview)
* [scene.getAnnotationDefinition](./scene_functions#getannotationdefinition)
* [scene.getAnnotationGroups](./scene_functions#getannotationgroups)
* [scene.getAnnotationListAABB](./scene_functions#getannotationlistaabb)
* [scene.getAnnotations](./scene_functions#getannotations)
* [scene.getOccurrenceAnnotationDefinitions](./scene_functions#getoccurrenceannotationdefinitions)
* [scene.getProductViewDefinition](./scene_functions#getproductviewdefinition)
* [scene.getProductViewDefinitions](./scene_functions#getproductviewdefinitions)
* [scene.setAnnotationToGroup](./scene_functions#setannotationtogroup)

### addMeshToAnnotation

Add a mesh and its material to a annotation.

```python
scene.addMeshToAnnotation(annotation, material, staticmesh)
```

Parameters

| Type                                       | Name       | Description |
| ------------------------------------------ | ---------- | ----------- |
| [Annotation](./scene_types#annotation)     | annotation |             |
| [Material](./material_types#material)      | material   |             |
| [StaticMesh](./polygonal_types#staticmesh) | staticmesh |             |

See also:

* [scene.addAnnotationGroup](./scene_functions#addannotationgroup)
* [scene.addAnnotationToProductView](./scene_functions#addannotationtoproductview)
* [scene.convertPMIToOccurrences](./scene_functions#convertpmitooccurrences)
* [scene.createAnnotationFromDefinition](./scene_functions#createannotationfromdefinition)
* [scene.createOccurrenceFromAnnotation](./scene_functions#createoccurrencefromannotation)
* [scene.createProductView](./scene_functions#createproductview)
* [scene.getAnnotationDefinition](./scene_functions#getannotationdefinition)
* [scene.getAnnotationGroups](./scene_functions#getannotationgroups)
* [scene.getAnnotationListAABB](./scene_functions#getannotationlistaabb)
* [scene.getAnnotations](./scene_functions#getannotations)
* [scene.getOccurrenceAnnotationDefinitions](./scene_functions#getoccurrenceannotationdefinitions)
* [scene.getProductViewDefinition](./scene_functions#getproductviewdefinition)
* [scene.getProductViewDefinitions](./scene_functions#getproductviewdefinitions)
* [scene.setAnnotationToGroup](./scene_functions#setannotationtogroup)

### convertPMIToOccurrences

Convert each PMI component into a set of occurrences with mesh geometries.

```python
scene.convertPMIToOccurrences(occurrences, convertVisibility=False)
```

Parameters

| Type                                           | Name              | Description                                                                                                                 |
| ---------------------------------------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences       | Occurrence selection.                                                                                                       |
| [Boolean](./core_types#boolean)                | convertVisibility | If True, the visibility will be converted (useful to select a specific view/variant), else all occurrences will be visible. |

See also:

* [scene.addAnnotationGroup](./scene_functions#addannotationgroup)
* [scene.addAnnotationToProductView](./scene_functions#addannotationtoproductview)
* [scene.addMeshToAnnotation](./scene_functions#addmeshtoannotation)
* [scene.createAnnotationFromDefinition](./scene_functions#createannotationfromdefinition)
* [scene.createOccurrenceFromAnnotation](./scene_functions#createoccurrencefromannotation)
* [scene.createProductView](./scene_functions#createproductview)
* [scene.getAnnotationDefinition](./scene_functions#getannotationdefinition)
* [scene.getAnnotationGroups](./scene_functions#getannotationgroups)
* [scene.getAnnotationListAABB](./scene_functions#getannotationlistaabb)
* [scene.getAnnotations](./scene_functions#getannotations)
* [scene.getOccurrenceAnnotationDefinitions](./scene_functions#getoccurrenceannotationdefinitions)
* [scene.getProductViewDefinition](./scene_functions#getproductviewdefinition)
* [scene.getProductViewDefinitions](./scene_functions#getproductviewdefinitions)
* [scene.setAnnotationToGroup](./scene_functions#setannotationtogroup)

### createAnnotationFromDefinition

Create Annotation from definition.

```python
scene.createAnnotationFromDefinition(definition) -> scene.Annotation
```

Parameters

| Type                                                       | Name       | Description            |
| ---------------------------------------------------------- | ---------- | ---------------------- |
| [AnnotationDefinition](./scene_types#annotationdefinition) | definition | Annotation definition. |

Returns

| Type                                   | Name     | Description                         |
| -------------------------------------- | -------- | ----------------------------------- |
| [Annotation](./scene_types#annotation) | metadata | Annotation created from definition. |

See also:

* [scene.addAnnotationGroup](./scene_functions#addannotationgroup)
* [scene.addAnnotationToProductView](./scene_functions#addannotationtoproductview)
* [scene.addMeshToAnnotation](./scene_functions#addmeshtoannotation)
* [scene.convertPMIToOccurrences](./scene_functions#convertpmitooccurrences)
* [scene.createOccurrenceFromAnnotation](./scene_functions#createoccurrencefromannotation)
* [scene.createProductView](./scene_functions#createproductview)
* [scene.getAnnotationDefinition](./scene_functions#getannotationdefinition)
* [scene.getAnnotationGroups](./scene_functions#getannotationgroups)
* [scene.getAnnotationListAABB](./scene_functions#getannotationlistaabb)
* [scene.getAnnotations](./scene_functions#getannotations)
* [scene.getOccurrenceAnnotationDefinitions](./scene_functions#getoccurrenceannotationdefinitions)
* [scene.getProductViewDefinition](./scene_functions#getproductviewdefinition)
* [scene.getProductViewDefinitions](./scene_functions#getproductviewdefinitions)
* [scene.setAnnotationToGroup](./scene_functions#setannotationtogroup)

### createOccurrenceFromAnnotation

Convert a single annotation on an occurrence into an occurrence with mesh geometry.

```python
scene.createOccurrenceFromAnnotation(annotation, convertVisibility=False) -> scene.Occurrence
```

Parameters

| Type                                   | Name              | Description                                                                                                                 |
| -------------------------------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------- |
| [Annotation](./scene_types#annotation) | annotation        | Annotation that shall be converted to an occurrence with mesh geometry.                                                     |
| [Boolean](./core_types#boolean)        | convertVisibility | If True, the visibility will be converted (useful to select a specific view/variant), else all occurrences will be visible. |

Returns

| Type                                   | Name          | Description                                  |
| -------------------------------------- | ------------- | -------------------------------------------- |
| [Occurrence](./scene_types#occurrence) | newOccurrence | Annotation as occurrence with mesh geometry. |

See also:

* [scene.addAnnotationGroup](./scene_functions#addannotationgroup)
* [scene.addAnnotationToProductView](./scene_functions#addannotationtoproductview)
* [scene.addMeshToAnnotation](./scene_functions#addmeshtoannotation)
* [scene.convertPMIToOccurrences](./scene_functions#convertpmitooccurrences)
* [scene.createAnnotationFromDefinition](./scene_functions#createannotationfromdefinition)
* [scene.createProductView](./scene_functions#createproductview)
* [scene.getAnnotationDefinition](./scene_functions#getannotationdefinition)
* [scene.getAnnotationGroups](./scene_functions#getannotationgroups)
* [scene.getAnnotationListAABB](./scene_functions#getannotationlistaabb)
* [scene.getAnnotations](./scene_functions#getannotations)
* [scene.getOccurrenceAnnotationDefinitions](./scene_functions#getoccurrenceannotationdefinitions)
* [scene.getProductViewDefinition](./scene_functions#getproductviewdefinition)
* [scene.getProductViewDefinitions](./scene_functions#getproductviewdefinitions)
* [scene.setAnnotationToGroup](./scene_functions#setannotationtogroup)

### createProductView

Create a productview from definition.

```python
scene.createProductView(definition) -> scene.ProductView
```

Parameters

| Type                                                         | Name       | Description |
| ------------------------------------------------------------ | ---------- | ----------- |
| [ProductViewDefinition](./scene_types#productviewdefinition) | definition |             |

Returns

| Type                                     | Name | Description       |
| ---------------------------------------- | ---- | ----------------- |
| [ProductView](./scene_types#productview) | view | The product view. |

See also:

* [scene.addAnnotationGroup](./scene_functions#addannotationgroup)
* [scene.addAnnotationToProductView](./scene_functions#addannotationtoproductview)
* [scene.addMeshToAnnotation](./scene_functions#addmeshtoannotation)
* [scene.convertPMIToOccurrences](./scene_functions#convertpmitooccurrences)
* [scene.createAnnotationFromDefinition](./scene_functions#createannotationfromdefinition)
* [scene.createOccurrenceFromAnnotation](./scene_functions#createoccurrencefromannotation)
* [scene.getAnnotationDefinition](./scene_functions#getannotationdefinition)
* [scene.getAnnotationGroups](./scene_functions#getannotationgroups)
* [scene.getAnnotationListAABB](./scene_functions#getannotationlistaabb)
* [scene.getAnnotations](./scene_functions#getannotations)
* [scene.getOccurrenceAnnotationDefinitions](./scene_functions#getoccurrenceannotationdefinitions)
* [scene.getProductViewDefinition](./scene_functions#getproductviewdefinition)
* [scene.getProductViewDefinitions](./scene_functions#getproductviewdefinitions)
* [scene.setAnnotationToGroup](./scene_functions#setannotationtogroup)

### getAnnotationDefinition

Get definition of given annotation.

```python
scene.getAnnotationDefinition(annotation) -> scene.AnnotationDefinition
```

Parameters

| Type                                   | Name       | Description |
| -------------------------------------- | ---------- | ----------- |
| [Annotation](./scene_types#annotation) | annotation |             |

Returns

| Type                                                       | Name       | Description |
| ---------------------------------------------------------- | ---------- | ----------- |
| [AnnotationDefinition](./scene_types#annotationdefinition) | definition |             |

See also:

* [scene.addAnnotationGroup](./scene_functions#addannotationgroup)
* [scene.addAnnotationToProductView](./scene_functions#addannotationtoproductview)
* [scene.addMeshToAnnotation](./scene_functions#addmeshtoannotation)
* [scene.convertPMIToOccurrences](./scene_functions#convertpmitooccurrences)
* [scene.createAnnotationFromDefinition](./scene_functions#createannotationfromdefinition)
* [scene.createOccurrenceFromAnnotation](./scene_functions#createoccurrencefromannotation)
* [scene.createProductView](./scene_functions#createproductview)
* [scene.getAnnotationGroups](./scene_functions#getannotationgroups)
* [scene.getAnnotationListAABB](./scene_functions#getannotationlistaabb)
* [scene.getAnnotations](./scene_functions#getannotations)
* [scene.getOccurrenceAnnotationDefinitions](./scene_functions#getoccurrenceannotationdefinitions)
* [scene.getProductViewDefinition](./scene_functions#getproductviewdefinition)
* [scene.getProductViewDefinitions](./scene_functions#getproductviewdefinitions)
* [scene.setAnnotationToGroup](./scene_functions#setannotationtogroup)

### getAnnotationGroups

Returns the list of the AnnotationGroup from a PMIComponent.

```python
scene.getAnnotationGroups(pmiComponent) -> scene.AnnotationGroupList
```

Parameters

| Type                                 | Name         | Description        |
| ------------------------------------ | ------------ | ------------------ |
| [Component](./scene_types#component) | pmiComponent | The pmi component. |

Returns

| Type                                                     | Name   | Description              |
| -------------------------------------------------------- | ------ | ------------------------ |
| [AnnotationGroupList](./scene_types#annotationgrouplist) | groups | List of AnnotationGroup. |

See also:

* [scene.addAnnotationGroup](./scene_functions#addannotationgroup)
* [scene.addAnnotationToProductView](./scene_functions#addannotationtoproductview)
* [scene.addMeshToAnnotation](./scene_functions#addmeshtoannotation)
* [scene.convertPMIToOccurrences](./scene_functions#convertpmitooccurrences)
* [scene.createAnnotationFromDefinition](./scene_functions#createannotationfromdefinition)
* [scene.createOccurrenceFromAnnotation](./scene_functions#createoccurrencefromannotation)
* [scene.createProductView](./scene_functions#createproductview)
* [scene.getAnnotationDefinition](./scene_functions#getannotationdefinition)
* [scene.getAnnotationListAABB](./scene_functions#getannotationlistaabb)
* [scene.getAnnotations](./scene_functions#getannotations)
* [scene.getOccurrenceAnnotationDefinitions](./scene_functions#getoccurrenceannotationdefinitions)
* [scene.getProductViewDefinition](./scene_functions#getproductviewdefinition)
* [scene.getProductViewDefinitions](./scene_functions#getproductviewdefinitions)
* [scene.setAnnotationToGroup](./scene_functions#setannotationtogroup)

### getAnnotationListAABB

Get the AABB of the annotation list.

```python
scene.getAnnotationListAABB(annotationList) -> geom.AABB
```

Parameters

| Type                                           | Name           | Description |
| ---------------------------------------------- | -------------- | ----------- |
| [AnnotationList](./scene_types#annotationlist) | annotationList |             |

Returns

| Type                      | Name | Description                                                 |
| ------------------------- | ---- | ----------------------------------------------------------- |
| [AABB](./geom_types#aabb) | aabb | The axis aligned bounding box of the given annotation list. |

See also:

* [scene.addAnnotationGroup](./scene_functions#addannotationgroup)
* [scene.addAnnotationToProductView](./scene_functions#addannotationtoproductview)
* [scene.addMeshToAnnotation](./scene_functions#addmeshtoannotation)
* [scene.convertPMIToOccurrences](./scene_functions#convertpmitooccurrences)
* [scene.createAnnotationFromDefinition](./scene_functions#createannotationfromdefinition)
* [scene.createOccurrenceFromAnnotation](./scene_functions#createoccurrencefromannotation)
* [scene.createProductView](./scene_functions#createproductview)
* [scene.getAnnotationDefinition](./scene_functions#getannotationdefinition)
* [scene.getAnnotationGroups](./scene_functions#getannotationgroups)
* [scene.getAnnotations](./scene_functions#getannotations)
* [scene.getOccurrenceAnnotationDefinitions](./scene_functions#getoccurrenceannotationdefinitions)
* [scene.getProductViewDefinition](./scene_functions#getproductviewdefinition)
* [scene.getProductViewDefinitions](./scene_functions#getproductviewdefinitions)
* [scene.setAnnotationToGroup](./scene_functions#setannotationtogroup)

### getAnnotations

Returns the list of the Annotation from a AnnotationGroup.

```python
scene.getAnnotations(group) -> scene.AnnotationList
```

Parameters

| Type                                             | Name  | Description          |
| ------------------------------------------------ | ----- | -------------------- |
| [AnnotationGroup](./scene_types#annotationgroup) | group | The AnnotationGroup. |

Returns

| Type                                           | Name        | Description         |
| ---------------------------------------------- | ----------- | ------------------- |
| [AnnotationList](./scene_types#annotationlist) | annotations | List of Annotation. |

See also:

* [scene.addAnnotationGroup](./scene_functions#addannotationgroup)
* [scene.addAnnotationToProductView](./scene_functions#addannotationtoproductview)
* [scene.addMeshToAnnotation](./scene_functions#addmeshtoannotation)
* [scene.convertPMIToOccurrences](./scene_functions#convertpmitooccurrences)
* [scene.createAnnotationFromDefinition](./scene_functions#createannotationfromdefinition)
* [scene.createOccurrenceFromAnnotation](./scene_functions#createoccurrencefromannotation)
* [scene.createProductView](./scene_functions#createproductview)
* [scene.getAnnotationDefinition](./scene_functions#getannotationdefinition)
* [scene.getAnnotationGroups](./scene_functions#getannotationgroups)
* [scene.getAnnotationListAABB](./scene_functions#getannotationlistaabb)
* [scene.getOccurrenceAnnotationDefinitions](./scene_functions#getoccurrenceannotationdefinitions)
* [scene.getProductViewDefinition](./scene_functions#getproductviewdefinition)
* [scene.getProductViewDefinitions](./scene_functions#getproductviewdefinitions)
* [scene.setAnnotationToGroup](./scene_functions#setannotationtogroup)

### getOccurrenceAnnotationDefinitions

Get all annotations definition of given occurrence.

```python
scene.getOccurrenceAnnotationDefinitions(occurrence) -> scene.AnnotationDefinitionList
```

Parameters

| Type                                   | Name       | Description |
| -------------------------------------- | ---------- | ----------- |
| [Occurrence](./scene_types#occurrence) | occurrence |             |

Returns

| Type                                                               | Name        | Description |
| ------------------------------------------------------------------ | ----------- | ----------- |
| [AnnotationDefinitionList](./scene_types#annotationdefinitionlist) | definitions |             |

See also:

* [scene.addAnnotationGroup](./scene_functions#addannotationgroup)
* [scene.addAnnotationToProductView](./scene_functions#addannotationtoproductview)
* [scene.addMeshToAnnotation](./scene_functions#addmeshtoannotation)
* [scene.convertPMIToOccurrences](./scene_functions#convertpmitooccurrences)
* [scene.createAnnotationFromDefinition](./scene_functions#createannotationfromdefinition)
* [scene.createOccurrenceFromAnnotation](./scene_functions#createoccurrencefromannotation)
* [scene.createProductView](./scene_functions#createproductview)
* [scene.getAnnotationDefinition](./scene_functions#getannotationdefinition)
* [scene.getAnnotationGroups](./scene_functions#getannotationgroups)
* [scene.getAnnotationListAABB](./scene_functions#getannotationlistaabb)
* [scene.getAnnotations](./scene_functions#getannotations)
* [scene.getProductViewDefinition](./scene_functions#getproductviewdefinition)
* [scene.getProductViewDefinitions](./scene_functions#getproductviewdefinitions)
* [scene.setAnnotationToGroup](./scene_functions#setannotationtogroup)

### getProductViewDefinition

Get productview definition.

```python
scene.getProductViewDefinition(view) -> scene.ProductViewDefinition
```

Parameters

| Type                             | Name | Description       |
| -------------------------------- | ---- | ----------------- |
| [Variant](./scene_types#variant) | view | The product view. |

Returns

| Type                                                         | Name       | Description |
| ------------------------------------------------------------ | ---------- | ----------- |
| [ProductViewDefinition](./scene_types#productviewdefinition) | definition |             |

See also:

* [scene.addAnnotationGroup](./scene_functions#addannotationgroup)
* [scene.addAnnotationToProductView](./scene_functions#addannotationtoproductview)
* [scene.addMeshToAnnotation](./scene_functions#addmeshtoannotation)
* [scene.convertPMIToOccurrences](./scene_functions#convertpmitooccurrences)
* [scene.createAnnotationFromDefinition](./scene_functions#createannotationfromdefinition)
* [scene.createOccurrenceFromAnnotation](./scene_functions#createoccurrencefromannotation)
* [scene.createProductView](./scene_functions#createproductview)
* [scene.getAnnotationDefinition](./scene_functions#getannotationdefinition)
* [scene.getAnnotationGroups](./scene_functions#getannotationgroups)
* [scene.getAnnotationListAABB](./scene_functions#getannotationlistaabb)
* [scene.getAnnotations](./scene_functions#getannotations)
* [scene.getOccurrenceAnnotationDefinitions](./scene_functions#getoccurrenceannotationdefinitions)
* [scene.getProductViewDefinitions](./scene_functions#getproductviewdefinitions)
* [scene.setAnnotationToGroup](./scene_functions#setannotationtogroup)

### getProductViewDefinitions

Get all productviews definitions.

```python
scene.getProductViewDefinitions() -> scene.ProductViewDefinitionList
```

Returns

| Type                                                                 | Name        | Description |
| -------------------------------------------------------------------- | ----------- | ----------- |
| [ProductViewDefinitionList](./scene_types#productviewdefinitionlist) | definitions |             |

See also:

* [scene.addAnnotationGroup](./scene_functions#addannotationgroup)
* [scene.addAnnotationToProductView](./scene_functions#addannotationtoproductview)
* [scene.addMeshToAnnotation](./scene_functions#addmeshtoannotation)
* [scene.convertPMIToOccurrences](./scene_functions#convertpmitooccurrences)
* [scene.createAnnotationFromDefinition](./scene_functions#createannotationfromdefinition)
* [scene.createOccurrenceFromAnnotation](./scene_functions#createoccurrencefromannotation)
* [scene.createProductView](./scene_functions#createproductview)
* [scene.getAnnotationDefinition](./scene_functions#getannotationdefinition)
* [scene.getAnnotationGroups](./scene_functions#getannotationgroups)
* [scene.getAnnotationListAABB](./scene_functions#getannotationlistaabb)
* [scene.getAnnotations](./scene_functions#getannotations)
* [scene.getOccurrenceAnnotationDefinitions](./scene_functions#getoccurrenceannotationdefinitions)
* [scene.getProductViewDefinition](./scene_functions#getproductviewdefinition)
* [scene.setAnnotationToGroup](./scene_functions#setannotationtogroup)

### setAnnotationToGroup

Set Annotation to a Annotation Group.

```python
scene.setAnnotationToGroup(annotation, group)
```

Parameters

| Type                                             | Name       | Description |
| ------------------------------------------------ | ---------- | ----------- |
| [Annotation](./scene_types#annotation)           | annotation |             |
| [AnnotationGroup](./scene_types#annotationgroup) | group      |             |

See also:

* [scene.addAnnotationGroup](./scene_functions#addannotationgroup)
* [scene.addAnnotationToProductView](./scene_functions#addannotationtoproductview)
* [scene.addMeshToAnnotation](./scene_functions#addmeshtoannotation)
* [scene.convertPMIToOccurrences](./scene_functions#convertpmitooccurrences)
* [scene.createAnnotationFromDefinition](./scene_functions#createannotationfromdefinition)
* [scene.createOccurrenceFromAnnotation](./scene_functions#createoccurrencefromannotation)
* [scene.createProductView](./scene_functions#createproductview)
* [scene.getAnnotationDefinition](./scene_functions#getannotationdefinition)
* [scene.getAnnotationGroups](./scene_functions#getannotationgroups)
* [scene.getAnnotationListAABB](./scene_functions#getannotationlistaabb)
* [scene.getAnnotations](./scene_functions#getannotations)
* [scene.getOccurrenceAnnotationDefinitions](./scene_functions#getoccurrenceannotationdefinitions)
* [scene.getProductViewDefinition](./scene_functions#getproductviewdefinition)
* [scene.getProductViewDefinitions](./scene_functions#getproductviewdefinitions)

## prototype

### cleanInstances

Clean prototypes and instances (lonely instances, overriding their prototypes hierarchies...).

```python
scene.cleanInstances(removeUselessInstances=True, removeHierarchyOverridingInstances=False, occurrence=0)
```

Parameters

| Type                                   | Name                               | Description                                                                  |
| -------------------------------------- | ---------------------------------- | ---------------------------------------------------------------------------- |
| [Boolean](./core_types#boolean)        | removeUselessInstances             | Remove instances where they are not needed (prototype referenced once, ...). |
| [Boolean](./core_types#boolean)        | removeHierarchyOverridingInstances | Remove instances overriding their prototypes sub-hierarchies.                |
| [Occurrence](./scene_types#occurrence) | occurrence                         | Root occurrence for the process.                                             |

See also:

* [scene.getDirectInstances](./scene_functions#getdirectinstances)
* [scene.getFinalPrototype](./scene_functions#getfinalprototype)
* [scene.getInstances](./scene_functions#getinstances)
* [scene.getPrototype](./scene_functions#getprototype)
* [scene.getPrototypes](./scene_functions#getprototypes)
* [scene.prototypeSubTree](./scene_functions#prototypesubtree)
* [scene.setPrototype](./scene_functions#setprototype)
* [scene.setPrototypes](./scene_functions#setprototypes)
* [scene.updateChildrenPrototypes](./scene_functions#updatechildrenprototypes)

### getDirectInstances

Returns all the occurrences prototyping the given occurrence.

```python
scene.getDirectInstances(prototype) -> scene.OccurrenceList
```

Parameters

| Type                                   | Name      | Description               |
| -------------------------------------- | --------- | ------------------------- |
| [Occurrence](./scene_types#occurrence) | prototype | The prototype occurrence. |

Returns

| Type                                           | Name      | Description    |
| ---------------------------------------------- | --------- | -------------- |
| [OccurrenceList](./scene_types#occurrencelist) | instances | The instances. |

See also:

* [scene.cleanInstances](./scene_functions#cleaninstances)
* [scene.getFinalPrototype](./scene_functions#getfinalprototype)
* [scene.getInstances](./scene_functions#getinstances)
* [scene.getPrototype](./scene_functions#getprototype)
* [scene.getPrototypes](./scene_functions#getprototypes)
* [scene.prototypeSubTree](./scene_functions#prototypesubtree)
* [scene.setPrototype](./scene_functions#setprototype)
* [scene.setPrototypes](./scene_functions#setprototypes)
* [scene.updateChildrenPrototypes](./scene_functions#updatechildrenprototypes)

### getFinalPrototype

Returns the final prototype of an occurrence (ie. The very first one of prototype tree).

```python
scene.getFinalPrototype(occurrence) -> scene.Occurrence
```

Parameters

| Type                                   | Name       | Description     |
| -------------------------------------- | ---------- | --------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence. |

Returns

| Type                                   | Name      | Description                   |
| -------------------------------------- | --------- | ----------------------------- |
| [Occurrence](./scene_types#occurrence) | prototype | The final prototype (if any). |

See also:

* [scene.cleanInstances](./scene_functions#cleaninstances)
* [scene.getDirectInstances](./scene_functions#getdirectinstances)
* [scene.getInstances](./scene_functions#getinstances)
* [scene.getPrototype](./scene_functions#getprototype)
* [scene.getPrototypes](./scene_functions#getprototypes)
* [scene.prototypeSubTree](./scene_functions#prototypesubtree)
* [scene.setPrototype](./scene_functions#setprototype)
* [scene.setPrototypes](./scene_functions#setprototypes)
* [scene.updateChildrenPrototypes](./scene_functions#updatechildrenprototypes)

### getInstances

Get occurrences sharing the same prototype as the given one.

```python
scene.getInstances(occurrence) -> scene.OccurrenceList
```

Parameters

| Type                                   | Name       | Description                |
| -------------------------------------- | ---------- | -------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | Reference part occurrence. |

Returns

| Type                                           | Name      | Description                                         |
| ---------------------------------------------- | --------- | --------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | instances | The list of occurrences sharing the same prototype. |

See also:

* [scene.cleanInstances](./scene_functions#cleaninstances)
* [scene.getDirectInstances](./scene_functions#getdirectinstances)
* [scene.getFinalPrototype](./scene_functions#getfinalprototype)
* [scene.getPrototype](./scene_functions#getprototype)
* [scene.getPrototypes](./scene_functions#getprototypes)
* [scene.prototypeSubTree](./scene_functions#prototypesubtree)
* [scene.setPrototype](./scene_functions#setprototype)
* [scene.setPrototypes](./scene_functions#setprototypes)
* [scene.updateChildrenPrototypes](./scene_functions#updatechildrenprototypes)

### getPrototype

Returns the prototype of an occurrence.

```python
scene.getPrototype(occurrence) -> scene.Occurrence
```

Parameters

| Type                                   | Name       | Description     |
| -------------------------------------- | ---------- | --------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence. |

Returns

| Type                                   | Name      | Description             |
| -------------------------------------- | --------- | ----------------------- |
| [Occurrence](./scene_types#occurrence) | prototype | The prototype (if any). |

See also:

* [scene.cleanInstances](./scene_functions#cleaninstances)
* [scene.getDirectInstances](./scene_functions#getdirectinstances)
* [scene.getFinalPrototype](./scene_functions#getfinalprototype)
* [scene.getInstances](./scene_functions#getinstances)
* [scene.getPrototypes](./scene_functions#getprototypes)
* [scene.prototypeSubTree](./scene_functions#prototypesubtree)
* [scene.setPrototype](./scene_functions#setprototype)
* [scene.setPrototypes](./scene_functions#setprototypes)
* [scene.updateChildrenPrototypes](./scene_functions#updatechildrenprototypes)

### getPrototypes

Returns the prototype for each given occurrence.

```python
scene.getPrototypes(occurrences) -> scene.OccurrenceList
```

Parameters

| Type                                           | Name        | Description     |
| ---------------------------------------------- | ----------- | --------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | The occurrence. |

Returns

| Type                                           | Name       | Description                       |
| ---------------------------------------------- | ---------- | --------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | prototypes | The prototype of each occurrence. |

See also:

* [scene.cleanInstances](./scene_functions#cleaninstances)
* [scene.getDirectInstances](./scene_functions#getdirectinstances)
* [scene.getFinalPrototype](./scene_functions#getfinalprototype)
* [scene.getInstances](./scene_functions#getinstances)
* [scene.getPrototype](./scene_functions#getprototype)
* [scene.prototypeSubTree](./scene_functions#prototypesubtree)
* [scene.setPrototype](./scene_functions#setprototype)
* [scene.setPrototypes](./scene_functions#setprototypes)
* [scene.updateChildrenPrototypes](./scene_functions#updatechildrenprototypes)

### prototypeSubTree

Create occurrences that prototype the given occurrence and all its subtree.

```python
scene.prototypeSubTree(prototype) -> scene.Occurrence
```

Parameters

| Type                                   | Name      | Description                                       |
| -------------------------------------- | --------- | ------------------------------------------------- |
| [Occurrence](./scene_types#occurrence) | prototype | The root occurrence of the sub-tree to prototype. |

Returns

| Type                                   | Name       | Description                                     |
| -------------------------------------- | ---------- | ----------------------------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The root occurrence of the prototyped sub-tree. |

See also:

* [scene.cleanInstances](./scene_functions#cleaninstances)
* [scene.getDirectInstances](./scene_functions#getdirectinstances)
* [scene.getFinalPrototype](./scene_functions#getfinalprototype)
* [scene.getInstances](./scene_functions#getinstances)
* [scene.getPrototype](./scene_functions#getprototype)
* [scene.getPrototypes](./scene_functions#getprototypes)
* [scene.setPrototype](./scene_functions#setprototype)
* [scene.setPrototypes](./scene_functions#setprototypes)
* [scene.updateChildrenPrototypes](./scene_functions#updatechildrenprototypes)

### setPrototype

Sets the prototype of an occurrence.

```python
scene.setPrototype(occurrence, prototype)
```

Parameters

| Type                                   | Name       | Description     |
| -------------------------------------- | ---------- | --------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence. |
| [Occurrence](./scene_types#occurrence) | prototype  | The prototype.  |

See also:

* [scene.cleanInstances](./scene_functions#cleaninstances)
* [scene.getDirectInstances](./scene_functions#getdirectinstances)
* [scene.getFinalPrototype](./scene_functions#getfinalprototype)
* [scene.getInstances](./scene_functions#getinstances)
* [scene.getPrototype](./scene_functions#getprototype)
* [scene.getPrototypes](./scene_functions#getprototypes)
* [scene.prototypeSubTree](./scene_functions#prototypesubtree)
* [scene.setPrototypes](./scene_functions#setprototypes)
* [scene.updateChildrenPrototypes](./scene_functions#updatechildrenprototypes)

### setPrototypes

Sets the prototype for each given occurrence.

```python
scene.setPrototypes(occurrences, prototypes)
```

Parameters

| Type                                           | Name        | Description      |
| ---------------------------------------------- | ----------- | ---------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | The occurrences. |
| [OccurrenceList](./scene_types#occurrencelist) | prototypes  | The prototypes.  |

See also:

* [scene.cleanInstances](./scene_functions#cleaninstances)
* [scene.getDirectInstances](./scene_functions#getdirectinstances)
* [scene.getFinalPrototype](./scene_functions#getfinalprototype)
* [scene.getInstances](./scene_functions#getinstances)
* [scene.getPrototype](./scene_functions#getprototype)
* [scene.getPrototypes](./scene_functions#getprototypes)
* [scene.prototypeSubTree](./scene_functions#prototypesubtree)
* [scene.setPrototype](./scene_functions#setprototype)
* [scene.updateChildrenPrototypes](./scene_functions#updatechildrenprototypes)

### updateChildrenPrototypes

Update children prototypes of the given occurrence.

```python
scene.updateChildrenPrototypes(occurrence)
```

Parameters

| Type                                   | Name       | Description     |
| -------------------------------------- | ---------- | --------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | The occurrence. |

See also:

* [scene.cleanInstances](./scene_functions#cleaninstances)
* [scene.getDirectInstances](./scene_functions#getdirectinstances)
* [scene.getFinalPrototype](./scene_functions#getfinalprototype)
* [scene.getInstances](./scene_functions#getinstances)
* [scene.getPrototype](./scene_functions#getprototype)
* [scene.getPrototypes](./scene_functions#getprototypes)
* [scene.prototypeSubTree](./scene_functions#prototypesubtree)
* [scene.setPrototype](./scene_functions#setprototype)
* [scene.setPrototypes](./scene_functions#setprototypes)

## selection

### clearSelection

Clear the current selection.

```python
scene.clearSelection(selectionId=1)
```

Parameters

| Type                        | Name        | Description                                                                  |
| --------------------------- | ----------- | ---------------------------------------------------------------------------- |
| [Ident](./core_types#ident) | selectionId | ID of the selection to clear, or current selection (id = 1) will be cleared. |

See also:

* [scene.createSelectionSnapshot](./scene_functions#createselectionsnapshot)
* [scene.deleteSelection](./scene_functions#deleteselection)
* [scene.deleteSelectionSnapshot](./scene_functions#deleteselectionsnapshot)
* [scene.getSelectedOccurrences](./scene_functions#getselectedoccurrences)
* [scene.getSelectedPolygonCount](./scene_functions#getselectedpolygoncount)
* [scene.invertOrientationSelection](./scene_functions#invertorientationselection)
* [scene.invertSelect](./scene_functions#invertselect)
* [scene.invertSelection](./scene_functions#invertselection)
* [scene.select](./scene_functions#select)
* [scene.separateSelection](./scene_functions#separateselection)
* [scene.unselect](./scene_functions#unselect)

### createSelectionSnapshot

Get the ID of a copy of the current selection to use it later.

```python
scene.createSelectionSnapshot() -> core.Ident
```

Returns

| Type                        | Name        | Description                                         |
| --------------------------- | ----------- | --------------------------------------------------- |
| [Ident](./core_types#ident) | selectionId | Selection ID of the state of the current selection. |

See also:

* [scene.clearSelection](./scene_functions#clearselection)
* [scene.deleteSelection](./scene_functions#deleteselection)
* [scene.deleteSelectionSnapshot](./scene_functions#deleteselectionsnapshot)
* [scene.getSelectedOccurrences](./scene_functions#getselectedoccurrences)
* [scene.getSelectedPolygonCount](./scene_functions#getselectedpolygoncount)
* [scene.invertOrientationSelection](./scene_functions#invertorientationselection)
* [scene.invertSelect](./scene_functions#invertselect)
* [scene.invertSelection](./scene_functions#invertselection)
* [scene.select](./scene_functions#select)
* [scene.separateSelection](./scene_functions#separateselection)
* [scene.unselect](./scene_functions#unselect)

### deleteSelection

Delete all selected occurrences, and/or sub-occurrence elements.

```python
scene.deleteSelection(selectionId=1)
```

Parameters

| Type                        | Name        | Description                                                                   |
| --------------------------- | ----------- | ----------------------------------------------------------------------------- |
| [Ident](./core_types#ident) | selectionId | ID of the selection to delete, or current selection (id = 1) will be deleted. |

See also:

* [scene.clearSelection](./scene_functions#clearselection)
* [scene.createSelectionSnapshot](./scene_functions#createselectionsnapshot)
* [scene.deleteSelectionSnapshot](./scene_functions#deleteselectionsnapshot)
* [scene.getSelectedOccurrences](./scene_functions#getselectedoccurrences)
* [scene.getSelectedPolygonCount](./scene_functions#getselectedpolygoncount)
* [scene.invertOrientationSelection](./scene_functions#invertorientationselection)
* [scene.invertSelect](./scene_functions#invertselect)
* [scene.invertSelection](./scene_functions#invertselection)
* [scene.select](./scene_functions#select)
* [scene.separateSelection](./scene_functions#separateselection)
* [scene.unselect](./scene_functions#unselect)

### deleteSelectionSnapshot

Delete a selection snapshot using its id.

```python
scene.deleteSelectionSnapshot(selectionId)
```

Parameters

| Type                        | Name        | Description                             |
| --------------------------- | ----------- | --------------------------------------- |
| [Ident](./core_types#ident) | selectionId | Selection ID of the snapshot to delete. |

See also:

* [scene.clearSelection](./scene_functions#clearselection)
* [scene.createSelectionSnapshot](./scene_functions#createselectionsnapshot)
* [scene.deleteSelection](./scene_functions#deleteselection)
* [scene.getSelectedOccurrences](./scene_functions#getselectedoccurrences)
* [scene.getSelectedPolygonCount](./scene_functions#getselectedpolygoncount)
* [scene.invertOrientationSelection](./scene_functions#invertorientationselection)
* [scene.invertSelect](./scene_functions#invertselect)
* [scene.invertSelection](./scene_functions#invertselection)
* [scene.select](./scene_functions#select)
* [scene.separateSelection](./scene_functions#separateselection)
* [scene.unselect](./scene_functions#unselect)

### getSelectedOccurrences

Returns all the selected occurrences.

```python
scene.getSelectedOccurrences(keepAncestors=False, selectionId=1) -> scene.OccurrenceList
```

Parameters

| Type                            | Name          | Description                                                                |
| ------------------------------- | ------------- | -------------------------------------------------------------------------- |
| [Boolean](./core_types#boolean) | keepAncestors | If True, occurrences with ancestors selected will be remove from the list. |
| [Ident](./core_types#ident)     | selectionId   | ID of the selection to use, or current selection (id = 1) will be used.    |

Returns

| Type                                           | Name      | Description                       |
| ---------------------------------------------- | --------- | --------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | selection | The list of selected occurrences. |

See also:

* [scene.clearSelection](./scene_functions#clearselection)
* [scene.createSelectionSnapshot](./scene_functions#createselectionsnapshot)
* [scene.deleteSelection](./scene_functions#deleteselection)
* [scene.deleteSelectionSnapshot](./scene_functions#deleteselectionsnapshot)
* [scene.getSelectedPolygonCount](./scene_functions#getselectedpolygoncount)
* [scene.invertOrientationSelection](./scene_functions#invertorientationselection)
* [scene.invertSelect](./scene_functions#invertselect)
* [scene.invertSelection](./scene_functions#invertselection)
* [scene.select](./scene_functions#select)
* [scene.separateSelection](./scene_functions#separateselection)
* [scene.unselect](./scene_functions#unselect)

### getSelectedPolygonCount

Returns the number of selected polygons.

```python
scene.getSelectedPolygonCount(selectionId=1) -> core.ULong
```

Parameters

| Type                        | Name        | Description                                                             |
| --------------------------- | ----------- | ----------------------------------------------------------------------- |
| [Ident](./core_types#ident) | selectionId | ID of the selection to use, or current selection (id = 1) will be used. |

Returns

| Type                        | Name         | Description                  |
| --------------------------- | ------------ | ---------------------------- |
| [ULong](./core_types#ulong) | polygonCount | Number of selected Polygons. |

See also:

* [scene.clearSelection](./scene_functions#clearselection)
* [scene.createSelectionSnapshot](./scene_functions#createselectionsnapshot)
* [scene.deleteSelection](./scene_functions#deleteselection)
* [scene.deleteSelectionSnapshot](./scene_functions#deleteselectionsnapshot)
* [scene.getSelectedOccurrences](./scene_functions#getselectedoccurrences)
* [scene.invertOrientationSelection](./scene_functions#invertorientationselection)
* [scene.invertSelect](./scene_functions#invertselect)
* [scene.invertSelection](./scene_functions#invertselection)
* [scene.select](./scene_functions#select)
* [scene.separateSelection](./scene_functions#separateselection)
* [scene.unselect](./scene_functions#unselect)

### invertOrientationSelection

Invert the orientation of each selected item (occurrences and/or sub-occurrence elements.

```python
scene.invertOrientationSelection(selectionId=1)
```

Parameters

| Type                        | Name        | Description                                                                    |
| --------------------------- | ----------- | ------------------------------------------------------------------------------ |
| [Ident](./core_types#ident) | selectionId | ID of the selection to invert, or current selection (id = 1) will be inverted. |

See also:

* [scene.clearSelection](./scene_functions#clearselection)
* [scene.createSelectionSnapshot](./scene_functions#createselectionsnapshot)
* [scene.deleteSelection](./scene_functions#deleteselection)
* [scene.deleteSelectionSnapshot](./scene_functions#deleteselectionsnapshot)
* [scene.getSelectedOccurrences](./scene_functions#getselectedoccurrences)
* [scene.getSelectedPolygonCount](./scene_functions#getselectedpolygoncount)
* [scene.invertSelect](./scene_functions#invertselect)
* [scene.invertSelection](./scene_functions#invertselection)
* [scene.select](./scene_functions#select)
* [scene.separateSelection](./scene_functions#separateselection)
* [scene.unselect](./scene_functions#unselect)

### invertSelect

Invert occurrences to selection.

```python
scene.invertSelect(occurrence, selectionId=1)
```

Parameters

| Type                                           | Name        | Description                                                             |
| ---------------------------------------------- | ----------- | ----------------------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrence  | Occurrences to invert from the selection.                               |
| [Ident](./core_types#ident)                    | selectionId | ID of the selection to use, or current selection (id = 1) will be used. |

See also:

* [scene.clearSelection](./scene_functions#clearselection)
* [scene.createSelectionSnapshot](./scene_functions#createselectionsnapshot)
* [scene.deleteSelection](./scene_functions#deleteselection)
* [scene.deleteSelectionSnapshot](./scene_functions#deleteselectionsnapshot)
* [scene.getSelectedOccurrences](./scene_functions#getselectedoccurrences)
* [scene.getSelectedPolygonCount](./scene_functions#getselectedpolygoncount)
* [scene.invertOrientationSelection](./scene_functions#invertorientationselection)
* [scene.invertSelection](./scene_functions#invertselection)
* [scene.select](./scene_functions#select)
* [scene.separateSelection](./scene_functions#separateselection)
* [scene.unselect](./scene_functions#unselect)

### invertSelection

Replace the selection by all unselected part occurrences.

```python
scene.invertSelection(selectionId=1)
```

Parameters

| Type                        | Name        | Description                                                                    |
| --------------------------- | ----------- | ------------------------------------------------------------------------------ |
| [Ident](./core_types#ident) | selectionId | ID of the selection to invert, or current selection (id = 1) will be inverted. |

See also:

* [scene.clearSelection](./scene_functions#clearselection)
* [scene.createSelectionSnapshot](./scene_functions#createselectionsnapshot)
* [scene.deleteSelection](./scene_functions#deleteselection)
* [scene.deleteSelectionSnapshot](./scene_functions#deleteselectionsnapshot)
* [scene.getSelectedOccurrences](./scene_functions#getselectedoccurrences)
* [scene.getSelectedPolygonCount](./scene_functions#getselectedpolygoncount)
* [scene.invertOrientationSelection](./scene_functions#invertorientationselection)
* [scene.invertSelect](./scene_functions#invertselect)
* [scene.select](./scene_functions#select)
* [scene.separateSelection](./scene_functions#separateselection)
* [scene.unselect](./scene_functions#unselect)

### select

Add occurrences to selection.

```python
scene.select(occurrences, selectionId=1)
```

Parameters

| Type                                           | Name        | Description                                                             |
| ---------------------------------------------- | ----------- | ----------------------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences | Occurrences to add to the selection.                                    |
| [Ident](./core_types#ident)                    | selectionId | ID of the selection to use, or current selection (id = 1) will be used. |

See also:

* [scene.clearSelection](./scene_functions#clearselection)
* [scene.createSelectionSnapshot](./scene_functions#createselectionsnapshot)
* [scene.deleteSelection](./scene_functions#deleteselection)
* [scene.deleteSelectionSnapshot](./scene_functions#deleteselectionsnapshot)
* [scene.getSelectedOccurrences](./scene_functions#getselectedoccurrences)
* [scene.getSelectedPolygonCount](./scene_functions#getselectedpolygoncount)
* [scene.invertOrientationSelection](./scene_functions#invertorientationselection)
* [scene.invertSelect](./scene_functions#invertselect)
* [scene.invertSelection](./scene_functions#invertselection)
* [scene.separateSelection](./scene_functions#separateselection)
* [scene.unselect](./scene_functions#unselect)

### separateSelection

Separate all polygons from their original parts into a new one or new ones depending on the parameters.

```python
scene.separateSelection(createSingleOccurrence=True, selectionId=1) -> scene.OccurrenceList
```

Parameters

| Type                            | Name                   | Description                                                                                                                                                  |
| ------------------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Boolean](./core_types#boolean) | createSingleOccurrence | Only create a single occurrence, or create occurrences corresponding to every part containing selected elements, at the same place in the hierarchical tree. |
| [Ident](./core_types#ident)     | selectionId            | ID of the selection to separate, or current selection (id = 1) will be separated.                                                                            |

Returns

| Type                                           | Name           | Description                    |
| ---------------------------------------------- | -------------- | ------------------------------ |
| [OccurrenceList](./scene_types#occurrencelist) | newOccurrences | The new occurrence(s) created. |

See also:

* [scene.clearSelection](./scene_functions#clearselection)
* [scene.createSelectionSnapshot](./scene_functions#createselectionsnapshot)
* [scene.deleteSelection](./scene_functions#deleteselection)
* [scene.deleteSelectionSnapshot](./scene_functions#deleteselectionsnapshot)
* [scene.getSelectedOccurrences](./scene_functions#getselectedoccurrences)
* [scene.getSelectedPolygonCount](./scene_functions#getselectedpolygoncount)
* [scene.invertOrientationSelection](./scene_functions#invertorientationselection)
* [scene.invertSelect](./scene_functions#invertselect)
* [scene.invertSelection](./scene_functions#invertselection)
* [scene.select](./scene_functions#select)
* [scene.unselect](./scene_functions#unselect)

### unselect

Remove occurrences to selection.

```python
scene.unselect(occurrence, selectionId=1)
```

Parameters

| Type                                           | Name        | Description                                                             |
| ---------------------------------------------- | ----------- | ----------------------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrence  | Occurrences to remove from the selection.                               |
| [Ident](./core_types#ident)                    | selectionId | ID of the selection to use, or current selection (id = 1) will be used. |

See also:

* [scene.clearSelection](./scene_functions#clearselection)
* [scene.createSelectionSnapshot](./scene_functions#createselectionsnapshot)
* [scene.deleteSelection](./scene_functions#deleteselection)
* [scene.deleteSelectionSnapshot](./scene_functions#deleteselectionsnapshot)
* [scene.getSelectedOccurrences](./scene_functions#getselectedoccurrences)
* [scene.getSelectedPolygonCount](./scene_functions#getselectedpolygoncount)
* [scene.invertOrientationSelection](./scene_functions#invertorientationselection)
* [scene.invertSelect](./scene_functions#invertselect)
* [scene.invertSelection](./scene_functions#invertselection)
* [scene.select](./scene_functions#select)
* [scene.separateSelection](./scene_functions#separateselection)

## simplification

### compress

Compress a sub-tree by removing occurrence containing only one Child or empty, and by removing useless instances (see removeUselessInstances).

```python
scene.compress(occurrence=0) -> scene.Occurrence
```

Parameters

| Type                                   | Name       | Description                      |
| -------------------------------------- | ---------- | -------------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | Root occurrence for the process. |

Returns

| Type                                   | Name                 | Description                               |
| -------------------------------------- | -------------------- | ----------------------------------------- |
| [Occurrence](./scene_types#occurrence) | resultingOccurrences | The resulting occurrences of compression. |

See also:

* [scene.convertToOldSchoolVisibility](./scene_functions#converttooldschoolvisibility)
* [scene.getHiddenPartOccurrences](./scene_functions#gethiddenpartoccurrences)
* [scene.getVisiblePartOccurrences](./scene_functions#getvisiblepartoccurrences)
* [scene.makeInstanceUnique](./scene_functions#makeinstanceunique)
* [scene.rake](./scene_functions#rake)
* [scene.removeSymmetryMatrices](./scene_functions#removesymmetrymatrices)
* [scene.resetPartTransform](./scene_functions#resetparttransform)
* [scene.resetTransform](./scene_functions#resettransform)

### convertToOldSchoolVisibility

Modify the visible properties of the sub-tree to look like old school visibility (only hidden/inherited).

```python
scene.convertToOldSchoolVisibility(root=0)
```

Parameters

| Type                                   | Name | Description      |
| -------------------------------------- | ---- | ---------------- |
| [Occurrence](./scene_types#occurrence) | root | Root occurrence. |

See also:

* [scene.compress](./scene_functions#compress)
* [scene.getHiddenPartOccurrences](./scene_functions#gethiddenpartoccurrences)
* [scene.getVisiblePartOccurrences](./scene_functions#getvisiblepartoccurrences)
* [scene.makeInstanceUnique](./scene_functions#makeinstanceunique)
* [scene.rake](./scene_functions#rake)
* [scene.removeSymmetryMatrices](./scene_functions#removesymmetrymatrices)
* [scene.resetPartTransform](./scene_functions#resetparttransform)
* [scene.resetTransform](./scene_functions#resettransform)

### getHiddenPartOccurrences

Get hidden part occurrences.

```python
scene.getHiddenPartOccurrences(roots=None) -> scene.OccurrenceList
```

Parameters

| Type                                           | Name  | Description                        |
| ---------------------------------------------- | ----- | ---------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | roots | Roots occurrences for the process. |

Returns

| Type                                           | Name     | Description                                         |
| ---------------------------------------------- | -------- | --------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | filtered | The list of hidden occurrences (visibility status). |

See also:

* [scene.compress](./scene_functions#compress)
* [scene.convertToOldSchoolVisibility](./scene_functions#converttooldschoolvisibility)
* [scene.getVisiblePartOccurrences](./scene_functions#getvisiblepartoccurrences)
* [scene.makeInstanceUnique](./scene_functions#makeinstanceunique)
* [scene.rake](./scene_functions#rake)
* [scene.removeSymmetryMatrices](./scene_functions#removesymmetrymatrices)
* [scene.resetPartTransform](./scene_functions#resetparttransform)
* [scene.resetTransform](./scene_functions#resettransform)

### getVisiblePartOccurrences

Get visible part occurrences.

```python
scene.getVisiblePartOccurrences(roots=None) -> scene.OccurrenceList
```

Parameters

| Type                                           | Name  | Description                        |
| ---------------------------------------------- | ----- | ---------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | roots | Roots occurrences for the process. |

Returns

| Type                                           | Name     | Description                                               |
| ---------------------------------------------- | -------- | --------------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | filtered | The list of visible part occurrences (visibility status). |

See also:

* [scene.compress](./scene_functions#compress)
* [scene.convertToOldSchoolVisibility](./scene_functions#converttooldschoolvisibility)
* [scene.getHiddenPartOccurrences](./scene_functions#gethiddenpartoccurrences)
* [scene.makeInstanceUnique](./scene_functions#makeinstanceunique)
* [scene.rake](./scene_functions#rake)
* [scene.removeSymmetryMatrices](./scene_functions#removesymmetrymatrices)
* [scene.resetPartTransform](./scene_functions#resetparttransform)
* [scene.resetTransform](./scene_functions#resettransform)

### makeInstanceUnique

Singularize all instances on the sub-tree of an occurrence.

```python
scene.makeInstanceUnique(occurrences=0, keepOnlyPartInstances=False)
```

Parameters

| Type                                           | Name                  | Description                                          |
| ---------------------------------------------- | --------------------- | ---------------------------------------------------- |
| [OccurrenceList](./scene_types#occurrencelist) | occurrences           | Root occurrence for the process.                     |
| [Boolean](./core_types#boolean)                | keepOnlyPartInstances | If true, instances of part will not be singularized. |

See also:

* [scene.compress](./scene_functions#compress)
* [scene.convertToOldSchoolVisibility](./scene_functions#converttooldschoolvisibility)
* [scene.getHiddenPartOccurrences](./scene_functions#gethiddenpartoccurrences)
* [scene.getVisiblePartOccurrences](./scene_functions#getvisiblepartoccurrences)
* [scene.rake](./scene_functions#rake)
* [scene.removeSymmetryMatrices](./scene_functions#removesymmetrymatrices)
* [scene.resetPartTransform](./scene_functions#resetparttransform)
* [scene.resetTransform](./scene_functions#resettransform)

### rake

Set the same parent to all descending parts (all parts will be singularized).

```python
scene.rake(occurrence=0, keepInstances=False)
```

Parameters

| Type                                   | Name          | Description                              |
| -------------------------------------- | ------------- | ---------------------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence    | Root occurrence for the process.         |
| [Boolean](./core_types#boolean)        | keepInstances | If false, the part will be singularized. |

See also:

* [scene.compress](./scene_functions#compress)
* [scene.convertToOldSchoolVisibility](./scene_functions#converttooldschoolvisibility)
* [scene.getHiddenPartOccurrences](./scene_functions#gethiddenpartoccurrences)
* [scene.getVisiblePartOccurrences](./scene_functions#getvisiblepartoccurrences)
* [scene.makeInstanceUnique](./scene_functions#makeinstanceunique)
* [scene.removeSymmetryMatrices](./scene_functions#removesymmetrymatrices)
* [scene.resetPartTransform](./scene_functions#resetparttransform)
* [scene.resetTransform](./scene_functions#resettransform)

### removeSymmetryMatrices

Remove symmetry matrices (apply matrices on geometries on nodes under an occurrence with a symmetry matrix.

```python
scene.removeSymmetryMatrices(occurrence=0)
```

Parameters

| Type                                   | Name       | Description                      |
| -------------------------------------- | ---------- | -------------------------------- |
| [Occurrence](./scene_types#occurrence) | occurrence | Root occurrence for the process. |

See also:

* [scene.compress](./scene_functions#compress)
* [scene.convertToOldSchoolVisibility](./scene_functions#converttooldschoolvisibility)
* [scene.getHiddenPartOccurrences](./scene_functions#gethiddenpartoccurrences)
* [scene.getVisiblePartOccurrences](./scene_functions#getvisiblepartoccurrences)
* [scene.makeInstanceUnique](./scene_functions#makeinstanceunique)
* [scene.rake](./scene_functions#rake)
* [scene.resetPartTransform](./scene_functions#resetparttransform)
* [scene.resetTransform](./scene_functions#resettransform)

### resetPartTransform

Set all part transformation matrices to identity in a sub-tree, transformation will be applied to the shapes.

```python
scene.resetPartTransform(root=0)
```

Parameters

| Type                                   | Name | Description                      |
| -------------------------------------- | ---- | -------------------------------- |
| [Occurrence](./scene_types#occurrence) | root | Root occurrence for the process. |

See also:

* [scene.compress](./scene_functions#compress)
* [scene.convertToOldSchoolVisibility](./scene_functions#converttooldschoolvisibility)
* [scene.getHiddenPartOccurrences](./scene_functions#gethiddenpartoccurrences)
* [scene.getVisiblePartOccurrences](./scene_functions#getvisiblepartoccurrences)
* [scene.makeInstanceUnique](./scene_functions#makeinstanceunique)
* [scene.rake](./scene_functions#rake)
* [scene.removeSymmetryMatrices](./scene_functions#removesymmetrymatrices)
* [scene.resetTransform](./scene_functions#resettransform)

### resetTransform

Set all transformation matrices to identity in a sub-tree.

```python
scene.resetTransform(root, recursive=True, keepInstantiation=True, keepPartTransform=False)
```

Parameters

| Type                                   | Name              | Description                                                                                             |
| -------------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------- |
| [Occurrence](./scene_types#occurrence) | root              | Root occurrence for the process.                                                                        |
| [Boolean](./core_types#boolean)        | recursive         | If False, transformation will be applied only on the root and its components.                           |
| [Boolean](./core_types#boolean)        | keepInstantiation | If False, all occurrences will be singularized.                                                         |
| [Boolean](./core_types#boolean)        | keepPartTransform | If False, transformation will be applied to the shapes (BRepShape points or TessellatedShape vertices). |

See also:

* [scene.compress](./scene_functions#compress)
* [scene.convertToOldSchoolVisibility](./scene_functions#converttooldschoolvisibility)
* [scene.getHiddenPartOccurrences](./scene_functions#gethiddenpartoccurrences)
* [scene.getVisiblePartOccurrences](./scene_functions#getvisiblepartoccurrences)
* [scene.makeInstanceUnique](./scene_functions#makeinstanceunique)
* [scene.rake](./scene_functions#rake)
* [scene.removeSymmetryMatrices](./scene_functions#removesymmetrymatrices)
* [scene.resetPartTransform](./scene_functions#resetparttransform)

## spatialRequest

### createRayProber

Creates a ray prober.

```python
scene.createRayProber() -> core.Ident
```

Returns

| Type                        | Name | Description |
| --------------------------- | ---- | ----------- |
| [Ident](./core_types#ident) | id   |             |

See also:

* [scene.createSphereProber](./scene_functions#createsphereprober)
* [scene.rayCast](./scene_functions#raycast)
* [scene.rayCastAll](./scene_functions#raycastall)
* [scene.updateRayProber](./scene_functions#updaterayprober)
* [scene.updateSphereProber](./scene_functions#updatesphereprober)

### createSphereProber

Creates a sphere prober.

```python
scene.createSphereProber() -> core.Ident
```

Returns

| Type                        | Name | Description |
| --------------------------- | ---- | ----------- |
| [Ident](./core_types#ident) | id   |             |

See also:

* [scene.createRayProber](./scene_functions#createrayprober)
* [scene.rayCast](./scene_functions#raycast)
* [scene.rayCastAll](./scene_functions#raycastall)
* [scene.updateRayProber](./scene_functions#updaterayprober)
* [scene.updateSphereProber](./scene_functions#updatesphereprober)

### rayCast

```python
scene.rayCast(ray, root) -> scene.RayHit
```

Parameters

| Type                                   | Name | Description                       |
| -------------------------------------- | ---- | --------------------------------- |
| [Ray](./geom_types#ray)                | ray  | The ray to cast.                  |
| [Occurrence](./scene_types#occurrence) | root | The root occurrence to cast from. |

Returns

| Type                           | Name | Description                       |
| ------------------------------ | ---- | --------------------------------- |
| [RayHit](./scene_types#rayhit) | hit  | Information of the first ray hit. |

See also:

* [scene.createRayProber](./scene_functions#createrayprober)
* [scene.createSphereProber](./scene_functions#createsphereprober)
* [scene.rayCastAll](./scene_functions#raycastall)
* [scene.updateRayProber](./scene_functions#updaterayprober)
* [scene.updateSphereProber](./scene_functions#updatesphereprober)

### rayCastAll

```python
scene.rayCastAll(ray, root) -> scene.RayHitList
```

Parameters

| Type                                   | Name | Description                       |
| -------------------------------------- | ---- | --------------------------------- |
| [Ray](./geom_types#ray)                | ray  | The ray to cast.                  |
| [Occurrence](./scene_types#occurrence) | root | The root occurrence to cast from. |

Returns

| Type                                   | Name | Description                       |
| -------------------------------------- | ---- | --------------------------------- |
| [RayHitList](./scene_types#rayhitlist) | hits | Information of the first ray hit. |

See also:

* [scene.createRayProber](./scene_functions#createrayprober)
* [scene.createSphereProber](./scene_functions#createsphereprober)
* [scene.rayCast](./scene_functions#raycast)
* [scene.updateRayProber](./scene_functions#updaterayprober)
* [scene.updateSphereProber](./scene_functions#updatesphereprober)

### updateRayProber

Updates the designed ray prober.

```python
scene.updateRayProber(proberID, ray)
```

Parameters

| Type                        | Name     | Description                     |
| --------------------------- | -------- | ------------------------------- |
| [Ident](./core_types#ident) | proberID | The ray prober Id.              |
| [Ray](./geom_types#ray)     | ray      | Update the prober's ray values. |

See also:

* [scene.createRayProber](./scene_functions#createrayprober)
* [scene.createSphereProber](./scene_functions#createsphereprober)
* [scene.rayCast](./scene_functions#raycast)
* [scene.rayCastAll](./scene_functions#raycastall)
* [scene.updateSphereProber](./scene_functions#updatesphereprober)

### updateSphereProber

Updates the designed sphere prober.

```python
scene.updateSphereProber(proberID, sphereCenter, sphereRadius)
```

Parameters

| Type                            | Name         | Description            |
| ------------------------------- | ------------ | ---------------------- |
| [Ident](./core_types#ident)     | proberID     | The sphere prober Id.  |
| [Vector3](./geom_types#vector3) | sphereCenter | The new prober center. |
| [Double](./core_types#double)   | sphereRadius | The new prober radius. |

See also:

* [scene.createRayProber](./scene_functions#createrayprober)
* [scene.createSphereProber](./scene_functions#createsphereprober)
* [scene.rayCast](./scene_functions#raycast)
* [scene.rayCastAll](./scene_functions#raycastall)
* [scene.updateRayProber](./scene_functions#updaterayprober)

## userData

### getMultipleOccurrenceUserData

Batch version of getOccurrenceUserData.

```python
scene.getMultipleOccurrenceUserData(userDataId, occurrences) -> core.PtrList
```

Parameters

| Type                                                   | Name        | Description                                                    |
| ------------------------------------------------------ | ----------- | -------------------------------------------------------------- |
| [OccurrenceUserData](./scene_types#occurrenceuserdata) | userDataId  | UserData identifier provided by subscribeToOccurrenceUserData. |
| [OccurrenceList](./scene_types#occurrencelist)         | occurrences | Occurrences that store the user data.                          |

Returns

| Type                            | Name         | Description                                 |
| ------------------------------- | ------------ | ------------------------------------------- |
| [PtrList](./core_types#ptrlist) | userDataList | User data stored for each given occurrence. |

See also:

* [scene.getOccurrenceUserData](./scene_functions#getoccurrenceuserdata)
* [scene.getPartUserData](./scene_functions#getpartuserdata)
* [scene.hasMultipleOccurrenceUserData](./scene_functions#hasmultipleoccurrenceuserdata)
* [scene.hasOccurrenceUserData](./scene_functions#hasoccurrenceuserdata)
* [scene.hasPartUserData](./scene_functions#haspartuserdata)
* [scene.setMultipleOccurrenceUserData](./scene_functions#setmultipleoccurrenceuserdata)
* [scene.setOccurrenceUserData](./scene_functions#setoccurrenceuserdata)
* [scene.setPartUserData](./scene_functions#setpartuserdata)
* [scene.subscribeToOccurrenceUserData](./scene_functions#subscribetooccurrenceuserdata)
* [scene.subscribeToPartUserData](./scene_functions#subscribetopartuserdata)
* [scene.unsetMultipleOccurrenceUserData](./scene_functions#unsetmultipleoccurrenceuserdata)
* [scene.unsetOccurrenceUserData](./scene_functions#unsetoccurrenceuserdata)
* [scene.unsetPartUserData](./scene_functions#unsetpartuserdata)
* [scene.unsubscribeFromOccurrenceUserData](./scene_functions#unsubscribefromoccurrenceuserdata)
* [scene.unsubscribeFromPartUserData](./scene_functions#unsubscribefrompartuserdata)

### getOccurrenceUserData

Set or replace a userdata stored on an occurrence.

```python
scene.getOccurrenceUserData(userDataId, occurrence) -> core.Ptr
```

Parameters

| Type                                                   | Name       | Description                                                    |
| ------------------------------------------------------ | ---------- | -------------------------------------------------------------- |
| [OccurrenceUserData](./scene_types#occurrenceuserdata) | userDataId | UserData identifier provided by subscribeToOccurrenceUserData. |
| [Occurrence](./scene_types#occurrence)                 | occurrence | Occurrence that store the user data.                           |

Returns

| Type                    | Name     | Description                               |
| ----------------------- | -------- | ----------------------------------------- |
| [Ptr](./core_types#ptr) | userData | User data stored in the given occurrence. |

See also:

* [scene.getMultipleOccurrenceUserData](./scene_functions#getmultipleoccurrenceuserdata)
* [scene.getPartUserData](./scene_functions#getpartuserdata)
* [scene.hasMultipleOccurrenceUserData](./scene_functions#hasmultipleoccurrenceuserdata)
* [scene.hasOccurrenceUserData](./scene_functions#hasoccurrenceuserdata)
* [scene.hasPartUserData](./scene_functions#haspartuserdata)
* [scene.setMultipleOccurrenceUserData](./scene_functions#setmultipleoccurrenceuserdata)
* [scene.setOccurrenceUserData](./scene_functions#setoccurrenceuserdata)
* [scene.setPartUserData](./scene_functions#setpartuserdata)
* [scene.subscribeToOccurrenceUserData](./scene_functions#subscribetooccurrenceuserdata)
* [scene.subscribeToPartUserData](./scene_functions#subscribetopartuserdata)
* [scene.unsetMultipleOccurrenceUserData](./scene_functions#unsetmultipleoccurrenceuserdata)
* [scene.unsetOccurrenceUserData](./scene_functions#unsetoccurrenceuserdata)
* [scene.unsetPartUserData](./scene_functions#unsetpartuserdata)
* [scene.unsubscribeFromOccurrenceUserData](./scene_functions#unsubscribefromoccurrenceuserdata)
* [scene.unsubscribeFromPartUserData](./scene_functions#unsubscribefrompartuserdata)

### getPartUserData

Set or replace a userdata stored on an Part.

```python
scene.getPartUserData(userDataId, Part) -> core.Ptr
```

Parameters

| Type                                       | Name       | Description                                              |
| ------------------------------------------ | ---------- | -------------------------------------------------------- |
| [PartUserData](./scene_types#partuserdata) | userDataId | UserData identifier provided by subscribeToPartUserData. |
| [Part](./scene_types#part)                 | Part       | Part that store the user data.                           |

Returns

| Type                    | Name     | Description                         |
| ----------------------- | -------- | ----------------------------------- |
| [Ptr](./core_types#ptr) | userData | User data stored in the given Part. |

See also:

* [scene.getMultipleOccurrenceUserData](./scene_functions#getmultipleoccurrenceuserdata)
* [scene.getOccurrenceUserData](./scene_functions#getoccurrenceuserdata)
* [scene.hasMultipleOccurrenceUserData](./scene_functions#hasmultipleoccurrenceuserdata)
* [scene.hasOccurrenceUserData](./scene_functions#hasoccurrenceuserdata)
* [scene.hasPartUserData](./scene_functions#haspartuserdata)
* [scene.setMultipleOccurrenceUserData](./scene_functions#setmultipleoccurrenceuserdata)
* [scene.setOccurrenceUserData](./scene_functions#setoccurrenceuserdata)
* [scene.setPartUserData](./scene_functions#setpartuserdata)
* [scene.subscribeToOccurrenceUserData](./scene_functions#subscribetooccurrenceuserdata)
* [scene.subscribeToPartUserData](./scene_functions#subscribetopartuserdata)
* [scene.unsetMultipleOccurrenceUserData](./scene_functions#unsetmultipleoccurrenceuserdata)
* [scene.unsetOccurrenceUserData](./scene_functions#unsetoccurrenceuserdata)
* [scene.unsetPartUserData](./scene_functions#unsetpartuserdata)
* [scene.unsubscribeFromOccurrenceUserData](./scene_functions#unsubscribefromoccurrenceuserdata)
* [scene.unsubscribeFromPartUserData](./scene_functions#unsubscribefrompartuserdata)

### hasMultipleOccurrenceUserData

Batch version of hasOccurrenceUserData.

```python
scene.hasMultipleOccurrenceUserData(userDataId, occurrences) -> core.BoolList
```

Parameters

| Type                                                   | Name        | Description                                                    |
| ------------------------------------------------------ | ----------- | -------------------------------------------------------------- |
| [OccurrenceUserData](./scene_types#occurrenceuserdata) | userDataId  | UserData identifier provided by subscribeToOccurrenceUserData. |
| [OccurrenceList](./scene_types#occurrencelist)         | occurrences | Occurrences that potentially store the user data.              |

Returns

| Type                              | Name    | Description                                                                                                                  |
| --------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- |
| [BoolList](./core_types#boollist) | results | Returns an array of bool that are true if a userdata is stored on the occurrence at the same index for the given userDataId. |

See also:

* [scene.getMultipleOccurrenceUserData](./scene_functions#getmultipleoccurrenceuserdata)
* [scene.getOccurrenceUserData](./scene_functions#getoccurrenceuserdata)
* [scene.getPartUserData](./scene_functions#getpartuserdata)
* [scene.hasOccurrenceUserData](./scene_functions#hasoccurrenceuserdata)
* [scene.hasPartUserData](./scene_functions#haspartuserdata)
* [scene.setMultipleOccurrenceUserData](./scene_functions#setmultipleoccurrenceuserdata)
* [scene.setOccurrenceUserData](./scene_functions#setoccurrenceuserdata)
* [scene.setPartUserData](./scene_functions#setpartuserdata)
* [scene.subscribeToOccurrenceUserData](./scene_functions#subscribetooccurrenceuserdata)
* [scene.subscribeToPartUserData](./scene_functions#subscribetopartuserdata)
* [scene.unsetMultipleOccurrenceUserData](./scene_functions#unsetmultipleoccurrenceuserdata)
* [scene.unsetOccurrenceUserData](./scene_functions#unsetoccurrenceuserdata)
* [scene.unsetPartUserData](./scene_functions#unsetpartuserdata)
* [scene.unsubscribeFromOccurrenceUserData](./scene_functions#unsubscribefromoccurrenceuserdata)
* [scene.unsubscribeFromPartUserData](./scene_functions#unsubscribefrompartuserdata)

### hasOccurrenceUserData

Set or replace a userdata stored on an occurrence.

```python
scene.hasOccurrenceUserData(userDataId, occurrence) -> core.Bool
```

Parameters

| Type                                                   | Name       | Description                                                    |
| ------------------------------------------------------ | ---------- | -------------------------------------------------------------- |
| [OccurrenceUserData](./scene_types#occurrenceuserdata) | userDataId | UserData identifier provided by subscribeToOccurrenceUserData. |
| [Occurrence](./scene_types#occurrence)                 | occurrence | Occurrence that potentially store the user data.               |

Returns

| Type                      | Name   | Description                                                                       |
| ------------------------- | ------ | --------------------------------------------------------------------------------- |
| [Bool](./core_types#bool) | result | Returns true if a userdata is stored on this occurrence for the given userDataId. |

See also:

* [scene.getMultipleOccurrenceUserData](./scene_functions#getmultipleoccurrenceuserdata)
* [scene.getOccurrenceUserData](./scene_functions#getoccurrenceuserdata)
* [scene.getPartUserData](./scene_functions#getpartuserdata)
* [scene.hasMultipleOccurrenceUserData](./scene_functions#hasmultipleoccurrenceuserdata)
* [scene.hasPartUserData](./scene_functions#haspartuserdata)
* [scene.setMultipleOccurrenceUserData](./scene_functions#setmultipleoccurrenceuserdata)
* [scene.setOccurrenceUserData](./scene_functions#setoccurrenceuserdata)
* [scene.setPartUserData](./scene_functions#setpartuserdata)
* [scene.subscribeToOccurrenceUserData](./scene_functions#subscribetooccurrenceuserdata)
* [scene.subscribeToPartUserData](./scene_functions#subscribetopartuserdata)
* [scene.unsetMultipleOccurrenceUserData](./scene_functions#unsetmultipleoccurrenceuserdata)
* [scene.unsetOccurrenceUserData](./scene_functions#unsetoccurrenceuserdata)
* [scene.unsetPartUserData](./scene_functions#unsetpartuserdata)
* [scene.unsubscribeFromOccurrenceUserData](./scene_functions#unsubscribefromoccurrenceuserdata)
* [scene.unsubscribeFromPartUserData](./scene_functions#unsubscribefrompartuserdata)

### hasPartUserData

Set or replace a userdata stored on an Part.

```python
scene.hasPartUserData(userDataId, Part) -> core.Bool
```

Parameters

| Type                                       | Name       | Description                                              |
| ------------------------------------------ | ---------- | -------------------------------------------------------- |
| [PartUserData](./scene_types#partuserdata) | userDataId | UserData identifier provided by subscribeToPartUserData. |
| [Part](./scene_types#part)                 | Part       | Part that potentially store the user data.               |

Returns

| Type                      | Name   | Description                                                                 |
| ------------------------- | ------ | --------------------------------------------------------------------------- |
| [Bool](./core_types#bool) | result | Returns true if a userdata is stored on this Part for the given userDataId. |

See also:

* [scene.getMultipleOccurrenceUserData](./scene_functions#getmultipleoccurrenceuserdata)
* [scene.getOccurrenceUserData](./scene_functions#getoccurrenceuserdata)
* [scene.getPartUserData](./scene_functions#getpartuserdata)
* [scene.hasMultipleOccurrenceUserData](./scene_functions#hasmultipleoccurrenceuserdata)
* [scene.hasOccurrenceUserData](./scene_functions#hasoccurrenceuserdata)
* [scene.setMultipleOccurrenceUserData](./scene_functions#setmultipleoccurrenceuserdata)
* [scene.setOccurrenceUserData](./scene_functions#setoccurrenceuserdata)
* [scene.setPartUserData](./scene_functions#setpartuserdata)
* [scene.subscribeToOccurrenceUserData](./scene_functions#subscribetooccurrenceuserdata)
* [scene.subscribeToPartUserData](./scene_functions#subscribetopartuserdata)
* [scene.unsetMultipleOccurrenceUserData](./scene_functions#unsetmultipleoccurrenceuserdata)
* [scene.unsetOccurrenceUserData](./scene_functions#unsetoccurrenceuserdata)
* [scene.unsetPartUserData](./scene_functions#unsetpartuserdata)
* [scene.unsubscribeFromOccurrenceUserData](./scene_functions#unsubscribefromoccurrenceuserdata)
* [scene.unsubscribeFromPartUserData](./scene_functions#unsubscribefrompartuserdata)

### setMultipleOccurrenceUserData

Batch version of setOccurrenceUserData.

```python
scene.setMultipleOccurrenceUserData(userDataId, occurrences, userDataList)
```

Parameters

| Type                                                   | Name         | Description                                                    |
| ------------------------------------------------------ | ------------ | -------------------------------------------------------------- |
| [OccurrenceUserData](./scene_types#occurrenceuserdata) | userDataId   | UserData identifier provided by subscribeToOccurrenceUserData. |
| [OccurrenceList](./scene_types#occurrencelist)         | occurrences  | Occurrences that will store the user data.                     |
| [PtrList](./core_types#ptrlist)                        | userDataList | User data to store on each occurrence.                         |

See also:

* [scene.getMultipleOccurrenceUserData](./scene_functions#getmultipleoccurrenceuserdata)
* [scene.getOccurrenceUserData](./scene_functions#getoccurrenceuserdata)
* [scene.getPartUserData](./scene_functions#getpartuserdata)
* [scene.hasMultipleOccurrenceUserData](./scene_functions#hasmultipleoccurrenceuserdata)
* [scene.hasOccurrenceUserData](./scene_functions#hasoccurrenceuserdata)
* [scene.hasPartUserData](./scene_functions#haspartuserdata)
* [scene.setOccurrenceUserData](./scene_functions#setoccurrenceuserdata)
* [scene.setPartUserData](./scene_functions#setpartuserdata)
* [scene.subscribeToOccurrenceUserData](./scene_functions#subscribetooccurrenceuserdata)
* [scene.subscribeToPartUserData](./scene_functions#subscribetopartuserdata)
* [scene.unsetMultipleOccurrenceUserData](./scene_functions#unsetmultipleoccurrenceuserdata)
* [scene.unsetOccurrenceUserData](./scene_functions#unsetoccurrenceuserdata)
* [scene.unsetPartUserData](./scene_functions#unsetpartuserdata)
* [scene.unsubscribeFromOccurrenceUserData](./scene_functions#unsubscribefromoccurrenceuserdata)
* [scene.unsubscribeFromPartUserData](./scene_functions#unsubscribefrompartuserdata)

### setOccurrenceUserData

Set or replace a userdata stored on an occurrence.

```python
scene.setOccurrenceUserData(userDataId, occurrence, userData)
```

Parameters

| Type                                                   | Name       | Description                                                    |
| ------------------------------------------------------ | ---------- | -------------------------------------------------------------- |
| [OccurrenceUserData](./scene_types#occurrenceuserdata) | userDataId | UserData identifier provided by subscribeToOccurrenceUserData. |
| [Occurrence](./scene_types#occurrence)                 | occurrence | Occurrence that will store the user data.                      |
| [Ptr](./core_types#ptr)                                | userData   | User data to store in the given occurrence.                    |

See also:

* [scene.getMultipleOccurrenceUserData](./scene_functions#getmultipleoccurrenceuserdata)
* [scene.getOccurrenceUserData](./scene_functions#getoccurrenceuserdata)
* [scene.getPartUserData](./scene_functions#getpartuserdata)
* [scene.hasMultipleOccurrenceUserData](./scene_functions#hasmultipleoccurrenceuserdata)
* [scene.hasOccurrenceUserData](./scene_functions#hasoccurrenceuserdata)
* [scene.hasPartUserData](./scene_functions#haspartuserdata)
* [scene.setMultipleOccurrenceUserData](./scene_functions#setmultipleoccurrenceuserdata)
* [scene.setPartUserData](./scene_functions#setpartuserdata)
* [scene.subscribeToOccurrenceUserData](./scene_functions#subscribetooccurrenceuserdata)
* [scene.subscribeToPartUserData](./scene_functions#subscribetopartuserdata)
* [scene.unsetMultipleOccurrenceUserData](./scene_functions#unsetmultipleoccurrenceuserdata)
* [scene.unsetOccurrenceUserData](./scene_functions#unsetoccurrenceuserdata)
* [scene.unsetPartUserData](./scene_functions#unsetpartuserdata)
* [scene.unsubscribeFromOccurrenceUserData](./scene_functions#unsubscribefromoccurrenceuserdata)
* [scene.unsubscribeFromPartUserData](./scene_functions#unsubscribefrompartuserdata)

### setPartUserData

Set or replace a userdata stored on an Part.

```python
scene.setPartUserData(userDataId, Part, userData)
```

Parameters

| Type                                       | Name       | Description                                              |
| ------------------------------------------ | ---------- | -------------------------------------------------------- |
| [PartUserData](./scene_types#partuserdata) | userDataId | UserData identifier provided by subscribeToPartUserData. |
| [Part](./scene_types#part)                 | Part       | Part that will store the user data.                      |
| [Ptr](./core_types#ptr)                    | userData   | User data to store in the given Part.                    |

See also:

* [scene.getMultipleOccurrenceUserData](./scene_functions#getmultipleoccurrenceuserdata)
* [scene.getOccurrenceUserData](./scene_functions#getoccurrenceuserdata)
* [scene.getPartUserData](./scene_functions#getpartuserdata)
* [scene.hasMultipleOccurrenceUserData](./scene_functions#hasmultipleoccurrenceuserdata)
* [scene.hasOccurrenceUserData](./scene_functions#hasoccurrenceuserdata)
* [scene.hasPartUserData](./scene_functions#haspartuserdata)
* [scene.setMultipleOccurrenceUserData](./scene_functions#setmultipleoccurrenceuserdata)
* [scene.setOccurrenceUserData](./scene_functions#setoccurrenceuserdata)
* [scene.subscribeToOccurrenceUserData](./scene_functions#subscribetooccurrenceuserdata)
* [scene.subscribeToPartUserData](./scene_functions#subscribetopartuserdata)
* [scene.unsetMultipleOccurrenceUserData](./scene_functions#unsetmultipleoccurrenceuserdata)
* [scene.unsetOccurrenceUserData](./scene_functions#unsetoccurrenceuserdata)
* [scene.unsetPartUserData](./scene_functions#unsetpartuserdata)
* [scene.unsubscribeFromOccurrenceUserData](./scene_functions#unsubscribefromoccurrenceuserdata)
* [scene.unsubscribeFromPartUserData](./scene_functions#unsubscribefrompartuserdata)

### subscribeToOccurrenceUserData

Subscribe to occurrence user data. multiple different userdata can be stored on the same occurrences if subscribeToOccurrenceUserData is called multiple times.

```python
scene.subscribeToOccurrenceUserData() -> scene.OccurrenceUserData
```

Returns

| Type                                                   | Name       | Description                                                       |
| ------------------------------------------------------ | ---------- | ----------------------------------------------------------------- |
| [OccurrenceUserData](./scene_types#occurrenceuserdata) | userDataId | UserData identifier to pass to setUserData/getUserData functions. |

See also:

* [scene.getMultipleOccurrenceUserData](./scene_functions#getmultipleoccurrenceuserdata)
* [scene.getOccurrenceUserData](./scene_functions#getoccurrenceuserdata)
* [scene.getPartUserData](./scene_functions#getpartuserdata)
* [scene.hasMultipleOccurrenceUserData](./scene_functions#hasmultipleoccurrenceuserdata)
* [scene.hasOccurrenceUserData](./scene_functions#hasoccurrenceuserdata)
* [scene.hasPartUserData](./scene_functions#haspartuserdata)
* [scene.setMultipleOccurrenceUserData](./scene_functions#setmultipleoccurrenceuserdata)
* [scene.setOccurrenceUserData](./scene_functions#setoccurrenceuserdata)
* [scene.setPartUserData](./scene_functions#setpartuserdata)
* [scene.subscribeToPartUserData](./scene_functions#subscribetopartuserdata)
* [scene.unsetMultipleOccurrenceUserData](./scene_functions#unsetmultipleoccurrenceuserdata)
* [scene.unsetOccurrenceUserData](./scene_functions#unsetoccurrenceuserdata)
* [scene.unsetPartUserData](./scene_functions#unsetpartuserdata)
* [scene.unsubscribeFromOccurrenceUserData](./scene_functions#unsubscribefromoccurrenceuserdata)
* [scene.unsubscribeFromPartUserData](./scene_functions#unsubscribefrompartuserdata)

### subscribeToPartUserData

Subscribe to Part user data. multiple different userdata can be stored on the same Parts if subscribeToPartUserData is called multiple times.

```python
scene.subscribeToPartUserData() -> scene.PartUserData
```

Returns

| Type                                       | Name       | Description                                                       |
| ------------------------------------------ | ---------- | ----------------------------------------------------------------- |
| [PartUserData](./scene_types#partuserdata) | userDataId | UserData identifier to pass to setUserData/getUserData functions. |

See also:

* [scene.getMultipleOccurrenceUserData](./scene_functions#getmultipleoccurrenceuserdata)
* [scene.getOccurrenceUserData](./scene_functions#getoccurrenceuserdata)
* [scene.getPartUserData](./scene_functions#getpartuserdata)
* [scene.hasMultipleOccurrenceUserData](./scene_functions#hasmultipleoccurrenceuserdata)
* [scene.hasOccurrenceUserData](./scene_functions#hasoccurrenceuserdata)
* [scene.hasPartUserData](./scene_functions#haspartuserdata)
* [scene.setMultipleOccurrenceUserData](./scene_functions#setmultipleoccurrenceuserdata)
* [scene.setOccurrenceUserData](./scene_functions#setoccurrenceuserdata)
* [scene.setPartUserData](./scene_functions#setpartuserdata)
* [scene.subscribeToOccurrenceUserData](./scene_functions#subscribetooccurrenceuserdata)
* [scene.unsetMultipleOccurrenceUserData](./scene_functions#unsetmultipleoccurrenceuserdata)
* [scene.unsetOccurrenceUserData](./scene_functions#unsetoccurrenceuserdata)
* [scene.unsetPartUserData](./scene_functions#unsetpartuserdata)
* [scene.unsubscribeFromOccurrenceUserData](./scene_functions#unsubscribefromoccurrenceuserdata)
* [scene.unsubscribeFromPartUserData](./scene_functions#unsubscribefrompartuserdata)

### unsetMultipleOccurrenceUserData

Batch version of unsetOccurrenceUserData.

```python
scene.unsetMultipleOccurrenceUserData(userDataId, occurrences)
```

Parameters

| Type                                                   | Name        | Description                                                    |
| ------------------------------------------------------ | ----------- | -------------------------------------------------------------- |
| [OccurrenceUserData](./scene_types#occurrenceuserdata) | userDataId  | UserData identifier provided by subscribeToOccurrenceUserData. |
| [OccurrenceList](./scene_types#occurrencelist)         | occurrences | Occurrences that will store the user data.                     |

See also:

* [scene.getMultipleOccurrenceUserData](./scene_functions#getmultipleoccurrenceuserdata)
* [scene.getOccurrenceUserData](./scene_functions#getoccurrenceuserdata)
* [scene.getPartUserData](./scene_functions#getpartuserdata)
* [scene.hasMultipleOccurrenceUserData](./scene_functions#hasmultipleoccurrenceuserdata)
* [scene.hasOccurrenceUserData](./scene_functions#hasoccurrenceuserdata)
* [scene.hasPartUserData](./scene_functions#haspartuserdata)
* [scene.setMultipleOccurrenceUserData](./scene_functions#setmultipleoccurrenceuserdata)
* [scene.setOccurrenceUserData](./scene_functions#setoccurrenceuserdata)
* [scene.setPartUserData](./scene_functions#setpartuserdata)
* [scene.subscribeToOccurrenceUserData](./scene_functions#subscribetooccurrenceuserdata)
* [scene.subscribeToPartUserData](./scene_functions#subscribetopartuserdata)
* [scene.unsetOccurrenceUserData](./scene_functions#unsetoccurrenceuserdata)
* [scene.unsetPartUserData](./scene_functions#unsetpartuserdata)
* [scene.unsubscribeFromOccurrenceUserData](./scene_functions#unsubscribefromoccurrenceuserdata)
* [scene.unsubscribeFromPartUserData](./scene_functions#unsubscribefrompartuserdata)

### unsetOccurrenceUserData

Unset the userdata stored on an occurrence.

```python
scene.unsetOccurrenceUserData(userDataId, occurrence)
```

Parameters

| Type                                                   | Name       | Description                                                    |
| ------------------------------------------------------ | ---------- | -------------------------------------------------------------- |
| [OccurrenceUserData](./scene_types#occurrenceuserdata) | userDataId | UserData identifier provided by subscribeToOccurrenceUserData. |
| [Occurrence](./scene_types#occurrence)                 | occurrence | Occurrence that will store the user data.                      |

See also:

* [scene.getMultipleOccurrenceUserData](./scene_functions#getmultipleoccurrenceuserdata)
* [scene.getOccurrenceUserData](./scene_functions#getoccurrenceuserdata)
* [scene.getPartUserData](./scene_functions#getpartuserdata)
* [scene.hasMultipleOccurrenceUserData](./scene_functions#hasmultipleoccurrenceuserdata)
* [scene.hasOccurrenceUserData](./scene_functions#hasoccurrenceuserdata)
* [scene.hasPartUserData](./scene_functions#haspartuserdata)
* [scene.setMultipleOccurrenceUserData](./scene_functions#setmultipleoccurrenceuserdata)
* [scene.setOccurrenceUserData](./scene_functions#setoccurrenceuserdata)
* [scene.setPartUserData](./scene_functions#setpartuserdata)
* [scene.subscribeToOccurrenceUserData](./scene_functions#subscribetooccurrenceuserdata)
* [scene.subscribeToPartUserData](./scene_functions#subscribetopartuserdata)
* [scene.unsetMultipleOccurrenceUserData](./scene_functions#unsetmultipleoccurrenceuserdata)
* [scene.unsetPartUserData](./scene_functions#unsetpartuserdata)
* [scene.unsubscribeFromOccurrenceUserData](./scene_functions#unsubscribefromoccurrenceuserdata)
* [scene.unsubscribeFromPartUserData](./scene_functions#unsubscribefrompartuserdata)

### unsetPartUserData

Unset the userdata stored on an Part.

```python
scene.unsetPartUserData(userDataId, Part)
```

Parameters

| Type                                       | Name       | Description                                              |
| ------------------------------------------ | ---------- | -------------------------------------------------------- |
| [PartUserData](./scene_types#partuserdata) | userDataId | UserData identifier provided by subscribeToPartUserData. |
| [Part](./scene_types#part)                 | Part       | Part that will store the user data.                      |

See also:

* [scene.getMultipleOccurrenceUserData](./scene_functions#getmultipleoccurrenceuserdata)
* [scene.getOccurrenceUserData](./scene_functions#getoccurrenceuserdata)
* [scene.getPartUserData](./scene_functions#getpartuserdata)
* [scene.hasMultipleOccurrenceUserData](./scene_functions#hasmultipleoccurrenceuserdata)
* [scene.hasOccurrenceUserData](./scene_functions#hasoccurrenceuserdata)
* [scene.hasPartUserData](./scene_functions#haspartuserdata)
* [scene.setMultipleOccurrenceUserData](./scene_functions#setmultipleoccurrenceuserdata)
* [scene.setOccurrenceUserData](./scene_functions#setoccurrenceuserdata)
* [scene.setPartUserData](./scene_functions#setpartuserdata)
* [scene.subscribeToOccurrenceUserData](./scene_functions#subscribetooccurrenceuserdata)
* [scene.subscribeToPartUserData](./scene_functions#subscribetopartuserdata)
* [scene.unsetMultipleOccurrenceUserData](./scene_functions#unsetmultipleoccurrenceuserdata)
* [scene.unsetOccurrenceUserData](./scene_functions#unsetoccurrenceuserdata)
* [scene.unsubscribeFromOccurrenceUserData](./scene_functions#unsubscribefromoccurrenceuserdata)
* [scene.unsubscribeFromPartUserData](./scene_functions#unsubscribefrompartuserdata)

### unsubscribeFromOccurrenceUserData

```python
scene.unsubscribeFromOccurrenceUserData(userDataId)
```

Parameters

| Type                                                   | Name       | Description                         |
| ------------------------------------------------------ | ---------- | ----------------------------------- |
| [OccurrenceUserData](./scene_types#occurrenceuserdata) | userDataId | UserData identifier to unsubscribe. |

See also:

* [scene.getMultipleOccurrenceUserData](./scene_functions#getmultipleoccurrenceuserdata)
* [scene.getOccurrenceUserData](./scene_functions#getoccurrenceuserdata)
* [scene.getPartUserData](./scene_functions#getpartuserdata)
* [scene.hasMultipleOccurrenceUserData](./scene_functions#hasmultipleoccurrenceuserdata)
* [scene.hasOccurrenceUserData](./scene_functions#hasoccurrenceuserdata)
* [scene.hasPartUserData](./scene_functions#haspartuserdata)
* [scene.setMultipleOccurrenceUserData](./scene_functions#setmultipleoccurrenceuserdata)
* [scene.setOccurrenceUserData](./scene_functions#setoccurrenceuserdata)
* [scene.setPartUserData](./scene_functions#setpartuserdata)
* [scene.subscribeToOccurrenceUserData](./scene_functions#subscribetooccurrenceuserdata)
* [scene.subscribeToPartUserData](./scene_functions#subscribetopartuserdata)
* [scene.unsetMultipleOccurrenceUserData](./scene_functions#unsetmultipleoccurrenceuserdata)
* [scene.unsetOccurrenceUserData](./scene_functions#unsetoccurrenceuserdata)
* [scene.unsetPartUserData](./scene_functions#unsetpartuserdata)
* [scene.unsubscribeFromPartUserData](./scene_functions#unsubscribefrompartuserdata)

### unsubscribeFromPartUserData

```python
scene.unsubscribeFromPartUserData(userDataId)
```

Parameters

| Type                                       | Name       | Description                         |
| ------------------------------------------ | ---------- | ----------------------------------- |
| [PartUserData](./scene_types#partuserdata) | userDataId | UserData identifier to unsubscribe. |

See also:

* [scene.getMultipleOccurrenceUserData](./scene_functions#getmultipleoccurrenceuserdata)
* [scene.getOccurrenceUserData](./scene_functions#getoccurrenceuserdata)
* [scene.getPartUserData](./scene_functions#getpartuserdata)
* [scene.hasMultipleOccurrenceUserData](./scene_functions#hasmultipleoccurrenceuserdata)
* [scene.hasOccurrenceUserData](./scene_functions#hasoccurrenceuserdata)
* [scene.hasPartUserData](./scene_functions#haspartuserdata)
* [scene.setMultipleOccurrenceUserData](./scene_functions#setmultipleoccurrenceuserdata)
* [scene.setOccurrenceUserData](./scene_functions#setoccurrenceuserdata)
* [scene.setPartUserData](./scene_functions#setpartuserdata)
* [scene.subscribeToOccurrenceUserData](./scene_functions#subscribetooccurrenceuserdata)
* [scene.subscribeToPartUserData](./scene_functions#subscribetopartuserdata)
* [scene.unsetMultipleOccurrenceUserData](./scene_functions#unsetmultipleoccurrenceuserdata)
* [scene.unsetOccurrenceUserData](./scene_functions#unsetoccurrenceuserdata)
* [scene.unsetPartUserData](./scene_functions#unsetpartuserdata)
* [scene.unsubscribeFromOccurrenceUserData](./scene_functions#unsubscribefromoccurrenceuserdata)

## variant

### addVariant

Create a new variant.

```python
scene.addVariant(name) -> scene.Variant
```

Parameters

| Type                          | Name | Description                  |
| ----------------------------- | ---- | ---------------------------- |
| [String](./core_types#string) | name | The name of the new variant. |

Returns

| Type                             | Name    | Description      |
| -------------------------------- | ------- | ---------------- |
| [Variant](./scene_types#variant) | variant | The new variant. |

See also:

* [scene.duplicateVariant](./scene_functions#duplicatevariant)
* [scene.endModifyAllVariants](./scene_functions#endmodifyallvariants)
* [scene.getVariantComponentsDefinitions](./scene_functions#getvariantcomponentsdefinitions)
* [scene.getVariantTree](./scene_functions#getvarianttree)
* [scene.listVariants](./scene_functions#listvariants)
* [scene.removeVariant](./scene_functions#removevariant)
* [scene.setCurrentVariant](./scene_functions#setcurrentvariant)
* [scene.setVariantTree](./scene_functions#setvarianttree)
* [scene.startModifyAllVariants](./scene_functions#startmodifyallvariants)

### duplicateVariant

Create a new variant which is a copy of an existing variant.

```python
scene.duplicateVariant(variant, name) -> scene.Variant
```

Parameters

| Type                             | Name    | Description                |
| -------------------------------- | ------- | -------------------------- |
| [Variant](./scene_types#variant) | variant | The variant to duplicated. |
| [String](./core_types#string)    | name    | Name of the new variant.   |

Returns

| Type                             | Name       | Description          |
| -------------------------------- | ---------- | -------------------- |
| [Variant](./scene_types#variant) | newVariant | The created variant. |

See also:

* [scene.addVariant](./scene_functions#addvariant)
* [scene.endModifyAllVariants](./scene_functions#endmodifyallvariants)
* [scene.getVariantComponentsDefinitions](./scene_functions#getvariantcomponentsdefinitions)
* [scene.getVariantTree](./scene_functions#getvarianttree)
* [scene.listVariants](./scene_functions#listvariants)
* [scene.removeVariant](./scene_functions#removevariant)
* [scene.setCurrentVariant](./scene_functions#setcurrentvariant)
* [scene.setVariantTree](./scene_functions#setvarianttree)
* [scene.startModifyAllVariants](./scene_functions#startmodifyallvariants)

### endModifyAllVariants

Call this function to disable the modifications of all variants at the same time.

```python
scene.endModifyAllVariants()
```

See also:

* [scene.addVariant](./scene_functions#addvariant)
* [scene.duplicateVariant](./scene_functions#duplicatevariant)
* [scene.getVariantComponentsDefinitions](./scene_functions#getvariantcomponentsdefinitions)
* [scene.getVariantTree](./scene_functions#getvarianttree)
* [scene.listVariants](./scene_functions#listvariants)
* [scene.removeVariant](./scene_functions#removevariant)
* [scene.setCurrentVariant](./scene_functions#setcurrentvariant)
* [scene.setVariantTree](./scene_functions#setvarianttree)
* [scene.startModifyAllVariants](./scene_functions#startmodifyallvariants)

### getVariantComponentsDefinitions

Returns the definitions of multiple variant components.

```python
scene.getVariantComponentsDefinitions(variantComponents) -> scene.VariantDefinitionListList
```

Parameters

| Type                                                       | Name              | Description                                             |
| ---------------------------------------------------------- | ----------------- | ------------------------------------------------------- |
| [VariantComponentList](./scene_types#variantcomponentlist) | variantComponents | The list of variant components to retrieve definitions. |

Returns

| Type                                                                 | Name        | Description                                                                          |
| -------------------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------ |
| [VariantDefinitionListList](./scene_types#variantdefinitionlistlist) | definitions | For each variant component, returns one list of variant definition (one by variant). |

See also:

* [scene.addVariant](./scene_functions#addvariant)
* [scene.duplicateVariant](./scene_functions#duplicatevariant)
* [scene.endModifyAllVariants](./scene_functions#endmodifyallvariants)
* [scene.getVariantTree](./scene_functions#getvarianttree)
* [scene.listVariants](./scene_functions#listvariants)
* [scene.removeVariant](./scene_functions#removevariant)
* [scene.setCurrentVariant](./scene_functions#setcurrentvariant)
* [scene.setVariantTree](./scene_functions#setvarianttree)
* [scene.startModifyAllVariants](./scene_functions#startmodifyallvariants)

### getVariantTree

Get the alternative tree used by this variant.

```python
scene.getVariantTree(variant) -> scene.AlternativeTree
```

Parameters

| Type                             | Name    | Description  |
| -------------------------------- | ------- | ------------ |
| [Variant](./scene_types#variant) | variant | The variant. |

Returns

| Type                                             | Name | Description                                |
| ------------------------------------------------ | ---- | ------------------------------------------ |
| [AlternativeTree](./scene_types#alternativetree) | tree | The alternative tree used by this variant. |

See also:

* [scene.addVariant](./scene_functions#addvariant)
* [scene.duplicateVariant](./scene_functions#duplicatevariant)
* [scene.endModifyAllVariants](./scene_functions#endmodifyallvariants)
* [scene.getVariantComponentsDefinitions](./scene_functions#getvariantcomponentsdefinitions)
* [scene.listVariants](./scene_functions#listvariants)
* [scene.removeVariant](./scene_functions#removevariant)
* [scene.setCurrentVariant](./scene_functions#setcurrentvariant)
* [scene.setVariantTree](./scene_functions#setvarianttree)
* [scene.startModifyAllVariants](./scene_functions#startmodifyallvariants)

### listVariants

Returns all the available variants.

```python
scene.listVariants() -> scene.VariantList
```

Returns

| Type                                     | Name     | Description   |
| ---------------------------------------- | -------- | ------------- |
| [VariantList](./scene_types#variantlist) | variants | All variants. |

See also:

* [scene.addVariant](./scene_functions#addvariant)
* [scene.duplicateVariant](./scene_functions#duplicatevariant)
* [scene.endModifyAllVariants](./scene_functions#endmodifyallvariants)
* [scene.getVariantComponentsDefinitions](./scene_functions#getvariantcomponentsdefinitions)
* [scene.getVariantTree](./scene_functions#getvarianttree)
* [scene.removeVariant](./scene_functions#removevariant)
* [scene.setCurrentVariant](./scene_functions#setcurrentvariant)
* [scene.setVariantTree](./scene_functions#setvarianttree)
* [scene.startModifyAllVariants](./scene_functions#startmodifyallvariants)

### removeVariant

Remove a variant.

```python
scene.removeVariant(variant)
```

Parameters

| Type                             | Name    | Description            |
| -------------------------------- | ------- | ---------------------- |
| [Variant](./scene_types#variant) | variant | The variant to remove. |

See also:

* [scene.addVariant](./scene_functions#addvariant)
* [scene.duplicateVariant](./scene_functions#duplicatevariant)
* [scene.endModifyAllVariants](./scene_functions#endmodifyallvariants)
* [scene.getVariantComponentsDefinitions](./scene_functions#getvariantcomponentsdefinitions)
* [scene.getVariantTree](./scene_functions#getvarianttree)
* [scene.listVariants](./scene_functions#listvariants)
* [scene.setCurrentVariant](./scene_functions#setcurrentvariant)
* [scene.setVariantTree](./scene_functions#setvarianttree)
* [scene.startModifyAllVariants](./scene_functions#startmodifyallvariants)

### setCurrentVariant

Change the current variant used.

```python
scene.setCurrentVariant(variant=None)
```

Parameters

| Type                             | Name    | Description                          |
| -------------------------------- | ------- | ------------------------------------ |
| [Variant](./scene_types#variant) | variant | The variant to enable (can be null). |

See also:

* [scene.addVariant](./scene_functions#addvariant)
* [scene.duplicateVariant](./scene_functions#duplicatevariant)
* [scene.endModifyAllVariants](./scene_functions#endmodifyallvariants)
* [scene.getVariantComponentsDefinitions](./scene_functions#getvariantcomponentsdefinitions)
* [scene.getVariantTree](./scene_functions#getvarianttree)
* [scene.listVariants](./scene_functions#listvariants)
* [scene.removeVariant](./scene_functions#removevariant)
* [scene.setVariantTree](./scene_functions#setvarianttree)
* [scene.startModifyAllVariants](./scene_functions#startmodifyallvariants)

### setVariantTree

Set the alternative tree to use for this variant.

```python
scene.setVariantTree(variant, tree)
```

Parameters

| Type                                             | Name    | Description                                   |
| ------------------------------------------------ | ------- | --------------------------------------------- |
| [Variant](./scene_types#variant)                 | variant | The variant to modify.                        |
| [AlternativeTree](./scene_types#alternativetree) | tree    | The alternative tree to use for this variant. |

See also:

* [scene.addVariant](./scene_functions#addvariant)
* [scene.duplicateVariant](./scene_functions#duplicatevariant)
* [scene.endModifyAllVariants](./scene_functions#endmodifyallvariants)
* [scene.getVariantComponentsDefinitions](./scene_functions#getvariantcomponentsdefinitions)
* [scene.getVariantTree](./scene_functions#getvarianttree)
* [scene.listVariants](./scene_functions#listvariants)
* [scene.removeVariant](./scene_functions#removevariant)
* [scene.setCurrentVariant](./scene_functions#setcurrentvariant)
* [scene.startModifyAllVariants](./scene_functions#startmodifyallvariants)

### startModifyAllVariants

Call this function to to enable the modifications of all variants at the same time.

```python
scene.startModifyAllVariants()
```

See also:

* [scene.addVariant](./scene_functions#addvariant)
* [scene.duplicateVariant](./scene_functions#duplicatevariant)
* [scene.endModifyAllVariants](./scene_functions#endmodifyallvariants)
* [scene.getVariantComponentsDefinitions](./scene_functions#getvariantcomponentsdefinitions)
* [scene.getVariantTree](./scene_functions#getvarianttree)
* [scene.listVariants](./scene_functions#listvariants)
* [scene.removeVariant](./scene_functions#removevariant)
* [scene.setCurrentVariant](./scene_functions#setcurrentvariant)
* [scene.setVariantTree](./scene_functions#setvarianttree)
