Scene
Python API functions
Read time 113 minutesLast updated 8 months ago
addComponent
Add a component to an occurrence.
scene.addComponent(occurrence, componentType) -> scene.Component
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence to add the new component. |
| ComponentType | componentType | Type of the component. |
Returns
Type | Name | Description |
|---|---|---|
| Component | component | The new component added to occurrence. |
addComponents
Add a components to each occurrence in the array.
scene.addComponents(occurrences, componentType) -> scene.ComponentList
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Occurrences that need the component to be added. |
| ComponentType | componentType | Type of the component. |
Returns
Type | Name | Description |
|---|---|---|
| ComponentList | components | Component that were added or retrieved. |
addInParentInstances
Add an instance of prototype's child as child in current occurrence recursively.
scene.addInParentInstances(root)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | root | The occurrence to test. |
cleanUnusedImages
Remove unused images from texture library.
scene.cleanUnusedImages() -> core.Int
Returns
Type | Name | Description |
|---|---|---|
| Int | nbTextureDeleted | The number of texture deleted by the clean. |
cleanUnusedMaterials
Remove unused materials from material library.
scene.cleanUnusedMaterials(cleanImages=False) -> core.Int
Parameters
Type | Name | Description |
|---|---|---|
| Boolean | cleanImages | Call cleanUnusedImages if true. |
Returns
Type | Name | Description |
|---|---|---|
| Int | nbMaterialDeleted | The number of material deleted by the clean. |
computeSubTreeChecksum
Compute the checksum of a sub-tree.
scene.computeSubTreeChecksum(root=None) -> core.String
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | root | Occurrence to compute. |
Returns
Type | Name | Description |
|---|---|---|
| String | checksum |
configureFunctionLogger
scene.configureFunctionLogger(functionName, enableFunction, enableParameters, enableExecutionTime)
Parameters
Type | Name | Description |
|---|---|---|
| String | functionName | |
| Boolean | enableFunction | |
| Boolean | enableParameters | |
| Boolean | enableExecutionTime |
convertMaterialsToColor
Convert all materials to materials with a color pattern, trying to keep the visual aspect as similar as possible.
scene.convertMaterialsToColor(materials=[])
Parameters
Type | Name | Description |
|---|---|---|
| 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.
scene.convertMaterialsToPBR(materials=[])
Parameters
Type | Name | Description |
|---|---|---|
| MaterialList | materials | Materials to merge (merge all materials if empty). |
createOBBMesh
scene.createOBBMesh(occurrence) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | obbOccurrence | The create occurrence. |
createOccurrence
Create a new occurrence.
scene.createOccurrence(name, parent=None) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| String | name | Name of the new occurrence. |
| Occurrence | parent | Create the occurrence as a child of parent, if not set the parent will be root. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | Created occurrence. |
createOccurrenceFromSelection
Create a new occurrence and add the given occurrences as children.
scene.createOccurrenceFromSelection(name, children, parent, keepMaterialAssignment=True) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| String | name | Name of the new occurrence. |
| OccurrenceList | children | Add given occurrence as children (if any). |
| 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 | keepMaterialAssignment | If defined, material assignation will be updated to keep the visual same aspect. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | Created occurrence. |
createOccurrenceFromText
Creates an occurrence from string.
scene.createOccurrenceFromText(text, font="ChicFont", fontSize=64, color=None, heigth3D=40) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| String | text | The occurrence's name. |
| String | font | The font to use. |
| Int | fontSize | The font size. |
| ColorAlpha | color | The occurrence color. |
| Double | heigth3D | 3D height of text. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence |
createOccurrences
Create one new occurrence under each given parent.
scene.createOccurrences(name, parents=None) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| String | name | Name of the new occurrence. |
| 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 | occurrences | Created occurrences. |
createPartsFromMeshes
Create a set of Parts given meshes and occurrences.
scene.createPartsFromMeshes(occurrences, meshes) -> scene.PartList
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | The occurrence which will contains the part component of the mesh at the same index. |
| 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 | 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).
scene.createSceneFromMeshes(meshes, matrices, centerPartPivots=True) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| MeshList | meshes | List of input meshes. |
| Matrix4List | matrices | List of matrices of input meshes (if empty Identity will be used). |
| 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 | root | The created root occurrence. |
deleteComponentByType
Delete component from type.
scene.deleteComponentByType(componentType, occurrence, followPrototypes=True)
Parameters
Type | Name | Description |
|---|---|---|
| ComponentType | componentType | Type of the component. |
| Occurrence | occurrence | The occurrence to remove components from. |
| 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.
scene.deleteComponentsByType(componentType, rootOccurrence=None)
Parameters
Type | Name | Description |
|---|---|---|
| ComponentType | componentType | Type of the component. |
| 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.
scene.deleteEmptyOccurrences(root=0)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | root | Root occurrence for the process. |
deleteOccurrences
Delete a liste of occurrences.
scene.deleteOccurrences(occurrences)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Occurrences to delete. |
generateOctaViews
scene.generateOctaViews(radius, XFrames, YFrames, hemi=False) -> scene.Occurrence
Parameters
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The created Occurrence. |
getAABB
Returns the axis aligned bounding box of a list of occurrences.
scene.getAABB(occurrences, precise=False) -> geom.AABB
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | List of occurrences to retrieve the AABB. |
| 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 | aabb | The axis aligned bounding box of all given occurrences. |
getActiveMaterial
Get the active material on occurrence.
scene.getActiveMaterial(occurrence) -> material.Material
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence. |
Returns
Type | Name | Description |
|---|---|---|
| Material | material | The material. |
getActiveMaterials
Get the active materials on multiple occurrences.
scene.getActiveMaterials(occurrences) -> material.MaterialList
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | The occurrences to retrieve active material on. |
Returns
Type | Name | Description |
|---|---|---|
| MaterialList | materials | The active material for each given occurrence. |
getActivePropertyValue
Get the value of a property on the first parent that own it.
scene.getActivePropertyValue(occurrence, propertyName, cacheProperty=False) -> core.String
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | An occurrence. |
| String | propertyName | Property name. |
| 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 | value | Property value. |
getActivePropertyValues
Get the value of a property on the first parent that own it for each given occurrence.
scene.getActivePropertyValues(occurrences, propertyName, cacheProperty=False) -> core.StringList
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | List of occurrences. |
| String | propertyName | Property name. |
| 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 | values | Property value for each occurrence. |
getAncestors
Returns the list of ancestors for one occurrence.
scene.getAncestors(occurrence) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence to test. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | ancestorList | The list of ancestors. |
getBrepShape
Returns the Brep shape of a part.
scene.getBrepShape(part) -> scene.BRepShape
Parameters
Type | Name | Description |
|---|---|---|
| Part | part | The Part. |
Returns
Type | Name | Description |
|---|---|---|
| BRepShape | brepShape | The brep shape of the part. |
getComponent
Returns a component on an occurrence.
scene.getComponent(occurrence, componentType, followPrototypes=True) -> scene.Component
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence. |
| ComponentType | componentType | Type of the component. |
| 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 | component | The component. |
getComponentByOccurrence
Returns one component of the specified type by occurrence if it exists.
scene.getComponentByOccurrence(occurrences, componentType, followPrototypes=True) -> scene.ComponentList
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | The occurrences list. |
| ComponentType | componentType | Type of the component. |
| 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 | components | List of component synchronized with occurrences. |
getComponentOccurrence
Get the occurrence that own a component.
scene.getComponentOccurrence(component) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| Component | component | The component. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence. |
getComponentType
Get the type of a component.
scene.getComponentType(component) -> scene.ComponentType
Parameters
Type | Name | Description |
|---|---|---|
| Component | component | The component. |
Returns
Type | Name | Description |
|---|---|---|
| ComponentType | componentType | Type of the component. |
getComponents
Returns one component of the specified type by occurrence if it exists.
scene.getComponents(occurrences, componentType, followPrototypes=True) -> scene.ComponentList
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | The occurrences list. |
| ComponentType | componentType | Type of the component. |
| 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 | components | List of component synchronized with occurrences. |
getGlobalMatrices
Returns the global matrix for each given occurrence.
scene.getGlobalMatrices(occurrences) -> geom.Matrix4List
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Nodes to get the local matrix. |
Returns
Type | Name | Description |
|---|---|---|
| Matrix4List | matrices | The global matrix for each given node. |
getGlobalMatrix
Returns the global matrix on an occurrence.
scene.getGlobalMatrix(occurrence) -> geom.Matrix4
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | Occurrence to get the global matrix. |
Returns
Type | Name | Description |
|---|---|---|
| Matrix4 | matrix | The global matrix of the occurrence. |
getGlobalVisibility
Returns the global visibility of a given occurrence.
scene.getGlobalVisibility(occurrence) -> core.Boolean
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | Occurrence to get the global visibility. |
Returns
Type | Name | Description |
|---|---|---|
| Boolean | visible | True if the occurrence is visible, else False. |
getLocalMatrices
Returns the local matrix for each given occurrence.
scene.getLocalMatrices(occurrences) -> geom.Matrix4List
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Nodes to get the local matrix. |
Returns
Type | Name | Description |
|---|---|---|
| Matrix4List | matrices | The local matrix for each given node. |
getLocalMatrix
Returns the local matrix on an occurrence.
scene.getLocalMatrix(occurrence) -> geom.Matrix4
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | Node to get the local matrix. |
Returns
Type | Name | Description |
|---|---|---|
| Matrix4 | matrix | The node local matrix. |
getMBB
Returns the Minimum Bounding Box of a list of occurrences.
scene.getMBB(occurrences, forcedAxis=geom.Vector3(0,0,0)) -> geom.MBB
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | List of occurrences to retrieve the MBB. |
| Vector3 | forcedAxis | Forced axis of the mbb. |
Returns
Type | Name | Description |
|---|---|---|
| MBB | mbb | The minimum bounding box of all given occurrences. |
getMaterialsFromSubtree
scene.getMaterialsFromSubtree(occurrence) -> material.MaterialList
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | Root occurrence of the subtree on which to get the materials and images. |
Returns
Type | Name | Description |
|---|---|---|
| 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).
scene.getOBB(occurrences) -> geom.OBB
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | List of occurrences to retrieve the OBB. |
Returns
Type | Name | Description |
|---|---|---|
| OBB | obb | The oriented bounding box of all given occurrences. |
getOccurrenceActiveMaterial
Returns the active material on a given occurrence.
scene.getOccurrenceActiveMaterial(occurrence) -> material.Material
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | Occurrence to get the active material. |
Returns
Type | Name | Description |
|---|---|---|
| Material | material | The active material of the occurrence. |
getOccurrenceName
Returns the name of an occurrence.
scene.getOccurrenceName(occurrence) -> core.String
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence to get the name. |
Returns
Type | Name | Description |
|---|---|---|
| String | name | The occurrence name. |
getOccurrencesWithComponent
Recursively get all the occurrences containing a component of the specified type.
scene.getOccurrencesWithComponent(componentType, fromOcc=None) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| ComponentType | componentType | The component type. |
| Occurrence | fromOcc | Source occurrence of the recursion. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Result occurrences. |
getPartActiveShape
Returns the active shape of a part.
scene.getPartActiveShape(part) -> scene.Shape
Parameters
Type | Name | Description |
|---|---|---|
| Part | part | The part. |
Returns
Type | Name | Description |
|---|---|---|
| Shape | shape | The active shape of a part. |
getPartLocalMatrix
Returns the local matrix on a part.
scene.getPartLocalMatrix(part) -> geom.Matrix4
Parameters
Type | Name | Description |
|---|---|---|
| Part | part | Part to get the local matrix. |
Returns
Type | Name | Description |
|---|---|---|
| Matrix4 | matrix | The part local matrix. |
getPartOccurrences
Recursively get all the occurrences containing a part component.
scene.getPartOccurrences(fromOcc=None) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | fromOcc | Source occurrence of the recursion. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Result occurrences. |
getPartShapeType
Get the part's shape type.
scene.getPartShapeType(part) -> scene.ShapeType
Parameters
Type | Name | Description |
|---|---|---|
| Part | part | The part to test. |
Returns
Type | Name | Description |
|---|---|---|
| ShapeType | shapeType | Shape's type. |
getPolygonCount
Returns the number of polygon in the parts meshes.
scene.getPolygonCount(occurrences, asTriangleCount=False, countOnceEachInstance=False, countHidden=False) -> core.ULong
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | The part occurrences. |
| Bool | asTriangleCount | If true count the equivalent of triangles for each polygon. |
| Bool | countOnceEachInstance | If true ignore multiple instance of each tessellation. |
| Bool | countHidden | If true, also count hidden components. |
Returns
Type | Name | Description |
|---|---|---|
| ULong | polygonCount | The number of polygons. |
getSubTreeStats
Returns some stats of a sub tree.
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 | roots | The root occurrences to get stats on. |
Returns
Type | Name | Description |
|---|---|---|
| ULong | partCount | Number of parts in the sub-tree (instances are counted once). |
| ULong | partOccurrenceCount | Number of part occurrence in the sub-tree (instances are counted multiple times). |
| ULong | triangleCount | Number of triangles in the sub-tree (instances are counted once, quadrangle count for 2 triangles). |
| ULong | triangleOccurrenceCount | Number of triangles in the sub-tree (instances are counted multiples times, quadrangle count for 2 triangles). |
| ULong | vertexCount | Number of surfacic vertices in the sub-tree (instances are counted once). |
| ULong | vertexOccurrenceCount | Number of surfacic vertices in the sub-tree (instances are counted multiples times). |
| ULong | pointCount | Number of free vertices (points) in the sub-tree (instances are counted once). |
| ULong | pointOccurrenceCount | Number of free vertices (points) in the sub-tree (instances are counted multiples times). |
| ULong | lineCount | Number of free edges (line) in the sub-tree (instances are counted once). |
| ULong | lineOccurrenceCount | Number of free edges (line) in the sub-tree (instances are counted multiples times). |
| ULong | patchesCount | Number of patches in the sub-tree (instances are counted multiples times). |
getVertexCount
Returns the number of vertices in the parts meshes.
scene.getVertexCount(occurrences, countOnceEachInstance=False, countHidden=False, countPoints=False, countMergedVertices=False) -> core.ULong
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | The part occurrences. |
| Bool | countOnceEachInstance | If true ignore multiple instance of each tessellation. |
| Bool | countHidden | If true, also count hidden components. |
| Bool | countPoints | If true, also count points (for points cloud). |
| Bool | countMergedVertices | If true count all merged vertices in each tessellation. |
Returns
Type | Name | Description |
|---|---|---|
| ULong | vertexCount | The number of vertices. |
getViewpointsFromCavities
Returns viewpoints from model cavities.
scene.getViewpointsFromCavities(voxelSize, minCavityVolume) -> geom.Point3List, geom.Point3List
Parameters
Type | Name | Description |
|---|---|---|
| Distance | voxelSize | Precision for cavities detection. |
| Distance | minCavityVolume | Minimum volume for a cavity to be returned. |
Returns
Type | Name | Description |
|---|---|---|
| Point3List | positions | List of viewpoint positions. |
| Point3List | directions | List of viewpoint directions. |
getVolume
Return the volume of the occurrence.
scene.getVolume(occurrence) -> core.Double
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | Entry occurrence. |
Returns
Type | Name | Description |
|---|---|---|
| Double | volume | The computed volume. |
getVolumes
Return the volume of a set of root occurrences.
scene.getVolumes(iRoots) -> core.DoubleList
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | iRoots | List of roots. |
Returns
Type | Name | Description |
|---|---|---|
| DoubleList | volumes | The computed volumes. |
hasComponent
Returns True if the given occurrence has the given component type.
scene.hasComponent(occurrence, componentType, followPrototypes=True) -> core.Boolean
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence. |
| ComponentType | componentType | Type of the component. |
| 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 | hasComp |
hide
Hide the given occurrences.
scene.hide(occurrences)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | The list of occurrences to hide. |
inverseVisibility
Inverse the visibility of the given occurrences.
scene.inverseVisibility(occurrences)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | The list of occurrences. |
isAncestorOf
Test if an occurrence is an ancestor of another one.
scene.isAncestorOf(maybeAncestor, occurrence) -> core.Bool
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | maybeAncestor | The potential ancestor of the occurrence. |
| Occurrence | occurrence | The occurrence to test. |
Returns
Type | Name | Description |
|---|---|---|
| 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.
scene.keepAncestors(occurrences) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | The list that shall be filtered. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | filteredList | The list without descendants of members. |
listComponent
List all components on a type on the whole tree.
scene.listComponent(componentType) -> scene.ComponentList
Parameters
Type | Name | Description |
|---|---|---|
| ComponentType | componentType | The component type. |
Returns
Type | Name | Description |
|---|---|---|
| ComponentList | components | The component list of the type chosen. |
listComponents
List all components on an occurrence.
scene.listComponents(occurrence, followPrototypes=True) -> scene.ComponentList
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence to list the components. |
| Bool | followPrototypes | If true list also components owned by the prototype. |
Returns
Type | Name | Description |
|---|---|---|
| ComponentList | components | The components owned by the occurrence. |
mergeImages
Merge all equivalent images (i.e. with same pixels).
scene.mergeImages(images=[]) -> core.Int
Parameters
Type | Name | Description |
|---|---|---|
| ImageList | images | Images to merge (merge all images if empty). |
Returns
Type | Name | Description |
|---|---|---|
| Int | nbTexture | The number of texture after the merge. |
mergeMaterials
Merge all equivalent materials (i.e. with same appearance).
scene.mergeMaterials(materials=[], evaluateNames=False) -> core.Int
Parameters
Type | Name | Description |
|---|---|---|
| MaterialList | materials | Materials to merge (merge all materials if empty). |
| 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 | nbMaterial | The number of material after the merge. |
removeMaterials
Recursively remove all materials.
scene.removeMaterials(roots=None)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | roots | If specified, remove materials only from the given occurrences and their descendants. |
renameLongOccurrenceName
Truncate names of occurrence with too long names.
scene.renameLongOccurrenceName(maxLength=128)
Parameters
Type | Name | Description |
|---|---|---|
| Int | maxLength | Maximum name length. |
replaceMaterial
Replace a material by another everywhere it is used.
scene.replaceMaterial(originalMaterial, newMaterial, occurrences=None)
Parameters
Type | Name | Description |
|---|---|---|
| Material | originalMaterial | The material to replace everywhere. |
| Material | newMaterial | The new material to set in place of originalMaterial. |
| 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.
scene.resizeTextures(inputMode, resizeMode, replaceTextures=True)
Parameters
Type | Name | Description |
|---|---|---|
| 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 | 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 | replaceTextures | If True, overwrites textures from the selection. |
setComponentOccurrence
Move a component to an occurrence.
scene.setComponentOccurrence(component, occurrence)
Parameters
Type | Name | Description |
|---|---|---|
| Component | component | The component. |
| Occurrence | occurrence | The occurrence. |
setDefaultVariant
Set the default variant.
scene.setDefaultVariant()
setOccurrenceMaterial
Set the material on a occurrence.
scene.setOccurrenceMaterial(occurrence, material)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | Occurrence to set the material. |
| Material | material | The new occurrence material. |
setOccurrenceName
Returns the name of an occurrence.
scene.setOccurrenceName(occurrence, name)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence to get the name. |
| String | name | The occurrence name. |
show
Show the given occurrences.
scene.show(occurrences)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | The list occurrences to show. |
showOnly
Show only the given occurrences.
scene.showOnly(occurrences)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | The list occurrences to show. |
transferCADMaterialsOnPartOccurrences
Set all materials on part occurrences.
scene.transferCADMaterialsOnPartOccurrences(rootOccurrence=None)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | rootOccurrence | Root occurrence. |
transferMaterialsOnPatches
Take the first instance material and set it one the mesh patches.
scene.transferMaterialsOnPatches(rootOccurrence=None)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | rootOccurrence | Root occurrence. |
Clustering
createHierarchicalClusters
Reorganize a sub tree with hierarchical clustering.
scene.createHierarchicalClusters(root, childrenCountByNode=2, minFitting=-1) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | root | Root of the sub-tree to reorganize. |
| Int | childrenCountByNode | Order of the hierarchical tree. |
| Coeff | minFitting | Minimal fitting coefficient to allow 2 nodes to be merged/clustered. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | root | Hierarchical clustering root. |
See also:
generateOctree
Generate a loose octree from the given sub-tree.
scene.generateOctree(occurrence, maxDepth=5, looseFactor=2) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | Root occurrence of the sub-tree. |
| Int | maxDepth | Defines the depth maximum of the octree. |
| Double | looseFactor | Defines the loose factor of the octree. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | rootOctreeId |
See also:
getClusters
Get groups of occurrences based on spatial proximity.
scene.getClusters(occurrences, strategy) -> scene.OccurrenceListList
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Input occurrences. |
| MergeByRegionsStrategy | strategy | Number: number of groups |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceListList | clusters | Groups of occurrences. |
See also:
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.
scene.getPartOccurrencesGroupedBySimilarity(root=0, acceptVolumeRatio=0.01, acceptPolycountRatio=0.1, acceptAABBAxisRatio=0.01, acceptAABBCenterDistance=0.1) -> scene.OccurrenceListList
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | root | Root occurrence for the process. |
| Real | acceptVolumeRatio | If the ratio of volumes of two parts is lower than acceptVolumeRatio, they will be considered duplicated. |
| Real | acceptPolycountRatio | If the ratio of polygon counts of two parts is lower than acceptPolycountRatio, they will be considered duplicated. |
| Real | acceptAABBAxisRatio | If the ratio of AABB axis of two parts is lower than acceptAABBAxisRatio, they will be considered duplicated. |
| 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 | 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:
Create primitives
createCapsule
Create a new capsule.
scene.createCapsule(radius=250, height=250, subdivisionLatitude=16, subdivisionLongitude=16, generateUV=True) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| Double | radius | Radius of the Capsule. |
| Double | height | Height of the Capsule (excluding the two size of half spheres). |
| Int | subdivisionLatitude | Subdivision of the Capsule on the Latitude. |
| Int | subdivisionLongitude | Subdivision of the Capsule (two half spheres) on the Longitude. |
| Boolean | generateUV | Generation of the UV. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The created Occurrence. |
See also:
- scene.createCone
- scene.createCube
- scene.createCylinder
- scene.createImmersion
- scene.createPlane
- scene.createSphere
- scene.createTorus
createCone
Create a new cone.
scene.createCone(bottomRadius=250, height=500, sides=16, generateUV=True) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| Double | bottomRadius | Radius of the bottom of the cone . |
| Double | height | Height of the cone. |
| Int | sides | Number of sides of the cone. |
| Boolean | generateUV | Generation of the UV. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The created Occurrence. |
See also:
- scene.createCapsule
- scene.createCube
- scene.createCylinder
- scene.createImmersion
- scene.createPlane
- scene.createSphere
- scene.createTorus
createCube
Create a new cube.
scene.createCube(sizeX=1000, sizeY=1000, sizeZ=1000, subdivision=1, generateUV=True) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| Double | sizeX | Size of the Cube on the x axis. |
| Double | sizeY | Size of the Cube on the y axis. |
| Double | sizeZ | Size of the Cube on the z axis. |
| Int | subdivision | Subdivision of the Cube on all the axis. |
| Boolean | generateUV | Generation of the UV. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The created Occurrence. |
See also:
- scene.createCapsule
- scene.createCone
- scene.createCylinder
- scene.createImmersion
- scene.createPlane
- scene.createSphere
- scene.createTorus
createCylinder
Create a new cylinder.
scene.createCylinder(radius=250, height=1000, sides=16, generateUV=True) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| Double | radius | Radius of the Cylinder. |
| Double | height | Height of the Cylinder. |
| Int | sides | Number of Sides of the Cylinder. |
| Boolean | generateUV | Generation of the UV. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The created Occurrence. |
See also:
- scene.createCapsule
- scene.createCone
- scene.createCube
- scene.createImmersion
- scene.createPlane
- scene.createSphere
- scene.createTorus
createImmersion
Create a new bagel klein.
scene.createImmersion(radius=2.5, subdivisionX=100, subdivisionY=15) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| Double | radius | Radius of the Immersion. |
| Int | subdivisionX | Subdivision of the Immersion on the Latitude. |
| Int | subdivisionY | Subdivision of the Immersion on the Longitude. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The created Occurrence. |
See also:
- scene.createCapsule
- scene.createCone
- scene.createCube
- scene.createCylinder
- scene.createPlane
- scene.createSphere
- scene.createTorus
createPlane
Create a new plane.
scene.createPlane(sizeX=1000, sizeY=1000, subdivisionX=1, subdivisionY=1, generateUV=True) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| Double | sizeX | Size of the Plane on the x axis. |
| Double | sizeY | Size of the Plane on the y axis. |
| Int | subdivisionX | Subdivision of the Plane on the x axis. |
| Int | subdivisionY | Subdivision of the Plane on the y axis. |
| Boolean | generateUV | Generation of the UV. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The created Occurrence. |
See also:
- scene.createCapsule
- scene.createCone
- scene.createCube
- scene.createCylinder
- scene.createImmersion
- scene.createSphere
- scene.createTorus
createSphere
Create a new sphere.
scene.createSphere(radius=500, subdivisionLatitude=16, subdivisionLongitude=16, generateUV=True) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| Double | radius | Radius of the Sphere. |
| Int | subdivisionLatitude | Subdivision of the Sphere on the Latitude. |
| Int | subdivisionLongitude | Subdivision of the Sphere on the Longitude. |
| Boolean | generateUV | Generation of the UV. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The created Occurrence. |
See also:
- scene.createCapsule
- scene.createCone
- scene.createCube
- scene.createCylinder
- scene.createImmersion
- scene.createPlane
- scene.createTorus
createTorus
Create a new torus.
scene.createTorus(majorRadius=250, minorRadius=75, subdivisionLatitude=16, subdivisionLongitude=16, generateUV=True) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| Double | majorRadius | Major Radius. |
| Double | minorRadius | Minor Radius. |
| Int | subdivisionLatitude | Subdivision of the Torus on the Latitude. |
| Int | subdivisionLongitude | Subdivision of the Torus on the Longitude. |
| Boolean | generateUV | Generation of the UV. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The created Occurrence. |
See also:
- scene.createCapsule
- scene.createCone
- scene.createCube
- scene.createCylinder
- scene.createImmersion
- scene.createPlane
- scene.createSphere
FindBy
findDuplicatedPartOccurrences
Get parts that are duplicated. This does not include each first occurrence of a set of duplicates.
scene.findDuplicatedPartOccurrences(root=0, acceptVolumeRatio=0.01, acceptPolycountRatio=0.1, acceptAABBAxisRatio=0.01, acceptAABBCenterDistance=0.1) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | root | Root occurrence. |
| Real | acceptVolumeRatio | If the ratio of volumes of two parts is lower than acceptVolumeRatio, they will be considered duplicated. |
| Real | acceptPolycountRatio | If the ratio of polygon counts of two parts is lower than acceptPolycountRatio, they will be considered duplicated. |
| Real | acceptAABBAxisRatio | If the ratio of AABB axis of two parts is lower than acceptAABBAxisRatio, they will be considered duplicated. |
| 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 | duplicatedPartOccurrences | The duplicated part occurrences. Contains only the duplicates: it excludes the first occurrence of each set of duplicates. |
See also:
- scene.findOccurrencesByMaterial
- scene.findOccurrencesByMetadata
- scene.findOccurrencesByMetadataValue
- scene.findOccurrencesByProperty
- scene.findPartOccurrencesByActiveMaterial
- scene.findPartOccurrencesByMaximumSize
- scene.findPartOccurrencesByMinimumNumberOfInstances
- scene.findPartOccurrencesByVisibleMaterial
findOccurrencesByMaterial
Get occurrences for which the property "Material" is the given material.
scene.findOccurrencesByMaterial(material) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| Material | material | A material. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | filtered | The list of occurrences meeting the criteria. |
See also:
- scene.findDuplicatedPartOccurrences
- scene.findOccurrencesByMetadata
- scene.findOccurrencesByMetadataValue
- scene.findOccurrencesByProperty
- scene.findPartOccurrencesByActiveMaterial
- scene.findPartOccurrencesByMaximumSize
- scene.findPartOccurrencesByMinimumNumberOfInstances
- scene.findPartOccurrencesByVisibleMaterial
findOccurrencesByMetadata
Returns all occurrences which a metadata property value matches the given regular expression (ECMAScript).
scene.findOccurrencesByMetadata(property, regex, roots=None, caseInsensitive=False) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| String | property | Property name. |
| Regex | regex | Regular expression (ECMAScript). |
| OccurrenceList | roots | If specified, restrict the search from the given roots. |
| Bool | caseInsensitive | If True, the regex will be insensitive to upper and lower cases. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Occurrences which matches the given regular expression. |
See also:
- scene.findDuplicatedPartOccurrences
- scene.findOccurrencesByMaterial
- scene.findOccurrencesByMetadataValue
- scene.findOccurrencesByProperty
- scene.findPartOccurrencesByActiveMaterial
- scene.findPartOccurrencesByMaximumSize
- scene.findPartOccurrencesByMinimumNumberOfInstances
- scene.findPartOccurrencesByVisibleMaterial
findOccurrencesByMetadataValue
Returns all occurrences with a metadata value matching the given regular expression (ECMAScript).
scene.findOccurrencesByMetadataValue(regex, roots=None, caseInsensitive=False) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| Regex | regex | Regular expression (ECMAScript). |
| OccurrenceList | roots | If specified, restrict the search from the given roots. |
| Bool | caseInsensitive | If True, the regex will be insensitive to upper and lower cases. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Occurrences which matches the given regular expression. |
See also:
- scene.findDuplicatedPartOccurrences
- scene.findOccurrencesByMaterial
- scene.findOccurrencesByMetadata
- scene.findOccurrencesByProperty
- scene.findPartOccurrencesByActiveMaterial
- scene.findPartOccurrencesByMaximumSize
- scene.findPartOccurrencesByMinimumNumberOfInstances
- scene.findPartOccurrencesByVisibleMaterial
findOccurrencesByProperty
Returns all occurrences which a property value matches the given regular expression (ECMAScript).
scene.findOccurrencesByProperty(property, regex, roots=None, caseInsensitive=False) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| String | property | Property name. |
| Regex | regex | Regular expression (ECMAScript). |
| OccurrenceList | roots | If specified, restrict the search from the given roots. |
| Bool | caseInsensitive | If True, the regex will be insensitive to upper and lower cases. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Occurrences which matches the given regular expression. |
See also:
- scene.findDuplicatedPartOccurrences
- scene.findOccurrencesByMaterial
- scene.findOccurrencesByMetadata
- scene.findOccurrencesByMetadataValue
- scene.findPartOccurrencesByActiveMaterial
- scene.findPartOccurrencesByMaximumSize
- scene.findPartOccurrencesByMinimumNumberOfInstances
- scene.findPartOccurrencesByVisibleMaterial
findPartOccurrencesByActiveMaterial
Find all part occurrence with a given material as active material (i.e. as seen in the rendering).
scene.findPartOccurrencesByActiveMaterial(material, roots=None) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| Material | material | A material. |
| OccurrenceList | roots | If specified, restrict the search from the given roots. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrence | Occurrences of parts with the given material as active material. |
See also:
- scene.findDuplicatedPartOccurrences
- scene.findOccurrencesByMaterial
- scene.findOccurrencesByMetadata
- scene.findOccurrencesByMetadataValue
- scene.findOccurrencesByProperty
- scene.findPartOccurrencesByMaximumSize
- scene.findPartOccurrencesByMinimumNumberOfInstances
- scene.findPartOccurrencesByVisibleMaterial
findPartOccurrencesByMaximumSize
Get part occurrences by size.
scene.findPartOccurrencesByMaximumSize(roots, maxDiagLength=150, maxSize=-1, getHidden=False) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | roots | Roots occurrences for the process. |
| Distance | maxDiagLength | If the diagonal axis of the bounding box is less than maxDiagLength, part will be filtered. -1 to ignore. |
| Distance | maxSize | If the longer axis of the box is less than maxLength, part will be filtered. -1 to ignore. |
| Boolean | getHidden | If true, hidden part occurrences meeting the criteria will be filtered as well. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | filtered | The list of occurrences meeting the criteria. |
See also:
- scene.findDuplicatedPartOccurrences
- scene.findOccurrencesByMaterial
- scene.findOccurrencesByMetadata
- scene.findOccurrencesByMetadataValue
- scene.findOccurrencesByProperty
- scene.findPartOccurrencesByActiveMaterial
- scene.findPartOccurrencesByMinimumNumberOfInstances
- scene.findPartOccurrencesByVisibleMaterial
findPartOccurrencesByMinimumNumberOfInstances
Get part occurrences with more than "minInstanciationCount" occurrence on the scene.
scene.findPartOccurrencesByMinimumNumberOfInstances(minInstanciationCount=2) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| Int | minInstanciationCount | Min occurrence count. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | filtered | The list of occurrences meeting the criteria. |
See also:
- scene.findDuplicatedPartOccurrences
- scene.findOccurrencesByMaterial
- scene.findOccurrencesByMetadata
- scene.findOccurrencesByMetadataValue
- scene.findOccurrencesByProperty
- scene.findPartOccurrencesByActiveMaterial
- scene.findPartOccurrencesByMaximumSize
- scene.findPartOccurrencesByVisibleMaterial
findPartOccurrencesByVisibleMaterial
Get part occurrences for which the given material is visible in the viewer.
scene.findPartOccurrencesByVisibleMaterial(material) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| Material | material | A material. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | filtered | The list of occurrences meeting the criteria. |
See also:
- scene.findDuplicatedPartOccurrences
- scene.findOccurrencesByMaterial
- scene.findOccurrencesByMetadata
- scene.findOccurrencesByMetadataValue
- scene.findOccurrencesByProperty
- scene.findPartOccurrencesByActiveMaterial
- scene.findPartOccurrencesByMaximumSize
- scene.findPartOccurrencesByMinimumNumberOfInstances
FindIn
findPartOccurrencesInAABB
Find part occurrences in the scene in a given axis aligned bounding box.
scene.findPartOccurrencesInAABB(aabb) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| AABB | aabb | The axis aligned bounding box. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Occurrences found in the given axis aligned bounded box. |
See also:
findPartOccurrencesInBox
Get part occurrences contained in a given box.
scene.findPartOccurrencesInBox(box, strictlyIncludes) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| ExtendedBox | box | The extension box. |
| Boolean | strictlyIncludes | If false, parts only need to intersect the box to be selected. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Part occurrences contained in the box. |
See also:
Hierarchy
createSubTree
Create a complete scene tree.
scene.createSubTree(tree, root=0, replaceRoot=True) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| PackedTree | tree | |
| Occurrence | root | Specify the root occurrence of the scene. |
| 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 | occurrences | Create occurrences (equivalent to tree.occurrences). |
See also:
- scene.getChildren
- scene.getChildrenCount
- scene.getCurrentVariantRoot
- scene.getFirstChild
- scene.getNextSibling
- scene.getOccurrenceAncestors
- scene.getOccurrencesAncestors
- scene.getParent
- scene.getPreviousSibling
- scene.getRoot
- scene.getSubTree
- scene.moveOccurrences
- scene.setParent
getChildren
Get the children of an occurrence.
scene.getChildren(occurrence) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | children | Children occurrences. |
See also:
- scene.createSubTree
- scene.getChildrenCount
- scene.getCurrentVariantRoot
- scene.getFirstChild
- scene.getNextSibling
- scene.getOccurrenceAncestors
- scene.getOccurrencesAncestors
- scene.getParent
- scene.getPreviousSibling
- scene.getRoot
- scene.getSubTree
- scene.moveOccurrences
- scene.setParent
getChildrenCount
Get the children count of an occurrence.
scene.getChildrenCount(occurrence) -> core.Int
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence. |
Returns
Type | Name | Description |
|---|---|---|
| Int | childrenCount | Children count. |
See also:
- scene.createSubTree
- scene.getChildren
- scene.getCurrentVariantRoot
- scene.getFirstChild
- scene.getNextSibling
- scene.getOccurrenceAncestors
- scene.getOccurrencesAncestors
- scene.getParent
- scene.getPreviousSibling
- scene.getRoot
- scene.getSubTree
- scene.moveOccurrences
- scene.setParent
getCurrentVariantRoot
Get the current active root. Returns active variant's root if one or global root.
scene.getCurrentVariantRoot() -> scene.Occurrence
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | root | The active variant root occurrence or global root if no active variant. |
See also:
- scene.createSubTree
- scene.getChildren
- scene.getChildrenCount
- scene.getFirstChild
- scene.getNextSibling
- scene.getOccurrenceAncestors
- scene.getOccurrencesAncestors
- scene.getParent
- scene.getPreviousSibling
- scene.getRoot
- scene.getSubTree
- scene.moveOccurrences
- scene.setParent
getFirstChild
Get the children of an occurrence.
scene.getFirstChild(occurrence) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | child | Child occurrence. |
See also:
- scene.createSubTree
- scene.getChildren
- scene.getChildrenCount
- scene.getCurrentVariantRoot
- scene.getNextSibling
- scene.getOccurrenceAncestors
- scene.getOccurrencesAncestors
- scene.getParent
- scene.getPreviousSibling
- scene.getRoot
- scene.getSubTree
- scene.moveOccurrences
- scene.setParent
getNextSibling
Get the next occurrence in parent children.
scene.getNextSibling(occurrence) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | nextSibling | Next sibling occurrence. |
See also:
- scene.createSubTree
- scene.getChildren
- scene.getChildrenCount
- scene.getCurrentVariantRoot
- scene.getFirstChild
- scene.getOccurrenceAncestors
- scene.getOccurrencesAncestors
- scene.getParent
- scene.getPreviousSibling
- scene.getRoot
- scene.getSubTree
- scene.moveOccurrences
- scene.setParent
getOccurrenceAncestors
Get all ancestors from occurrence until root (occurrence is not included).
scene.getOccurrenceAncestors(occurrence) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence to find ancestors. |
Returns
Type | Name | Description |
|---|---|---|
| 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.getChildren
- scene.getChildrenCount
- scene.getCurrentVariantRoot
- scene.getFirstChild
- scene.getNextSibling
- scene.getOccurrencesAncestors
- scene.getParent
- scene.getPreviousSibling
- scene.getRoot
- scene.getSubTree
- scene.moveOccurrences
- scene.setParent
getOccurrencesAncestors
Batch version of getOccurrenceAncestors.
scene.getOccurrencesAncestors(occurrences) -> scene.OccurrenceListList
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | The list of occurrences to find ancestors. |
Returns
Type | Name | Description |
|---|---|---|
| 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.getChildren
- scene.getChildrenCount
- scene.getCurrentVariantRoot
- scene.getFirstChild
- scene.getNextSibling
- scene.getOccurrenceAncestors
- scene.getParent
- scene.getPreviousSibling
- scene.getRoot
- scene.getSubTree
- scene.moveOccurrences
- scene.setParent
getParent
Get the parent of an occurrence.
scene.getParent(occurrence) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | parent | The parent occurrence. |
See also:
- scene.createSubTree
- scene.getChildren
- scene.getChildrenCount
- scene.getCurrentVariantRoot
- scene.getFirstChild
- scene.getNextSibling
- scene.getOccurrenceAncestors
- scene.getOccurrencesAncestors
- scene.getPreviousSibling
- scene.getRoot
- scene.getSubTree
- scene.moveOccurrences
- scene.setParent
getPreviousSibling
Get the previous occurrence in parent children.
scene.getPreviousSibling(occurrence) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | previousSibling | Previous sibling occurrence. |
See also:
- scene.createSubTree
- scene.getChildren
- scene.getChildrenCount
- scene.getCurrentVariantRoot
- scene.getFirstChild
- scene.getNextSibling
- scene.getOccurrenceAncestors
- scene.getOccurrencesAncestors
- scene.getParent
- scene.getRoot
- scene.getSubTree
- scene.moveOccurrences
- scene.setParent
getRoot
Get the root occurrence of the product structure.
scene.getRoot() -> scene.Occurrence
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | root | The root occurrence. |
See also:
- scene.createSubTree
- scene.getChildren
- scene.getChildrenCount
- scene.getCurrentVariantRoot
- scene.getFirstChild
- scene.getNextSibling
- scene.getOccurrenceAncestors
- scene.getOccurrencesAncestors
- scene.getParent
- scene.getPreviousSibling
- scene.getSubTree
- scene.moveOccurrences
- scene.setParent
getSubTree
Returns a packed version of the whole scene tree.
scene.getSubTree(root=0, visibilityMode=1, depth=-1) -> scene.PackedTree
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | root | Specify the root of the returned scene. |
| VisibilityMode | visibilityMode | The visibility mode. |
| Int | depth | Maximum depth. |
Returns
Type | Name | Description |
|---|---|---|
| PackedTree | tree |
See also:
- scene.createSubTree
- scene.getChildren
- scene.getChildrenCount
- scene.getCurrentVariantRoot
- scene.getFirstChild
- scene.getNextSibling
- scene.getOccurrenceAncestors
- scene.getOccurrencesAncestors
- scene.getParent
- scene.getPreviousSibling
- scene.getRoot
- scene.moveOccurrences
- scene.setParent
moveOccurrences
Move an occurrence, adjusting the transformation to keep objects at the same place in the world space.
scene.moveOccurrences(occurrences, destination, insertBefore=0)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | The occurrences to move. |
| Occurrence | destination | Destination occurrence (the new parent). |
| Occurrence | insertBefore | Occurrence before witch to move, if null append to destination children. |
See also:
- scene.createSubTree
- scene.getChildren
- scene.getChildrenCount
- scene.getCurrentVariantRoot
- scene.getFirstChild
- scene.getNextSibling
- scene.getOccurrenceAncestors
- scene.getOccurrencesAncestors
- scene.getParent
- scene.getPreviousSibling
- scene.getRoot
- scene.getSubTree
- scene.setParent
setParent
Set the parent of an occurrence.
scene.setParent(occurrence, parent, addInParentInstances=False, insertBefore=None, worldPositionStays=False)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence. |
| Occurrence | parent | The parent occurrence. |
| Boolean | addInParentInstances | If True, each occurrence whose prototype is the target parent will generate a child whose prototype is the occurrence itself. |
| Occurrence | insertBefore | Add before this child occurrence in the children list of the parent occurrence. |
| 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.getChildren
- scene.getChildrenCount
- scene.getCurrentVariantRoot
- scene.getFirstChild
- scene.getNextSibling
- scene.getOccurrenceAncestors
- scene.getOccurrencesAncestors
- scene.getParent
- scene.getPreviousSibling
- scene.getRoot
- scene.getSubTree
- scene.moveOccurrences
Lights
addLightComponent
Add a light component to an occurrence.
scene.addLightComponent(occurrence, lightType, color=core.Color(1,1,1,1), power=1.0, cutOff=20.0) -> scene.Component
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence to add the new component. |
| LightType | lightType | The type of the light. |
| Color | color | Color of the light. |
| Double | power | The power of the light. |
| Angle | cutOff | The cutoff angle of the light. |
Returns
Type | Name | Description |
|---|---|---|
| Component | component | The new component added to occurrence. |
See also:
createLight
Create an occurrence with a light component.
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 | name | Name of the light. |
| LightType | lightType | The type of the light. |
| Color | color | Color of the light. |
| Double | power | The power of the light. |
| Angle | cutOff | The cutoff angle of the light. |
| Occurrence | parent | The parent of the light occurrence. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The light created. |
See also:
Metadata
addMetadata
Add a new metadata property to a metadata component.
scene.addMetadata(metadata, name, value)
Parameters
Type | Name | Description |
|---|---|---|
| Metadata | metadata | The metadata component. |
| String | name | The new property name. |
| String | value | The new property value. |
See also:
- scene.addMetadataBlock
- scene.createMetadatasFromDefinitions
- scene.getMetadata
- scene.getMetadatasDefinitions
- scene.removeMetadata
addMetadataBlock
Add a new metadata property to a metadata component.
scene.addMetadataBlock(metadata, names, values)
Parameters
Type | Name | Description |
|---|---|---|
| Metadata | metadata | The metadata component. |
| StringList | names | The new properties names. |
| StringList | values | The new properties values. |
See also:
- scene.addMetadata
- scene.createMetadatasFromDefinitions
- scene.getMetadata
- scene.getMetadatasDefinitions
- scene.removeMetadata
createMetadatasFromDefinitions
Create Metadata components from definitions.
scene.createMetadatasFromDefinitions(occurrences, definitions) -> scene.MetadataList
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | List of occurrences to add the metadata components. |
| MetadataDefinitionList | definitions | List of metadata definition. |
Returns
Type | Name | Description |
|---|---|---|
| MetadataList | metadatas | List of metadata components created from definitions (if definition is empty no component is created). |
See also:
- scene.addMetadata
- scene.addMetadataBlock
- scene.getMetadata
- scene.getMetadatasDefinitions
- scene.removeMetadata
getMetadata
Get a metadata property value from a metadata component.
scene.getMetadata(metadata, name) -> core.String
Parameters
Returns
Type | Name | Description |
|---|---|---|
| String | component | The property value. |
See also:
- scene.addMetadata
- scene.addMetadataBlock
- scene.createMetadatasFromDefinitions
- scene.getMetadatasDefinitions
- scene.removeMetadata
getMetadatasDefinitions
Returns definition of Metadata components.
scene.getMetadatasDefinitions(metadatas) -> scene.MetadataDefinitionList
Parameters
Type | Name | Description |
|---|---|---|
| MetadataList | metadatas | List of metadata component to retrieve definition. |
Returns
Type | Name | Description |
|---|---|---|
| MetadataDefinitionList | definitions | List of metadata definition for each given metadata component. |
See also:
- scene.addMetadata
- scene.addMetadataBlock
- scene.createMetadatasFromDefinitions
- scene.getMetadata
- scene.removeMetadata
removeMetadata
Remove a property from a metadata.
scene.removeMetadata(metadata, name)
Parameters
See also:
- scene.addMetadata
- scene.addMetadataBlock
- scene.createMetadatasFromDefinitions
- scene.getMetadata
- scene.getMetadatasDefinitions
Subpart materials
getMaterialsFromSubPart
Returns a list of all the materials in the set subPartMaterialComponent.
scene.getMaterialsFromSubPart(component) -> material.MaterialList
Parameters
Type | Name | Description |
|---|---|---|
| SubPartMaterialComponent | component | The subPartMaterial Component we want the materials. |
Returns
Type | Name | Description |
|---|---|---|
| MaterialList | materials | All the materials of the subpartMaterial Component. |
See also:
- scene.getSubpartMaterial
- scene.listActiveShapeMaterials
- scene.listSubpartMaterials
- scene.listSubpartVariantMaterials
- scene.setSubpartMaterial
- scene.setSubpartMaterials
- scene.setSubpartVariantMaterials
- scene.setSubpartVariantMaterialsList
- scene.transferSubpartMaterialsOnPatches
getSubpartMaterial
Get a subpart material assignment according to overrides on the scene tree with SubpartMaterial components.
scene.getSubpartMaterial(occurrence, subpartIndex) -> material.Material
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The Occurrence. |
| UInt | subpartIndex | The subpart index. |
Returns
Type | Name | Description |
|---|---|---|
| Material | material | The assigned material. |
See also:
- scene.getMaterialsFromSubPart
- scene.listActiveShapeMaterials
- scene.listSubpartMaterials
- scene.listSubpartVariantMaterials
- scene.setSubpartMaterial
- scene.setSubpartMaterials
- scene.setSubpartVariantMaterials
- scene.setSubpartVariantMaterialsList
- scene.transferSubpartMaterialsOnPatches
listActiveShapeMaterials
List all the materials used in the part shape.
scene.listActiveShapeMaterials(part) -> material.MaterialList
Parameters
Type | Name | Description |
|---|---|---|
| Part | part | The part which contains sub materials. |
Returns
Type | Name | Description |
|---|---|---|
| MaterialList | materials | Used materials. |
See also:
- scene.getMaterialsFromSubPart
- scene.getSubpartMaterial
- scene.listSubpartMaterials
- scene.listSubpartVariantMaterials
- scene.setSubpartMaterial
- scene.setSubpartMaterials
- scene.setSubpartVariantMaterials
- scene.setSubpartVariantMaterialsList
- scene.transferSubpartMaterialsOnPatches
listSubpartMaterials
List all the materials used in the part shape or overrided with a SubpartMaterial component.
scene.listSubpartMaterials(occurrence) -> material.MaterialList
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence which contains sub materials. |
Returns
Type | Name | Description |
|---|---|---|
| MaterialList | materials | Used materials. |
See also:
- scene.getMaterialsFromSubPart
- scene.getSubpartMaterial
- scene.listActiveShapeMaterials
- scene.listSubpartVariantMaterials
- scene.setSubpartMaterial
- scene.setSubpartMaterials
- scene.setSubpartVariantMaterials
- scene.setSubpartVariantMaterialsList
- scene.transferSubpartMaterialsOnPatches
listSubpartVariantMaterials
List all the materials variants in subpart .
scene.listSubpartVariantMaterials(occurrence) -> scene.VariantMaterialList
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence which contains variants. |
Returns
Type | Name | Description |
|---|---|---|
| VariantMaterialList | variantMaterials | List of variant and materials. |
See also:
- scene.getMaterialsFromSubPart
- scene.getSubpartMaterial
- scene.listActiveShapeMaterials
- scene.listSubpartMaterials
- scene.setSubpartMaterial
- scene.setSubpartMaterials
- scene.setSubpartVariantMaterials
- scene.setSubpartVariantMaterialsList
- scene.transferSubpartMaterialsOnPatches
setSubpartMaterial
Set a subpart material assignment using a SubpartMaterial component.
scene.setSubpartMaterial(occurrence, subpartIndex, material)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The Occurrence. |
| UInt | subpartIndex | The subpart index. |
| Material | material | The material. |
See also:
- scene.getMaterialsFromSubPart
- scene.getSubpartMaterial
- scene.listActiveShapeMaterials
- scene.listSubpartMaterials
- scene.listSubpartVariantMaterials
- scene.setSubpartMaterials
- scene.setSubpartVariantMaterials
- scene.setSubpartVariantMaterialsList
- scene.transferSubpartMaterialsOnPatches
setSubpartMaterials
Set multiple subpart materials at once using a SubpartMaterial component.
scene.setSubpartMaterials(occurrence, materials, startIndex=0)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The Occurrence on which to apply the materials. |
| MaterialList | materials | Materials to set. |
| UInt | startIndex | The subpart start index. |
See also:
- scene.getMaterialsFromSubPart
- scene.getSubpartMaterial
- scene.listActiveShapeMaterials
- scene.listSubpartMaterials
- scene.listSubpartVariantMaterials
- scene.setSubpartMaterial
- scene.setSubpartVariantMaterials
- scene.setSubpartVariantMaterialsList
- scene.transferSubpartMaterialsOnPatches
setSubpartVariantMaterials
Set materials in variant .
scene.setSubpartVariantMaterials(occurrence, variantMaterials)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence which contains variants. |
| VariantMaterialList | variantMaterials | List of variant and materials. |
See also:
- scene.getMaterialsFromSubPart
- scene.getSubpartMaterial
- scene.listActiveShapeMaterials
- scene.listSubpartMaterials
- scene.listSubpartVariantMaterials
- scene.setSubpartMaterial
- scene.setSubpartMaterials
- scene.setSubpartVariantMaterialsList
- scene.transferSubpartMaterialsOnPatches
setSubpartVariantMaterialsList
Set all the materials list in variants .
scene.setSubpartVariantMaterialsList(variants, materialListList) -> scene.VariantMaterialList
Parameters
Type | Name | Description |
|---|---|---|
| VariantList | variants | The part which contains variants. |
| MaterialListList | materialListList | The part which contains the list of material variant list. |
Returns
Type | Name | Description |
|---|---|---|
| VariantMaterialList | materialsVariant | List of variant and materials. |
See also:
- scene.getMaterialsFromSubPart
- scene.getSubpartMaterial
- scene.listActiveShapeMaterials
- scene.listSubpartMaterials
- scene.listSubpartVariantMaterials
- scene.setSubpartMaterial
- scene.setSubpartMaterials
- scene.setSubpartVariantMaterials
- scene.transferSubpartMaterialsOnPatches
transferSubpartMaterialsOnPatches
Assign SubpartMaterialComponent materials on the occurrence's part shapes. This might affect other Part in the scene if not singularized before.
scene.transferSubpartMaterialsOnPatches(occurrence)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence which has sub materials assigned. |
See also:
- scene.getMaterialsFromSubPart
- scene.getSubpartMaterial
- scene.listActiveShapeMaterials
- scene.listSubpartMaterials
- scene.listSubpartVariantMaterials
- scene.setSubpartMaterial
- scene.setSubpartMaterials
- scene.setSubpartVariantMaterials
- scene.setSubpartVariantMaterialsList
alternative trees
createAlternativeTree
Create a new alternative tree.
scene.createAlternativeTree(name, root=None) -> scene.AlternativeTree
Parameters
Type | Name | Description |
|---|---|---|
| String | name | The name of the new alternative tree. |
| Occurrence | root | The root occurrence. |
Returns
Type | Name | Description |
|---|---|---|
| AlternativeTree | tree | The new alternative tree. |
See also:
getAlternativeTreeRoot
Returns the root occurrence associated with the given AlternativeTree.
scene.getAlternativeTreeRoot(tree) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| AlternativeTree | tree | Targeted alternative tree. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | root | The root occurrence. |
See also:
listAlternativeTrees
Returns all the available alternative trees.
scene.listAlternativeTrees() -> scene.AlternativeTreeList
Returns
Type | Name | Description |
|---|---|---|
| AlternativeTreeList | trees | All alternative trees. |
See also:
animations
addAnimation
Add an animation in Animation library.
scene.addAnimation(animation)
Parameters
Type | Name | Description |
|---|---|---|
| Animation | animation | Animation to add. |
See also:
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
addKeyframe
Adds a keyframe in the curve.
scene.addKeyframe(channel, time, value) -> scene.Keyframe
Parameters
Type | Name | Description |
|---|---|---|
| AnimChannel | channel | The channel one wants to add a keyframe in. |
| AnimationTime | time | The time. |
| Double | value | The value. |
Returns
Type | Name | Description |
|---|---|---|
| Keyframe | keyframe | The corresponding keyframe. |
See also:
- scene.addAnimation
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
addKeyframeFromCurrentPosition
Adds keyframes in a given AnimChannel based on current position.
scene.addKeyframeFromCurrentPosition(channel, time)
Parameters
Type | Name | Description |
|---|---|---|
| AnimChannel | channel | The channel one wants to add a keyframe in. |
| AnimationTime | time | The time. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
animatesThisOccurrence
Does this Animation animates this Occurrence - or one of its parents (thus animating it indirectly) ?.
scene.animatesThisOccurrence(animation, occurrence) -> core.Bool
Parameters
Type | Name | Description |
|---|---|---|
| Animation | animation | The Animation. |
| Occurrence | occurrence | The supposedly animated occurrence. |
Returns
Type | Name | Description |
|---|---|---|
| Bool | isAnimated | The answer to this question. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
bakeAnimation
Bake an animation. The values are now precalculated and no longer interpolated.
scene.bakeAnimation(animation, occurrence, end, interval)
Parameters
Type | Name | Description |
|---|---|---|
| Animation | animation | The Animation. |
| Occurrence | occurrence | The occurrence. |
| Occurrence | end | The parent occurrence. |
| AnimationTime | interval | The interval. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
createAnimation
Creates an animation, need to use addAnimation when animation is filled.
scene.createAnimation(name) -> scene.Animation
Parameters
Type | Name | Description |
|---|---|---|
| String | name | Name of the animation. |
Returns
Type | Name | Description |
|---|---|---|
| Animation | animation | The created animation. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
createSkeletonMesh
Create a skeleton mesh from a joint component tree.
scene.createSkeletonMesh(root) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | root | Root joint component node. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | skeletonOcc | New occurrence containing the skeleton mesh. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
decimateAnimChannelBySegment
Decimates by segment a given AnimChannel.
scene.decimateAnimChannelBySegment(channel, precision)
Parameters
Type | Name | Description |
|---|---|---|
| AnimChannel | channel | The channel. |
| Double | precision | The precision. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
deleteAnimation
Deletes an animation.
scene.deleteAnimation(animation)
Parameters
Type | Name | Description |
|---|---|---|
| Animation | animation | The created animation. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
deleteEmptyAnimation
Delete all animation that contain 0 keyframes.
scene.deleteEmptyAnimation()
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
displayAllKeyframesFromAnimChannel
Displays info on the selected AnimChannel.
scene.displayAllKeyframesFromAnimChannel(channel)
Parameters
Type | Name | Description |
|---|---|---|
| AnimChannel | channel | The channel. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
displayAllKeyframesFromAnimation
Displays info on the selected animation.
scene.displayAllKeyframesFromAnimation(animation)
Parameters
Type | Name | Description |
|---|---|---|
| Animation | animation | The animation. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
displayValueFromAnimChannelAtTime
Displays the value.
scene.displayValueFromAnimChannelAtTime(channel, time, defaultValue=False)
Parameters
Type | Name | Description |
|---|---|---|
| AnimChannel | channel | The channel. |
| AnimationTime | time | The time. |
| Bool | defaultValue | Show default instead ?. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
getAnimChannelIfExists
Returns the main AnimChannel of an Occurrence according to a given Animation.
scene.getAnimChannelIfExists(animation, occurrence) -> scene.AnimChannel
Parameters
Type | Name | Description |
|---|---|---|
| Animation | animation | The Animation. |
| Occurrence | occurrence | The Occurrence. |
Returns
Type | Name | Description |
|---|---|---|
| AnimChannel | channel | The channel. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
getAnimChannelInfo
Get an animation channel informations.
scene.getAnimChannelInfo(channel) -> scene.AnimChannelInfo
Parameters
Type | Name | Description |
|---|---|---|
| AnimChannel | channel | Animation to get info of. |
Returns
Type | Name | Description |
|---|---|---|
| AnimChannelInfo | channelInfo |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
getAnimChannelOccurrence
Returns the Occurrence related to a given AnimChannel.
scene.getAnimChannelOccurrence(channel) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| AnimChannel | channel | The channel. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The corresponding occurrence. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
getAnimationComponentPropertyBinderLists
Packs all animation-related info in an object.
scene.getAnimationComponentPropertyBinderLists(animationComponent) -> scene.AnimPropertyBinderList
Parameters
Type | Name | Description |
|---|---|---|
| AnimationComponent | animationComponent | Animation to get info of. |
Returns
Type | Name | Description |
|---|---|---|
| AnimPropertyBinderList | animPropertyBinderList |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
getAnimationInfo
Packs all animation-related info in an object.
scene.getAnimationInfo(animation) -> scene.AnimationInfo
Parameters
Type | Name | Description |
|---|---|---|
| Animation | animation | Animation to get info of. |
Returns
Type | Name | Description |
|---|---|---|
| AnimationInfo | animationInfo |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
getAnimationPropertyBinderLists
Packs all animation-related info in an object.
scene.getAnimationPropertyBinderLists(animation) -> scene.AnimPropertyBinderList
Parameters
Type | Name | Description |
|---|---|---|
| Animation | animation | Animation to get info of. |
Returns
Type | Name | Description |
|---|---|---|
| AnimPropertyBinderList | animPropertyBinderList |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
getJointDefinition
Get joint definition from id.
scene.getJointDefinition(joint) -> scene.JointDefinition
Parameters
Type | Name | Description |
|---|---|---|
| Joint | joint | Id of the joint. |
Returns
Type | Name | Description |
|---|---|---|
| JointDefinition | jointDefinition | The jointDefinition matching the id provided. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
getJointDefinitions
Get joint definition from id.
scene.getJointDefinitions(joints) -> scene.JointDefinitionList
Parameters
Type | Name | Description |
|---|---|---|
| JointList | joints | Ids of joints. |
Returns
Type | Name | Description |
|---|---|---|
| JointDefinitionList | jointDefinitions | An array of all jointDefinition matching joint provided. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
getKeyframeParentAnimChannel
Returns the parent AnimChannel of a given Keyframe.
scene.getKeyframeParentAnimChannel(keyframe) -> scene.AnimChannel
Parameters
Type | Name | Description |
|---|---|---|
| Keyframe | keyframe | The keyframe one wants the parent of. |
Returns
Type | Name | Description |
|---|---|---|
| AnimChannel | animChannel | The Parent. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
getKeyframes
Returns a list of all keyframes of a simple animChannel.
scene.getKeyframes(channel) -> scene.KeyframeList
Parameters
Type | Name | Description |
|---|---|---|
| AnimChannel | channel | The channel one wants to extract the keyframs from. |
Returns
Type | Name | Description |
|---|---|---|
| KeyframeList | keyframelist | The list of keyframes. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
getMainChannel
Returns the main AnimChannel of a given AnimChannel.
scene.getMainChannel(channel) -> scene.AnimChannel
Parameters
Type | Name | Description |
|---|---|---|
| AnimChannel | channel | The channel one wants the main of. |
Returns
Type | Name | Description |
|---|---|---|
| AnimChannel | mainChannel | The corresponding main Channel. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
getOccurrenceJoint
Returns the Joint assigned to an occurrence if any.
scene.getOccurrenceJoint(occurrence) -> polygonal.Joint
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence. |
Returns
Type | Name | Description |
|---|---|---|
| Joint | joint | The joint assigned to the given occurrence. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
getParentChannel
Returns (if exists) the parent AnimChannel of a given AnimChannel.
scene.getParentChannel(channel) -> scene.AnimChannel
Parameters
Type | Name | Description |
|---|---|---|
| AnimChannel | channel | The channel one wants the parent of. |
Returns
Type | Name | Description |
|---|---|---|
| AnimChannel | parentChannel | The corresponding parent Channel. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
getSubChannel
Returns the subchannel of a given name from an AnimChannel.
scene.getSubChannel(channel, name) -> scene.AnimChannel
Parameters
Type | Name | Description |
|---|---|---|
| AnimChannel | channel | The channel one wants the subchannel of. |
| String | name | The name of the subchannel. |
Returns
Type | Name | Description |
|---|---|---|
| AnimChannel | subChannel | The corresponding subchannel. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
getSubChannels
Returns all the sub channel of an AnimChannel.
scene.getSubChannels(channel) -> scene.AnimChannelList
Parameters
Type | Name | Description |
|---|---|---|
| AnimChannel | channel | The channel one wants the subchannel of. |
Returns
Type | Name | Description |
|---|---|---|
| AnimChannelList | subChannels | The list of direct sub channels. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
linkPropertyToAnimation
Creates a Binder in an Animation stack to animate an entity's property.
scene.linkPropertyToAnimation(animation, entity, propertyName) -> scene.AnimChannel
Parameters
Type | Name | Description |
|---|---|---|
| Animation | animation | The Animation stack where to put a animated property. |
| Entity | entity | The entity object to animate. |
| String | propertyName | The name of the property to animate. |
Returns
Type | Name | Description |
|---|---|---|
| AnimChannel | mainChannel | The main channel of the binder. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
listAnimations
List all Animations from the scene.
scene.listAnimations() -> scene.AnimationList
Returns
Type | Name | Description |
|---|---|---|
| AnimationList | animList | The list containing animations. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
listMainChannels
List all main AnimChannel from a given Animation.
scene.listMainChannels(animation) -> scene.AnimChannelList
Parameters
Type | Name | Description |
|---|---|---|
| Animation | animation | The Animation one wants to list the channels from. |
Returns
Type | Name | Description |
|---|---|---|
| AnimChannelList | channelList | The list containing the AnimChannels. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
makeDefaultKeyframe
Creates keyframes with the default values of the channel at time 0.
scene.makeDefaultKeyframe(channel)
Parameters
Type | Name | Description |
|---|---|---|
| AnimChannel | channel | The channel. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.moveAnimation
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
moveAnimation
Moving animation.
scene.moveAnimation(animation, target, newParent, interval)
Parameters
Type | Name | Description |
|---|---|---|
| Animation | animation | The Animation. |
| Occurrence | target | The target occurrence. |
| Occurrence | newParent | The new parent occurrence. |
| AnimationTime | interval | The interval. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.removeKeyframe
- scene.unlinkPropertyToAnimation
removeKeyframe
Removes a keyframe in the curve.
scene.removeKeyframe(channel, time)
Parameters
Type | Name | Description |
|---|---|---|
| AnimChannel | channel | The channel one wants to remove a keyframe from. |
| AnimationTime | time | The time. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.unlinkPropertyToAnimation
unlinkPropertyToAnimation
Unlinks a binder.
scene.unlinkPropertyToAnimation(animation, entity, propertyName)
Parameters
Type | Name | Description |
|---|---|---|
| Animation | animation | The Animation stack where to put a animated property. |
| Entity | entity | The entity object to animate. |
| String | propertyName | The name of the property to animate. |
See also:
- scene.addAnimation
- scene.addKeyframe
- scene.addKeyframeFromCurrentPosition
- scene.animatesThisOccurrence
- scene.bakeAnimation
- scene.createAnimation
- scene.createSkeletonMesh
- scene.decimateAnimChannelBySegment
- scene.deleteAnimation
- scene.deleteEmptyAnimation
- scene.displayAllKeyframesFromAnimChannel
- scene.displayAllKeyframesFromAnimation
- scene.displayValueFromAnimChannelAtTime
- scene.getAnimChannelIfExists
- scene.getAnimChannelInfo
- scene.getAnimChannelOccurrence
- scene.getAnimationComponentPropertyBinderLists
- scene.getAnimationInfo
- scene.getAnimationPropertyBinderLists
- scene.getJointDefinition
- scene.getJointDefinitions
- scene.getKeyframeParentAnimChannel
- scene.getKeyframes
- scene.getMainChannel
- scene.getOccurrenceJoint
- scene.getParentChannel
- scene.getSubChannel
- scene.getSubChannels
- scene.linkPropertyToAnimation
- scene.listAnimations
- scene.listMainChannels
- scene.makeDefaultKeyframe
- scene.moveAnimation
- scene.removeKeyframe
debug
getBRepInfos
Get BRep info.
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 | partCount | The part count. |
| Int | totalPartCount | The total part count. |
| Int | vertexCount | The vertex count. |
| Int | totalVertexCount | The total vertex count. |
| Int | edgeCount | The edge count. |
| Int | totalEdgeCount | The total edge count. |
| Int | openShellCount | The open shell count. |
| Int | totalOpenShellCount | The total open shell count. |
| Int | bodyCount | The body count. |
| Int | totalBodyCount | The total body count. |
| Double | area2Dsum | The 2D area sum. |
| Int | boundaryCount | The boundary count. |
| Int | boundaryEdgeCount | The boundary edge count. |
| Int | nonManifoldEdgeCount | The non manifold edge count. |
See also:
getTessellationInfos
Get tessellation info.
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 | root | Occurrence tree root. |
Returns
Type | Name | Description |
|---|---|---|
| Int | partCount | The part count. |
| Int | totalPartCount | The total part count. |
| Int | vertexCount | The vertex count. |
| Int | totalVertexCount | The total vertex count. |
| Int | edgeCount | The edge count. |
| Int | totalEdgeCount | The total edge count. |
| Int | polygonCount | The polygon count. |
| Int | totalPolygonCount | The total polygon count. |
| Int | patchCount | The patch count. |
| Int | totalPatchCount | The total patch count. |
| Int | boundaryCount | The boundary count. |
| Int | boundaryEdgeCount | The boundary edge count. |
| Int | nonManifoldEdgeCount | The non manifold edge count. |
See also:
getTessellationParameters
Get tessellation parameters.
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 | part | The tessellated part. |
Returns
Type | Name | Description |
|---|---|---|
| Double | maxSag | The MaxSag value in mm. |
| Double | maxLength | The maximum length in mm. |
| Double | maxAngle | |
| Bool | createNormals | Whether normals were created. |
| UVGenerationMode | uvGenerationMode | The uv generation mode. |
| Int | uvChannel | The UV channel. |
| Double | uvPadding | The UV padding. |
| Bool | createTangents | Whether tangents were created. |
| Bool | createFreeEdges | Whether free edges were created. |
See also:
Print an occurrence tree on log.
scene.print(root=0)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | root | Occurrence tree root. |
See also:
filters
addFilterToLibrary
Add a filter to the filters library.
scene.addFilterToLibrary(name, expr) -> core.Ident
Parameters
Type | Name | Description |
|---|---|---|
| String | name | Name of the filter. |
| FilterExpression | expr | The filter expression. |
Returns
Type | Name | Description |
|---|---|---|
| Ident | filterId | Identifier of the created filter. |
See also:
- scene.evaluateExpression
- scene.evaluateExpressionOnOccurrences
- scene.evaluateExpressionOnSubTree
- scene.exportFilterLibrary
- scene.findFilterByName
- scene.getFilterExpression
- scene.getFilterFromLibrary
- scene.getFilteredOccurrences
- scene.importFilterLibrary
- scene.listFilterLibrary
- scene.removeFilterFromLibrary
evaluateExpression
Evaluate the given filter expression.
scene.evaluateExpression(filter) -> core.String
Parameters
Type | Name | Description |
|---|---|---|
| FilterExpression | filter | The filter expression. |
Returns
Type | Name | Description |
|---|---|---|
| String | result | Result of the given expression. |
See also:
- scene.addFilterToLibrary
- scene.evaluateExpressionOnOccurrences
- scene.evaluateExpressionOnSubTree
- scene.exportFilterLibrary
- scene.findFilterByName
- scene.getFilterExpression
- scene.getFilterFromLibrary
- scene.getFilteredOccurrences
- scene.importFilterLibrary
- scene.listFilterLibrary
- scene.removeFilterFromLibrary
evaluateExpressionOnOccurrences
Evaluate the given filter expression on all occurrences under the given occurrence and returns the result.
scene.evaluateExpressionOnOccurrences(occurrences, filter) -> core.StringList
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Occurrences on which to evaluate the expression. |
| FilterExpression | filter | The filter expression. |
Returns
Type | Name | Description |
|---|---|---|
| StringList | evaluations | The evaluation of the expression on the occurrence at the same index in given occurrences. |
See also:
- scene.addFilterToLibrary
- scene.evaluateExpression
- scene.evaluateExpressionOnSubTree
- scene.exportFilterLibrary
- scene.findFilterByName
- scene.getFilterExpression
- scene.getFilterFromLibrary
- scene.getFilteredOccurrences
- scene.importFilterLibrary
- scene.listFilterLibrary
- scene.removeFilterFromLibrary
evaluateExpressionOnSubTree
Evaluate the given filter expression on all occurrences under the given occurrence and returns the result.
scene.evaluateExpressionOnSubTree(filter, fromOcc=None) -> scene.OccurrenceList, core.StringList
Parameters
Type | Name | Description |
|---|---|---|
| FilterExpression | filter | The filter expression. |
| Occurrence | fromOcc | Source occurrence of the recursion. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | |
| StringList | evaluations | The evaluation of the expression on the occurrence at the same index in occurrences. |
See also:
- scene.addFilterToLibrary
- scene.evaluateExpression
- scene.evaluateExpressionOnOccurrences
- scene.exportFilterLibrary
- scene.findFilterByName
- scene.getFilterExpression
- scene.getFilterFromLibrary
- scene.getFilteredOccurrences
- scene.importFilterLibrary
- scene.listFilterLibrary
- scene.removeFilterFromLibrary
exportFilterLibrary
Export filters from a given file.
scene.exportFilterLibrary(file)
Parameters
Type | Name | Description |
|---|---|---|
| FilePath | file | File path to export. |
See also:
- scene.addFilterToLibrary
- scene.evaluateExpression
- scene.evaluateExpressionOnOccurrences
- scene.evaluateExpressionOnSubTree
- scene.findFilterByName
- scene.getFilterExpression
- scene.getFilterFromLibrary
- scene.getFilteredOccurrences
- scene.importFilterLibrary
- scene.listFilterLibrary
- scene.removeFilterFromLibrary
findFilterByName
Returns the first filter in the filter library with the given name.
scene.findFilterByName(name) -> scene.Filter
Parameters
Type | Name | Description |
|---|---|---|
| String | name | Name of the filter to retrieve (case sensitive). |
Returns
Type | Name | Description |
|---|---|---|
| Filter | filter | The retrieved filter. |
See also:
- scene.addFilterToLibrary
- scene.evaluateExpression
- scene.evaluateExpressionOnOccurrences
- scene.evaluateExpressionOnSubTree
- scene.exportFilterLibrary
- scene.getFilterExpression
- scene.getFilterFromLibrary
- scene.getFilteredOccurrences
- scene.importFilterLibrary
- scene.listFilterLibrary
- scene.removeFilterFromLibrary
getFilterExpression
Returns the filter expression (string) from a filter id stored in the library.
scene.getFilterExpression(filterId) -> scene.FilterExpression
Parameters
Type | Name | Description |
|---|---|---|
| Ident | filterId | Identifier of the filter to fetch. |
Returns
Type | Name | Description |
|---|---|---|
| FilterExpression | expr | Filter expression. |
See also:
- scene.addFilterToLibrary
- scene.evaluateExpression
- scene.evaluateExpressionOnOccurrences
- scene.evaluateExpressionOnSubTree
- scene.exportFilterLibrary
- scene.findFilterByName
- scene.getFilterFromLibrary
- scene.getFilteredOccurrences
- scene.importFilterLibrary
- scene.listFilterLibrary
- scene.removeFilterFromLibrary
getFilterFromLibrary
Retrieve a filter from the library with its identifier.
scene.getFilterFromLibrary(filterId) -> scene.Filter
Parameters
Type | Name | Description |
|---|---|---|
| Ident | filterId | Identifier of the filter to retrieve. |
Returns
Type | Name | Description |
|---|---|---|
| Filter | filter | The retrieved filter. |
See also:
- scene.addFilterToLibrary
- scene.evaluateExpression
- scene.evaluateExpressionOnOccurrences
- scene.evaluateExpressionOnSubTree
- scene.exportFilterLibrary
- scene.findFilterByName
- scene.getFilterExpression
- scene.getFilteredOccurrences
- scene.importFilterLibrary
- scene.listFilterLibrary
- scene.removeFilterFromLibrary
getFilteredOccurrences
Recursively get all the occurrences validating the given filter expression.
scene.getFilteredOccurrences(filter, fromOcc=None) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| FilterExpression | filter | The filter expression. |
| Occurrence | fromOcc | Source occurrence of the recursion. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Result occurrences. |
See also:
- scene.addFilterToLibrary
- scene.evaluateExpression
- scene.evaluateExpressionOnOccurrences
- scene.evaluateExpressionOnSubTree
- scene.exportFilterLibrary
- scene.findFilterByName
- scene.getFilterExpression
- scene.getFilterFromLibrary
- scene.importFilterLibrary
- scene.listFilterLibrary
- scene.removeFilterFromLibrary
importFilterLibrary
Import filters from a given file.
scene.importFilterLibrary(file)
Parameters
Type | Name | Description |
|---|---|---|
| FilePath | file | File containing the filter library. |
See also:
- scene.addFilterToLibrary
- scene.evaluateExpression
- scene.evaluateExpressionOnOccurrences
- scene.evaluateExpressionOnSubTree
- scene.exportFilterLibrary
- scene.findFilterByName
- scene.getFilterExpression
- scene.getFilterFromLibrary
- scene.getFilteredOccurrences
- scene.listFilterLibrary
- scene.removeFilterFromLibrary
listFilterLibrary
Returns all the filter stored in the filter library.
scene.listFilterLibrary() -> scene.FilterList
Returns
Type | Name | Description |
|---|---|---|
| FilterList | filters | All the filters stored in the filter library. |
See also:
- scene.addFilterToLibrary
- scene.evaluateExpression
- scene.evaluateExpressionOnOccurrences
- scene.evaluateExpressionOnSubTree
- scene.exportFilterLibrary
- scene.findFilterByName
- scene.getFilterExpression
- scene.getFilterFromLibrary
- scene.getFilteredOccurrences
- scene.importFilterLibrary
- scene.removeFilterFromLibrary
removeFilterFromLibrary
Remove a filter from the filters library.
scene.removeFilterFromLibrary(filterId)
Parameters
Type | Name | Description |
|---|---|---|
| Ident | filterId | Identifier of the filter to remove. |
See also:
- scene.addFilterToLibrary
- scene.evaluateExpression
- scene.evaluateExpressionOnOccurrences
- scene.evaluateExpressionOnSubTree
- scene.exportFilterLibrary
- scene.findFilterByName
- scene.getFilterExpression
- scene.getFilterFromLibrary
- scene.getFilteredOccurrences
- scene.importFilterLibrary
- scene.listFilterLibrary
isolate
getIsolatedOccurrences
Get Occurrences currently being isolated.
scene.getIsolatedOccurrences() -> scene.OccurrenceList
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | The list of occurrences isolated. |
See also:
isIsolated
Is in isolate mode.
scene.isIsolated() -> core.Boolean
Returns
Type | Name | Description |
|---|---|---|
| Boolean | isolated | Returns is it in isolated mode. |
See also:
isolate
Enter isolate mode by isolating a subset of the scene for process, export, viewer, ...
scene.isolate(occurrences)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Occurrences to isolate. |
See also:
unisolate
Exit the isolate mode.
scene.unisolate()
See also:
locks
sceneReadLock
Lock the scene to prevent modification while allowing reading from other threads.
scene.sceneReadLock()
See also:
sceneReadUnlock
Unlock the scene for modification.
scene.sceneReadUnlock()
See also:
sceneTryReadLock
Try lock the scene to prevent modification while allowing reading from other threads.
scene.sceneTryReadLock() -> core.Boolean
Returns
Type | Name | Description |
|---|---|---|
| Boolean | sceneLocked | Returns if the scene has been locked. |
See also:
sceneWriteLock
Lock the scene from being read/write by other threads.
scene.sceneWriteLock()
See also:
sceneWriteUnlock
Unlock the scene for modification and reading.
scene.sceneWriteUnlock()
See also:
merging
findPartOccurrencesWithUnstitchedOpenShells
Find Part occurrences containing multiple unstitched openShell entities.
scene.findPartOccurrencesWithUnstitchedOpenShells(root) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | root | Root occurrence. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | unstitchedFacesOccurrences | Unstitched faces occurrences. |
See also:
- scene.mergeOccurrencesByTreeLevel
- scene.mergePartOccurrences
- scene.mergePartOccurrencesByAssemblies
- scene.mergePartOccurrencesByFinalAssemblies
- scene.mergePartOccurrencesByMaterials
- scene.mergePartOccurrencesByName
- scene.mergePartOccurrencesByRegions
- scene.mergePartOccurrencesWithSingleOpenShellByAssemblies
mergeOccurrencesByTreeLevel
Merge all parts over maxLevel level.
scene.mergeOccurrencesByTreeLevel(roots, maxLevel=5, mergeHiddenPartsMode=2)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | roots | Roots occurrences for the process. |
| Int | maxLevel | Maximum tree level. |
| MergeHiddenPartsMode | mergeHiddenPartsMode | Hidden parts handling mode, Destroy them, make visible or merge separately. |
See also:
- scene.findPartOccurrencesWithUnstitchedOpenShells
- scene.mergePartOccurrences
- scene.mergePartOccurrencesByAssemblies
- scene.mergePartOccurrencesByFinalAssemblies
- scene.mergePartOccurrencesByMaterials
- scene.mergePartOccurrencesByName
- scene.mergePartOccurrencesByRegions
- scene.mergePartOccurrencesWithSingleOpenShellByAssemblies
mergePartOccurrences
Merge a set of parts.
scene.mergePartOccurrences(partOccurrences, mergeHiddenPartsMode=2) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | partOccurrences | Occurrence of the parts to merge. |
| MergeHiddenPartsMode | mergeHiddenPartsMode | Hidden parts handling mode, Destroy them, make visible or merge separately. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | mergedOccurrences | Resulting merged occurrences. |
See also:
- scene.findPartOccurrencesWithUnstitchedOpenShells
- scene.mergeOccurrencesByTreeLevel
- scene.mergePartOccurrencesByAssemblies
- scene.mergePartOccurrencesByFinalAssemblies
- scene.mergePartOccurrencesByMaterials
- scene.mergePartOccurrencesByName
- scene.mergePartOccurrencesByRegions
- scene.mergePartOccurrencesWithSingleOpenShellByAssemblies
mergePartOccurrencesByAssemblies
Merge all parts under each assembly together (grouped by shape type: BRep, Tesselled surface, Joint).
scene.mergePartOccurrencesByAssemblies(roots=None, mergeHiddenPartsMode=2)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | roots | Roots occurrences for the process (will not be removed). |
| MergeHiddenPartsMode | mergeHiddenPartsMode | Hidden parts handling mode, Destroy them, make visible or merge separately. |
See also:
- scene.findPartOccurrencesWithUnstitchedOpenShells
- scene.mergeOccurrencesByTreeLevel
- scene.mergePartOccurrences
- scene.mergePartOccurrencesByFinalAssemblies
- scene.mergePartOccurrencesByMaterials
- scene.mergePartOccurrencesByName
- scene.mergePartOccurrencesByRegions
- scene.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).
scene.mergePartOccurrencesByFinalAssemblies(roots=None, mergeHiddenPartsMode=0, CollapseToParent=True)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | roots | Roots occurrences for the process (will not be removed). |
| MergeHiddenPartsMode | mergeHiddenPartsMode | Hidden parts handling mode, Destroy them, make visible or merge separately. |
| Boolean | CollapseToParent | If true, final level unique merged part will replace it's parent. |
See also:
- scene.findPartOccurrencesWithUnstitchedOpenShells
- scene.mergeOccurrencesByTreeLevel
- scene.mergePartOccurrences
- scene.mergePartOccurrencesByAssemblies
- scene.mergePartOccurrencesByMaterials
- scene.mergePartOccurrencesByName
- scene.mergePartOccurrencesByRegions
- scene.mergePartOccurrencesWithSingleOpenShellByAssemblies
mergePartOccurrencesByMaterials
Merge a set of parts by materials.
scene.mergePartOccurrencesByMaterials(partOccurrences, mergeNoMaterials=True, mergeHiddenPartsMode=2, combineMeshes=True) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | partOccurrences | Occurrence of the parts to merge. |
| Boolean | mergeNoMaterials | If true, merge all parts with no active material together, else do not merge them. |
| MergeHiddenPartsMode | mergeHiddenPartsMode | Hidden parts handling mode, Destroy them, make visible or merge separately. |
| Boolean | combineMeshes | If true, explode and remerge the input parts by visible materials. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | mergedOccurrences | Resulting merged occurrences. |
See also:
- scene.findPartOccurrencesWithUnstitchedOpenShells
- scene.mergeOccurrencesByTreeLevel
- scene.mergePartOccurrences
- scene.mergePartOccurrencesByAssemblies
- scene.mergePartOccurrencesByFinalAssemblies
- scene.mergePartOccurrencesByName
- scene.mergePartOccurrencesByRegions
- scene.mergePartOccurrencesWithSingleOpenShellByAssemblies
mergePartOccurrencesByName
Merge all parts by occurrences names.
scene.mergePartOccurrencesByName(root=0, mergeHiddenPartsMode=2)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | root | Root occurrence of the subtree to process. |
| MergeHiddenPartsMode | mergeHiddenPartsMode | Hidden parts handling mode, Destroy them, make visible or merge separately. |
See also:
- scene.findPartOccurrencesWithUnstitchedOpenShells
- scene.mergeOccurrencesByTreeLevel
- scene.mergePartOccurrences
- scene.mergePartOccurrencesByAssemblies
- scene.mergePartOccurrencesByFinalAssemblies
- scene.mergePartOccurrencesByMaterials
- scene.mergePartOccurrencesByRegions
- scene.mergePartOccurrencesWithSingleOpenShellByAssemblies
mergePartOccurrencesByRegions
Merge all parts within the same area.
scene.mergePartOccurrencesByRegions(roots, mergeBy, strategy) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | roots | Roots occurrences for the process (will not be removed). |
| MergeByRegionsStrategy | mergeBy | Number: number of output parts (or regions of parts) |
| MergeStrategy | strategy | Choose the regions merging strategy. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | mergedOccurrences | Resulting merged occurrences. |
See also:
- scene.findPartOccurrencesWithUnstitchedOpenShells
- scene.mergeOccurrencesByTreeLevel
- scene.mergePartOccurrences
- scene.mergePartOccurrencesByAssemblies
- scene.mergePartOccurrencesByFinalAssemblies
- scene.mergePartOccurrencesByMaterials
- scene.mergePartOccurrencesByName
- scene.mergePartOccurrencesWithSingleOpenShellByAssemblies
mergePartOccurrencesWithSingleOpenShellByAssemblies
Merge Part occurrences containing a single openShell entity, by assemblies.
scene.mergePartOccurrencesWithSingleOpenShellByAssemblies(root) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | root | Root of the main assembly to merge. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | mergedOccurrences | List of the merged occurrence that contained only openShell. |
See also:
- scene.findPartOccurrencesWithUnstitchedOpenShells
- scene.mergeOccurrencesByTreeLevel
- scene.mergePartOccurrences
- scene.mergePartOccurrencesByAssemblies
- scene.mergePartOccurrencesByFinalAssemblies
- scene.mergePartOccurrencesByMaterials
- scene.mergePartOccurrencesByName
- scene.mergePartOccurrencesByRegions
modification
applyTransformation
Apply a transformation to the local matrix of an occurrence.
scene.applyTransformation(occurrence, matrix)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | Occurrence to apply the matrix on. |
| Matrix4 | matrix | Transformation to matrix. |
See also:
createSymmetry
Create symmetries from selection.
scene.createSymmetry(occurrences, plane)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Selection of occurrences. |
| AxisPlane | plane | Symmetry plane. |
See also:
rotate
Modify the local matrix of the scene node to apply a rotation.
scene.rotate(occurrence, axis, angle)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | Occurrence to rotate. |
| Vector3 | axis | Axis of rotation. |
| Angle | angle | Angle of rotation. |
See also:
setLocalMatrices
Change the local matrices on a list of occurrences.
scene.setLocalMatrices(occurrencesIds, matrices, batchSize)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrencesIds | List of occurrences on which to set the local matrices. |
| Matrix4List | matrices | The occurrences' new local matrices. |
| UInt | batchSize | Number of matrices to be set per thread. |
See also:
setLocalMatrix
Change the local matrix on an occurrence.
scene.setLocalMatrix(occurrence, matrix)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | Occurrence to set the local matrix. |
| Matrix4 | matrix | The new occurrence local matrix. |
See also:
part
getPartMesh
Return the mesh of the TesselatedShape.
scene.getPartMesh(part) -> polygonal.Mesh
Parameters
Type | Name | Description |
|---|---|---|
| Part | part | The part component. |
Returns
Type | Name | Description |
|---|---|---|
| Mesh | mesh | The mesh of the tessellated shape of the part. |
See also:
- scene.getPartModel
- scene.getPartsMeshes
- scene.getPartsModels
- scene.getPartsTransforms
- scene.getPartsTransformsIndexed
- scene.setPartMesh
- scene.setPartModel
- scene.setPartsTransforms
- scene.setPartsTransformsIndexed
getPartModel
Return the model of the BRepShape.
scene.getPartModel(part) -> cad.Model
Parameters
Type | Name | Description |
|---|---|---|
| Part | part | The part component. |
Returns
Type | Name | Description |
|---|---|---|
| Model | model | The model of the BRep shape of the part. |
See also:
- scene.getPartMesh
- scene.getPartsMeshes
- scene.getPartsModels
- scene.getPartsTransforms
- scene.getPartsTransformsIndexed
- scene.setPartMesh
- scene.setPartModel
- scene.setPartsTransforms
- scene.setPartsTransformsIndexed
getPartsMeshes
Return the meshes of the TesselatedShape for each given parts if any.
scene.getPartsMeshes(parts) -> polygonal.MeshList
Parameters
Type | Name | Description |
|---|---|---|
| PartList | parts | The list of part component. |
Returns
Type | Name | Description |
|---|---|---|
| MeshList | meshes | The list of mesh of the tessellated shape of each part. |
See also:
- scene.getPartMesh
- scene.getPartModel
- scene.getPartsModels
- scene.getPartsTransforms
- scene.getPartsTransformsIndexed
- scene.setPartMesh
- scene.setPartModel
- scene.setPartsTransforms
- scene.setPartsTransformsIndexed
getPartsModels
Return the models of the BRepShape for each given parts if any.
scene.getPartsModels(parts) -> cad.ModelList
Parameters
Type | Name | Description |
|---|---|---|
| PartList | parts | The list of part component. |
Returns
Type | Name | Description |
|---|---|---|
| ModelList | models | The list of models of the BRep shape of each part. |
See also:
- scene.getPartMesh
- scene.getPartModel
- scene.getPartsMeshes
- scene.getPartsTransforms
- scene.getPartsTransformsIndexed
- scene.setPartMesh
- scene.setPartModel
- scene.setPartsTransforms
- scene.setPartsTransformsIndexed
getPartsTransforms
Returns the transform matrix of each given parts.
scene.getPartsTransforms(parts) -> geom.Matrix4List
Parameters
Type | Name | Description |
|---|---|---|
| PartList | parts | The parts to retrieve transform. |
Returns
Type | Name | Description |
|---|---|---|
| Matrix4List | transforms | The transform matrix of each part. |
See also:
- scene.getPartMesh
- scene.getPartModel
- scene.getPartsMeshes
- scene.getPartsModels
- scene.getPartsTransformsIndexed
- scene.setPartMesh
- scene.setPartModel
- scene.setPartsTransforms
- scene.setPartsTransformsIndexed
getPartsTransformsIndexed
Returns the transform matrix of each given parts (indexed mode).
scene.getPartsTransformsIndexed(parts) -> core.IntList, geom.Matrix4List
Parameters
Type | Name | Description |
|---|---|---|
| PartList | parts | The parts to retrieve transform. |
Returns
Type | Name | Description |
|---|---|---|
| IntList | indices | The transform matrix index for each parts (0 for Identity). |
| Matrix4List | transforms | The list of transform matrices (the first is always Identity). |
See also:
- scene.getPartMesh
- scene.getPartModel
- scene.getPartsMeshes
- scene.getPartsModels
- scene.getPartsTransforms
- scene.setPartMesh
- scene.setPartModel
- scene.setPartsTransforms
- scene.setPartsTransformsIndexed
setPartMesh
Add a mesh to a part (create a TessellatedShape on the part).
scene.setPartMesh(part, mesh)
Parameters
See also:
- scene.getPartMesh
- scene.getPartModel
- scene.getPartsMeshes
- scene.getPartsModels
- scene.getPartsTransforms
- scene.getPartsTransformsIndexed
- scene.setPartModel
- scene.setPartsTransforms
- scene.setPartsTransformsIndexed
setPartModel
Add a model to a part (create a BRepShape on the part).
scene.setPartModel(part, model)
Parameters
See also:
- scene.getPartMesh
- scene.getPartModel
- scene.getPartsMeshes
- scene.getPartsModels
- scene.getPartsTransforms
- scene.getPartsTransformsIndexed
- scene.setPartMesh
- scene.setPartsTransforms
- scene.setPartsTransformsIndexed
setPartsTransforms
Set the transform matrix of each given parts.
scene.setPartsTransforms(parts, transforms)
Parameters
Type | Name | Description |
|---|---|---|
| PartList | parts | The parts to retrieve transform. |
| Matrix4List | transforms | The transform matrix of each part. |
See also:
- scene.getPartMesh
- scene.getPartModel
- scene.getPartsMeshes
- scene.getPartsModels
- scene.getPartsTransforms
- scene.getPartsTransformsIndexed
- scene.setPartMesh
- scene.setPartModel
- scene.setPartsTransformsIndexed
setPartsTransformsIndexed
Set the transform matrix of each given parts (indexed mode).
scene.setPartsTransformsIndexed(parts, indices, transforms)
Parameters
Type | Name | Description |
|---|---|---|
| PartList | parts | The parts to retrieve transform. |
| IntList | indices | The transform matrix index for each parts. |
| Matrix4List | transforms | The list of transform matrices. |
See also:
- scene.getPartMesh
- scene.getPartModel
- scene.getPartsMeshes
- scene.getPartsModels
- scene.getPartsTransforms
- scene.getPartsTransformsIndexed
- scene.setPartMesh
- scene.setPartModel
- scene.setPartsTransforms
partialLoading
getPartialLoadingStatus
Get the current status of a partial loading component.
scene.getPartialLoadingStatus(component) -> scene.PartialLoad_Status
Parameters
Type | Name | Description |
|---|---|---|
| ReferencedDataComponent | component | Referenced Data component. |
Returns
Type | Name | Description |
|---|---|---|
| PartialLoad_Status | status | The current status. |
See also:
setReferencedDataComponentParent
Defines which referenced data is parent to the given component.
scene.setReferencedDataComponentParent(component, parent)
Parameters
Type | Name | Description |
|---|---|---|
| ReferencedDataComponent | component | The referenced data component to alter. |
| ReferencedDataComponent | parent | The parent. |
See also:
setReferencedDataComponentPath
Defines which path the referenced data is at.
scene.setReferencedDataComponentPath(component, filePath)
Parameters
Type | Name | Description |
|---|---|---|
| ReferencedDataComponent | component | The referenced data component to alter. |
| String | filePath | The filepath. |
See also:
pivots
alignPivotPointToWorld
Re-orient the Pivot Point straight to world origin (the grid).
scene.alignPivotPointToWorld(occurrences, applyToChildren=False)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | The occurrences to modify. |
| Bool | applyToChildren | If True, all the pivot of the descending occurrences from occurrence will be affected. |
See also:
- scene.movePivotPointToOccurrenceCenter
- scene.movePivotPointToOrigin
- scene.movePivotPointToSelectionCenter
- scene.movePivotPointToTargetedOccurrenceCenter
- scene.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).
scene.movePivotPointToOccurrenceCenter(occurrences, applyToChildren=False)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Occurrences (or the roots occurrences if recursively=True). |
| Bool | applyToChildren | If True, all the pivot of the descending occurrences from occurrence will be affected. |
See also:
- scene.alignPivotPointToWorld
- scene.movePivotPointToOrigin
- scene.movePivotPointToSelectionCenter
- scene.movePivotPointToTargetedOccurrenceCenter
- scene.setPivotOnly
movePivotPointToOrigin
Move the pivot point of an occurrence (and its descendants if recursively) to the origin (0,0,0).
scene.movePivotPointToOrigin(occurrence, applyToChildren=False)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence (or the root occurrence if recursively=True). |
| Bool | applyToChildren | If True, all the pivot of the descending occurrences from occurrence will be affected. |
See also:
- scene.alignPivotPointToWorld
- scene.movePivotPointToOccurrenceCenter
- scene.movePivotPointToSelectionCenter
- scene.movePivotPointToTargetedOccurrenceCenter
- scene.setPivotOnly
movePivotPointToSelectionCenter
Move the pivot point of all given occurrences to the center of all occurrences.
scene.movePivotPointToSelectionCenter(occurrences)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | The occurrences to modify. |
See also:
- scene.alignPivotPointToWorld
- scene.movePivotPointToOccurrenceCenter
- scene.movePivotPointToOrigin
- scene.movePivotPointToTargetedOccurrenceCenter
- scene.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).
scene.movePivotPointToTargetedOccurrenceCenter(occurrences, target, applyToChildren=False)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | The occurrence (or the root occurrence if recursively=True). |
| Occurrence | target | The target occurrence. |
| Bool | applyToChildren | If True, all the pivot of the descending occurrences from occurrence will be affected. |
See also:
- scene.alignPivotPointToWorld
- scene.movePivotPointToOccurrenceCenter
- scene.movePivotPointToOrigin
- scene.movePivotPointToSelectionCenter
- scene.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).
scene.setPivotOnly(occurrence, pivot)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence to move the pivot. |
| Matrix4 | pivot | The new transformation matrix for the occurrence (pivot). |
See also:
- scene.alignPivotPointToWorld
- scene.movePivotPointToOccurrenceCenter
- scene.movePivotPointToOrigin
- scene.movePivotPointToSelectionCenter
- scene.movePivotPointToTargetedOccurrenceCenter
pmi
addAnnotationGroup
Add a Annotation Group to the pmi component.
scene.addAnnotationGroup(component, name) -> scene.AnnotationGroup
Parameters
Type | Name | Description |
|---|---|---|
| PMIComponent | component | Component to add the Annotation Group. |
| String | name | Name of the annotation group. |
Returns
Type | Name | Description |
|---|---|---|
| AnnotationGroup | group | Annotation group created. |
See also:
- scene.addMeshToAnnotation
- scene.convertPMIToOccurrences
- scene.createAnnotationFromDefinition
- scene.createOccurrenceFromAnnotation
- scene.createProductView
- scene.getAnnotationDefinition
- scene.getAnnotationGroups
- scene.getAnnotationListAABB
- scene.getAnnotations
- scene.getOccurrenceAnnotationDefinitions
- scene.getProductViewDefinition
- scene.getProductViewDefinitions
- scene.setAnnotationToGroup
addMeshToAnnotation
Add a mesh and its material to a annotation.
scene.addMeshToAnnotation(annotation, material, staticmesh)
Parameters
Type | Name | Description |
|---|---|---|
| Annotation | annotation | |
| Material | material | |
| StaticMesh | staticmesh |
See also:
- scene.addAnnotationGroup
- scene.convertPMIToOccurrences
- scene.createAnnotationFromDefinition
- scene.createOccurrenceFromAnnotation
- scene.createProductView
- scene.getAnnotationDefinition
- scene.getAnnotationGroups
- scene.getAnnotationListAABB
- scene.getAnnotations
- scene.getOccurrenceAnnotationDefinitions
- scene.getProductViewDefinition
- scene.getProductViewDefinitions
- scene.setAnnotationToGroup
convertPMIToOccurrences
Convert each PMI component into a set of occurrences with mesh geometries.
scene.convertPMIToOccurrences(occurrences, convertVisibility=False)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Occurrence selection. |
| 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.addMeshToAnnotation
- scene.createAnnotationFromDefinition
- scene.createOccurrenceFromAnnotation
- scene.createProductView
- scene.getAnnotationDefinition
- scene.getAnnotationGroups
- scene.getAnnotationListAABB
- scene.getAnnotations
- scene.getOccurrenceAnnotationDefinitions
- scene.getProductViewDefinition
- scene.getProductViewDefinitions
- scene.setAnnotationToGroup
createAnnotationFromDefinition
Create Annotation from definition.
scene.createAnnotationFromDefinition(definition) -> scene.Annotation
Parameters
Type | Name | Description |
|---|---|---|
| AnnotationDefinition | definition | Annotation definition. |
Returns
Type | Name | Description |
|---|---|---|
| Annotation | metadata | Annotation created from definition. |
See also:
- scene.addAnnotationGroup
- scene.addMeshToAnnotation
- scene.convertPMIToOccurrences
- scene.createOccurrenceFromAnnotation
- scene.createProductView
- scene.getAnnotationDefinition
- scene.getAnnotationGroups
- scene.getAnnotationListAABB
- scene.getAnnotations
- scene.getOccurrenceAnnotationDefinitions
- scene.getProductViewDefinition
- scene.getProductViewDefinitions
- scene.setAnnotationToGroup
createOccurrenceFromAnnotation
Convert a single annotation on an occurrence into an occurrence with mesh geometry.
scene.createOccurrenceFromAnnotation(annotation, convertVisibility=False) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| Annotation | annotation | Annotation that shall be converted to an occurrence with mesh geometry. |
| 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 | newOccurrence | Annotation as occurrence with mesh geometry. |
See also:
- scene.addAnnotationGroup
- scene.addMeshToAnnotation
- scene.convertPMIToOccurrences
- scene.createAnnotationFromDefinition
- scene.createProductView
- scene.getAnnotationDefinition
- scene.getAnnotationGroups
- scene.getAnnotationListAABB
- scene.getAnnotations
- scene.getOccurrenceAnnotationDefinitions
- scene.getProductViewDefinition
- scene.getProductViewDefinitions
- scene.setAnnotationToGroup
createProductView
Create a productview from definition.
scene.createProductView(definition) -> scene.ProductView
Parameters
Type | Name | Description |
|---|---|---|
| ProductViewDefinition | definition |
Returns
Type | Name | Description |
|---|---|---|
| ProductView | view | The product view. |
See also:
- scene.addAnnotationGroup
- scene.addMeshToAnnotation
- scene.convertPMIToOccurrences
- scene.createAnnotationFromDefinition
- scene.createOccurrenceFromAnnotation
- scene.getAnnotationDefinition
- scene.getAnnotationGroups
- scene.getAnnotationListAABB
- scene.getAnnotations
- scene.getOccurrenceAnnotationDefinitions
- scene.getProductViewDefinition
- scene.getProductViewDefinitions
- scene.setAnnotationToGroup
getAnnotationDefinition
Get definition of given annotation.
scene.getAnnotationDefinition(annotation) -> scene.AnnotationDefinition
Parameters
Type | Name | Description |
|---|---|---|
| Annotation | annotation |
Returns
Type | Name | Description |
|---|---|---|
| AnnotationDefinition | definition |
See also:
- scene.addAnnotationGroup
- scene.addMeshToAnnotation
- scene.convertPMIToOccurrences
- scene.createAnnotationFromDefinition
- scene.createOccurrenceFromAnnotation
- scene.createProductView
- scene.getAnnotationGroups
- scene.getAnnotationListAABB
- scene.getAnnotations
- scene.getOccurrenceAnnotationDefinitions
- scene.getProductViewDefinition
- scene.getProductViewDefinitions
- scene.setAnnotationToGroup
getAnnotationGroups
Returns the list of the AnnotationGroup from a PMIComponent.
scene.getAnnotationGroups(pmiComponent) -> scene.AnnotationGroupList
Parameters
Type | Name | Description |
|---|---|---|
| Component | pmiComponent | The pmi component. |
Returns
Type | Name | Description |
|---|---|---|
| AnnotationGroupList | groups | List of AnnotationGroup. |
See also:
- scene.addAnnotationGroup
- scene.addMeshToAnnotation
- scene.convertPMIToOccurrences
- scene.createAnnotationFromDefinition
- scene.createOccurrenceFromAnnotation
- scene.createProductView
- scene.getAnnotationDefinition
- scene.getAnnotationListAABB
- scene.getAnnotations
- scene.getOccurrenceAnnotationDefinitions
- scene.getProductViewDefinition
- scene.getProductViewDefinitions
- scene.setAnnotationToGroup
getAnnotationListAABB
Get the AABB of the annotation list.
scene.getAnnotationListAABB(annotationList) -> geom.AABB
Parameters
Type | Name | Description |
|---|---|---|
| AnnotationList | annotationList |
Returns
Type | Name | Description |
|---|---|---|
| AABB | aabb | The axis aligned bounding box of the given annotation list. |
See also:
- scene.addAnnotationGroup
- scene.addMeshToAnnotation
- scene.convertPMIToOccurrences
- scene.createAnnotationFromDefinition
- scene.createOccurrenceFromAnnotation
- scene.createProductView
- scene.getAnnotationDefinition
- scene.getAnnotationGroups
- scene.getAnnotations
- scene.getOccurrenceAnnotationDefinitions
- scene.getProductViewDefinition
- scene.getProductViewDefinitions
- scene.setAnnotationToGroup
getAnnotations
Returns the list of the Annotation from a AnnotationGroup.
scene.getAnnotations(group) -> scene.AnnotationList
Parameters
Type | Name | Description |
|---|---|---|
| AnnotationGroup | group | The AnnotationGroup. |
Returns
Type | Name | Description |
|---|---|---|
| AnnotationList | annotations | List of Annotation. |
See also:
- scene.addAnnotationGroup
- scene.addMeshToAnnotation
- scene.convertPMIToOccurrences
- scene.createAnnotationFromDefinition
- scene.createOccurrenceFromAnnotation
- scene.createProductView
- scene.getAnnotationDefinition
- scene.getAnnotationGroups
- scene.getAnnotationListAABB
- scene.getOccurrenceAnnotationDefinitions
- scene.getProductViewDefinition
- scene.getProductViewDefinitions
- scene.setAnnotationToGroup
getOccurrenceAnnotationDefinitions
Get all annotations definition of given occurrence.
scene.getOccurrenceAnnotationDefinitions(occurrence) -> scene.AnnotationDefinitionList
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence |
Returns
Type | Name | Description |
|---|---|---|
| AnnotationDefinitionList | definitions |
See also:
- scene.addAnnotationGroup
- scene.addMeshToAnnotation
- scene.convertPMIToOccurrences
- scene.createAnnotationFromDefinition
- scene.createOccurrenceFromAnnotation
- scene.createProductView
- scene.getAnnotationDefinition
- scene.getAnnotationGroups
- scene.getAnnotationListAABB
- scene.getAnnotations
- scene.getProductViewDefinition
- scene.getProductViewDefinitions
- scene.setAnnotationToGroup
getProductViewDefinition
Get productview definition.
scene.getProductViewDefinition(view) -> scene.ProductViewDefinition
Parameters
Type | Name | Description |
|---|---|---|
| Variant | view | The product view. |
Returns
Type | Name | Description |
|---|---|---|
| ProductViewDefinition | definition |
See also:
- scene.addAnnotationGroup
- scene.addMeshToAnnotation
- scene.convertPMIToOccurrences
- scene.createAnnotationFromDefinition
- scene.createOccurrenceFromAnnotation
- scene.createProductView
- scene.getAnnotationDefinition
- scene.getAnnotationGroups
- scene.getAnnotationListAABB
- scene.getAnnotations
- scene.getOccurrenceAnnotationDefinitions
- scene.getProductViewDefinitions
- scene.setAnnotationToGroup
getProductViewDefinitions
Get all productviews definitions.
scene.getProductViewDefinitions() -> scene.ProductViewDefinitionList
Returns
Type | Name | Description |
|---|---|---|
| ProductViewDefinitionList | definitions |
See also:
- scene.addAnnotationGroup
- scene.addMeshToAnnotation
- scene.convertPMIToOccurrences
- scene.createAnnotationFromDefinition
- scene.createOccurrenceFromAnnotation
- scene.createProductView
- scene.getAnnotationDefinition
- scene.getAnnotationGroups
- scene.getAnnotationListAABB
- scene.getAnnotations
- scene.getOccurrenceAnnotationDefinitions
- scene.getProductViewDefinition
- scene.setAnnotationToGroup
setAnnotationToGroup
Set Annotation to a Annotation Group.
scene.setAnnotationToGroup(annotation, group)
Parameters
Type | Name | Description |
|---|---|---|
| Annotation | annotation | |
| AnnotationGroup | group |
See also:
- scene.addAnnotationGroup
- scene.addMeshToAnnotation
- scene.convertPMIToOccurrences
- scene.createAnnotationFromDefinition
- scene.createOccurrenceFromAnnotation
- scene.createProductView
- scene.getAnnotationDefinition
- scene.getAnnotationGroups
- scene.getAnnotationListAABB
- scene.getAnnotations
- scene.getOccurrenceAnnotationDefinitions
- scene.getProductViewDefinition
- scene.getProductViewDefinitions
prototype
cleanInstances
Clean prototypes and instances (lonely instances, overriding their prototypes hierarchies...).
scene.cleanInstances(removeUselessInstances=True, removeHierarchyOverridingInstances=False, occurrence=0)
Parameters
Type | Name | Description |
|---|---|---|
| Boolean | removeUselessInstances | Remove instances where they are not needed (prototype referenced once, ...). |
| Boolean | removeHierarchyOverridingInstances | Remove instances overriding their prototypes sub-hierarchies. |
| Occurrence | occurrence | Root occurrence for the process. |
See also:
- scene.getDirectInstances
- scene.getFinalPrototype
- scene.getInstances
- scene.getPrototype
- scene.getPrototypes
- scene.prototypeSubTree
- scene.setPrototype
- scene.setPrototypes
- scene.updateChildrenPrototypes
getDirectInstances
Returns all the occurrences prototyping the given occurrence.
scene.getDirectInstances(prototype) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | prototype | The prototype occurrence. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | instances | The instances. |
See also:
- scene.cleanInstances
- scene.getFinalPrototype
- scene.getInstances
- scene.getPrototype
- scene.getPrototypes
- scene.prototypeSubTree
- scene.setPrototype
- scene.setPrototypes
- scene.updateChildrenPrototypes
getFinalPrototype
Returns the final prototype of an occurrence (ie. The very first one of prototype tree).
scene.getFinalPrototype(occurrence) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | prototype | The final prototype (if any). |
See also:
- scene.cleanInstances
- scene.getDirectInstances
- scene.getInstances
- scene.getPrototype
- scene.getPrototypes
- scene.prototypeSubTree
- scene.setPrototype
- scene.setPrototypes
- scene.updateChildrenPrototypes
getInstances
Get occurrences sharing the same prototype as the given one.
scene.getInstances(occurrence) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | Reference part occurrence. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | instances | The list of occurrences sharing the same prototype. |
See also:
- scene.cleanInstances
- scene.getDirectInstances
- scene.getFinalPrototype
- scene.getPrototype
- scene.getPrototypes
- scene.prototypeSubTree
- scene.setPrototype
- scene.setPrototypes
- scene.updateChildrenPrototypes
getPrototype
Returns the prototype of an occurrence.
scene.getPrototype(occurrence) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | prototype | The prototype (if any). |
See also:
- scene.cleanInstances
- scene.getDirectInstances
- scene.getFinalPrototype
- scene.getInstances
- scene.getPrototypes
- scene.prototypeSubTree
- scene.setPrototype
- scene.setPrototypes
- scene.updateChildrenPrototypes
getPrototypes
Returns the prototype for each given occurrence.
scene.getPrototypes(occurrences) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | The occurrence. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | prototypes | The prototype of each occurrence. |
See also:
- scene.cleanInstances
- scene.getDirectInstances
- scene.getFinalPrototype
- scene.getInstances
- scene.getPrototype
- scene.prototypeSubTree
- scene.setPrototype
- scene.setPrototypes
- scene.updateChildrenPrototypes
prototypeSubTree
Create occurrences that prototype the given occurrence and all its subtree.
scene.prototypeSubTree(prototype) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | prototype | The root occurrence of the sub-tree to prototype. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The root occurrence of the prototyped sub-tree. |
See also:
- scene.cleanInstances
- scene.getDirectInstances
- scene.getFinalPrototype
- scene.getInstances
- scene.getPrototype
- scene.getPrototypes
- scene.setPrototype
- scene.setPrototypes
- scene.updateChildrenPrototypes
setPrototype
Sets the prototype of an occurrence.
scene.setPrototype(occurrence, prototype)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence. |
| Occurrence | prototype | The prototype. |
See also:
- scene.cleanInstances
- scene.getDirectInstances
- scene.getFinalPrototype
- scene.getInstances
- scene.getPrototype
- scene.getPrototypes
- scene.prototypeSubTree
- scene.setPrototypes
- scene.updateChildrenPrototypes
setPrototypes
Sets the prototype for each given occurrence.
scene.setPrototypes(occurrences, prototypes)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | The occurrences. |
| OccurrenceList | prototypes | The prototypes. |
See also:
- scene.cleanInstances
- scene.getDirectInstances
- scene.getFinalPrototype
- scene.getInstances
- scene.getPrototype
- scene.getPrototypes
- scene.prototypeSubTree
- scene.setPrototype
- scene.updateChildrenPrototypes
updateChildrenPrototypes
Update children prototypes of the given occurrence.
scene.updateChildrenPrototypes(occurrence)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | The occurrence. |
See also:
- scene.cleanInstances
- scene.getDirectInstances
- scene.getFinalPrototype
- scene.getInstances
- scene.getPrototype
- scene.getPrototypes
- scene.prototypeSubTree
- scene.setPrototype
- scene.setPrototypes
selection
clearSelection
Clear the current selection.
scene.clearSelection(selectionId=1)
Parameters
Type | Name | Description |
|---|---|---|
| Ident | selectionId | ID of the selection to clear, or current selection (id = 1) will be cleared. |
See also:
- scene.createSelectionSnapshot
- scene.deleteSelection
- scene.deleteSelectionSnapshot
- scene.getSelectedOccurrences
- scene.getSelectedPolygonCount
- scene.invertOrientationSelection
- scene.invertSelect
- scene.invertSelection
- scene.select
- scene.separateSelection
- scene.unselect
createSelectionSnapshot
Get the ID of a copy of the current selection to use it later.
scene.createSelectionSnapshot() -> core.Ident
Returns
Type | Name | Description |
|---|---|---|
| Ident | selectionId | Selection ID of the state of the current selection. |
See also:
- scene.clearSelection
- scene.deleteSelection
- scene.deleteSelectionSnapshot
- scene.getSelectedOccurrences
- scene.getSelectedPolygonCount
- scene.invertOrientationSelection
- scene.invertSelect
- scene.invertSelection
- scene.select
- scene.separateSelection
- scene.unselect
deleteSelection
Delete all selected occurrences, and/or sub-occurrence elements.
scene.deleteSelection(selectionId=1)
Parameters
Type | Name | Description |
|---|---|---|
| Ident | selectionId | ID of the selection to delete, or current selection (id = 1) will be deleted. |
See also:
- scene.clearSelection
- scene.createSelectionSnapshot
- scene.deleteSelectionSnapshot
- scene.getSelectedOccurrences
- scene.getSelectedPolygonCount
- scene.invertOrientationSelection
- scene.invertSelect
- scene.invertSelection
- scene.select
- scene.separateSelection
- scene.unselect
deleteSelectionSnapshot
Delete a selection snapshot using its id.
scene.deleteSelectionSnapshot(selectionId)
Parameters
Type | Name | Description |
|---|---|---|
| Ident | selectionId | Selection ID of the snapshot to delete. |
See also:
- scene.clearSelection
- scene.createSelectionSnapshot
- scene.deleteSelection
- scene.getSelectedOccurrences
- scene.getSelectedPolygonCount
- scene.invertOrientationSelection
- scene.invertSelect
- scene.invertSelection
- scene.select
- scene.separateSelection
- scene.unselect
getSelectedOccurrences
Returns all the selected occurrences.
scene.getSelectedOccurrences(keepAncestors=False, selectionId=1) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| Boolean | keepAncestors | If True, occurrences with ancestors selected will be remove from the list. |
| Ident | selectionId | ID of the selection to use, or current selection (id = 1) will be used. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | selection | The list of selected occurrences. |
See also:
- scene.clearSelection
- scene.createSelectionSnapshot
- scene.deleteSelection
- scene.deleteSelectionSnapshot
- scene.getSelectedPolygonCount
- scene.invertOrientationSelection
- scene.invertSelect
- scene.invertSelection
- scene.select
- scene.separateSelection
- scene.unselect
getSelectedPolygonCount
Returns the number of selected polygons.
scene.getSelectedPolygonCount(selectionId=1) -> core.ULong
Parameters
Type | Name | Description |
|---|---|---|
| Ident | selectionId | ID of the selection to use, or current selection (id = 1) will be used. |
Returns
Type | Name | Description |
|---|---|---|
| ULong | polygonCount | Number of selected Polygons. |
See also:
- scene.clearSelection
- scene.createSelectionSnapshot
- scene.deleteSelection
- scene.deleteSelectionSnapshot
- scene.getSelectedOccurrences
- scene.invertOrientationSelection
- scene.invertSelect
- scene.invertSelection
- scene.select
- scene.separateSelection
- scene.unselect
invertOrientationSelection
Invert the orientation of each selected item (occurrences and/or sub-occurrence elements.
scene.invertOrientationSelection(selectionId=1)
Parameters
Type | Name | Description |
|---|---|---|
| Ident | selectionId | ID of the selection to invert, or current selection (id = 1) will be inverted. |
See also:
- scene.clearSelection
- scene.createSelectionSnapshot
- scene.deleteSelection
- scene.deleteSelectionSnapshot
- scene.getSelectedOccurrences
- scene.getSelectedPolygonCount
- scene.invertSelect
- scene.invertSelection
- scene.select
- scene.separateSelection
- scene.unselect
invertSelect
Invert occurrences to selection.
scene.invertSelect(occurrence, selectionId=1)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrence | Occurrences to invert from the selection. |
| Ident | selectionId | ID of the selection to use, or current selection (id = 1) will be used. |
See also:
- scene.clearSelection
- scene.createSelectionSnapshot
- scene.deleteSelection
- scene.deleteSelectionSnapshot
- scene.getSelectedOccurrences
- scene.getSelectedPolygonCount
- scene.invertOrientationSelection
- scene.invertSelection
- scene.select
- scene.separateSelection
- scene.unselect
invertSelection
Replace the selection by all unselected part occurrences.
scene.invertSelection(selectionId=1)
Parameters
Type | Name | Description |
|---|---|---|
| Ident | selectionId | ID of the selection to invert, or current selection (id = 1) will be inverted. |
See also:
- scene.clearSelection
- scene.createSelectionSnapshot
- scene.deleteSelection
- scene.deleteSelectionSnapshot
- scene.getSelectedOccurrences
- scene.getSelectedPolygonCount
- scene.invertOrientationSelection
- scene.invertSelect
- scene.select
- scene.separateSelection
- scene.unselect
select
Add occurrences to selection.
scene.select(occurrences, selectionId=1)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Occurrences to add to the selection. |
| Ident | selectionId | ID of the selection to use, or current selection (id = 1) will be used. |
See also:
- scene.clearSelection
- scene.createSelectionSnapshot
- scene.deleteSelection
- scene.deleteSelectionSnapshot
- scene.getSelectedOccurrences
- scene.getSelectedPolygonCount
- scene.invertOrientationSelection
- scene.invertSelect
- scene.invertSelection
- scene.separateSelection
- scene.unselect
separateSelection
Separate all polygons from their original parts into a new one or new ones depending on the parameters.
scene.separateSelection(createSingleOccurrence=True, selectionId=1) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| 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 | selectionId | ID of the selection to separate, or current selection (id = 1) will be separated. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | newOccurrences | The new occurrence(s) created. |
See also:
- scene.clearSelection
- scene.createSelectionSnapshot
- scene.deleteSelection
- scene.deleteSelectionSnapshot
- scene.getSelectedOccurrences
- scene.getSelectedPolygonCount
- scene.invertOrientationSelection
- scene.invertSelect
- scene.invertSelection
- scene.select
- scene.unselect
unselect
Remove occurrences to selection.
scene.unselect(occurrence, selectionId=1)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrence | Occurrences to remove from the selection. |
| Ident | selectionId | ID of the selection to use, or current selection (id = 1) will be used. |
See also:
- scene.clearSelection
- scene.createSelectionSnapshot
- scene.deleteSelection
- scene.deleteSelectionSnapshot
- scene.getSelectedOccurrences
- scene.getSelectedPolygonCount
- scene.invertOrientationSelection
- scene.invertSelect
- scene.invertSelection
- scene.select
- scene.separateSelection
simplification
compress
Compress a sub-tree by removing occurrence containing only one Child or empty, and by removing useless instances (see removeUselessInstances).
scene.compress(occurrence=0) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | Root occurrence for the process. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | resultingOccurrences | The resulting occurrences of compression. |
See also:
- scene.convertToOldSchoolVisibility
- scene.getHiddenPartOccurrences
- scene.getVisiblePartOccurrences
- scene.makeInstanceUnique
- scene.rake
- scene.removeSymmetryMatrices
- scene.resetPartTransform
- scene.resetTransform
convertToOldSchoolVisibility
Modify the visible properties of the sub-tree to look like old school visibility (only hidden/inherited).
scene.convertToOldSchoolVisibility(root=0)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | root | Root occurrence. |
See also:
- scene.compress
- scene.getHiddenPartOccurrences
- scene.getVisiblePartOccurrences
- scene.makeInstanceUnique
- scene.rake
- scene.removeSymmetryMatrices
- scene.resetPartTransform
- scene.resetTransform
getHiddenPartOccurrences
Get hidden part occurrences.
scene.getHiddenPartOccurrences(roots=None) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | roots | Roots occurrences for the process. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | filtered | The list of hidden occurrences (visibility status). |
See also:
- scene.compress
- scene.convertToOldSchoolVisibility
- scene.getVisiblePartOccurrences
- scene.makeInstanceUnique
- scene.rake
- scene.removeSymmetryMatrices
- scene.resetPartTransform
- scene.resetTransform
getVisiblePartOccurrences
Get visible part occurrences.
scene.getVisiblePartOccurrences(roots=None) -> scene.OccurrenceList
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | roots | Roots occurrences for the process. |
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceList | filtered | The list of visible part occurrences (visibility status). |
See also:
- scene.compress
- scene.convertToOldSchoolVisibility
- scene.getHiddenPartOccurrences
- scene.makeInstanceUnique
- scene.rake
- scene.removeSymmetryMatrices
- scene.resetPartTransform
- scene.resetTransform
makeInstanceUnique
Singularize all instances on the sub-tree of an occurrence.
scene.makeInstanceUnique(occurrences=0, keepOnlyPartInstances=False)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Root occurrence for the process. |
| Boolean | keepOnlyPartInstances | If true, instances of part will not be singularized. |
See also:
- scene.compress
- scene.convertToOldSchoolVisibility
- scene.getHiddenPartOccurrences
- scene.getVisiblePartOccurrences
- scene.rake
- scene.removeSymmetryMatrices
- scene.resetPartTransform
- scene.resetTransform
rake
Set the same parent to all descending parts (all parts will be singularized).
scene.rake(occurrence=0, keepInstances=False)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | Root occurrence for the process. |
| Boolean | keepInstances | If false, the part will be singularized. |
See also:
- scene.compress
- scene.convertToOldSchoolVisibility
- scene.getHiddenPartOccurrences
- scene.getVisiblePartOccurrences
- scene.makeInstanceUnique
- scene.removeSymmetryMatrices
- scene.resetPartTransform
- scene.resetTransform
removeSymmetryMatrices
Remove symmetry matrices (apply matrices on geometries on nodes under an occurrence with a symmetry matrix.
scene.removeSymmetryMatrices(occurrence=0)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | occurrence | Root occurrence for the process. |
See also:
- scene.compress
- scene.convertToOldSchoolVisibility
- scene.getHiddenPartOccurrences
- scene.getVisiblePartOccurrences
- scene.makeInstanceUnique
- scene.rake
- scene.resetPartTransform
- scene.resetTransform
resetPartTransform
Set all part transformation matrices to identity in a sub-tree, transformation will be applied to the shapes.
scene.resetPartTransform(root=0)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | root | Root occurrence for the process. |
See also:
- scene.compress
- scene.convertToOldSchoolVisibility
- scene.getHiddenPartOccurrences
- scene.getVisiblePartOccurrences
- scene.makeInstanceUnique
- scene.rake
- scene.removeSymmetryMatrices
- scene.resetTransform
resetTransform
Set all transformation matrices to identity in a sub-tree.
scene.resetTransform(root, recursive=True, keepInstantiation=True, keepPartTransform=False)
Parameters
Type | Name | Description |
|---|---|---|
| Occurrence | root | Root occurrence for the process. |
| Boolean | recursive | If False, transformation will be applied only on the root and its components. |
| Boolean | keepInstantiation | If False, all occurrences will be singularized. |
| Boolean | keepPartTransform | If False, transformation will be applied to the shapes (BRepShape points or TessellatedShape vertices). |
See also:
- scene.compress
- scene.convertToOldSchoolVisibility
- scene.getHiddenPartOccurrences
- scene.getVisiblePartOccurrences
- scene.makeInstanceUnique
- scene.rake
- scene.removeSymmetryMatrices
- scene.resetPartTransform
spatialRequest
createRayProber
Creates a ray prober.
scene.createRayProber() -> core.Ident
Returns
Type | Name | Description |
|---|---|---|
| Ident | id |
See also:
- scene.createSphereProber
- scene.rayCast
- scene.rayCastAll
- scene.updateRayProber
- scene.updateSphereProber
createSphereProber
Creates a sphere prober.
scene.createSphereProber() -> core.Ident
Returns
Type | Name | Description |
|---|---|---|
| Ident | id |
See also:
rayCast
scene.rayCast(ray, root) -> scene.RayHit
Parameters
Type | Name | Description |
|---|---|---|
| Ray | ray | The ray to cast. |
| Occurrence | root | The root occurrence to cast from. |
Returns
Type | Name | Description |
|---|---|---|
| RayHit | hit | Information of the first ray hit. |
See also:
- scene.createRayProber
- scene.createSphereProber
- scene.rayCastAll
- scene.updateRayProber
- scene.updateSphereProber
rayCastAll
scene.rayCastAll(ray, root) -> scene.RayHitList
Parameters
Type | Name | Description |
|---|---|---|
| Ray | ray | The ray to cast. |
| Occurrence | root | The root occurrence to cast from. |
Returns
Type | Name | Description |
|---|---|---|
| RayHitList | hits | Information of the first ray hit. |
See also:
- scene.createRayProber
- scene.createSphereProber
- scene.rayCast
- scene.updateRayProber
- scene.updateSphereProber
updateRayProber
Updates the designed ray prober.
scene.updateRayProber(proberID, ray)
Parameters
See also:
- scene.createRayProber
- scene.createSphereProber
- scene.rayCast
- scene.rayCastAll
- scene.updateSphereProber
updateSphereProber
Updates the designed sphere prober.
scene.updateSphereProber(proberID, sphereCenter, sphereRadius)
Parameters
Type | Name | Description |
|---|---|---|
| Ident | proberID | The sphere prober Id. |
| Vector3 | sphereCenter | The new prober center. |
| Double | sphereRadius | The new prober radius. |
See also:
userData
getMultipleOccurrenceUserData
Batch version of getOccurrenceUserData.
scene.getMultipleOccurrenceUserData(userDataId, occurrences) -> core.PtrList
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceUserData | userDataId | UserData identifier provided by subscribeToOccurrenceUserData. |
| OccurrenceList | occurrences | Occurrences that store the user data. |
Returns
Type | Name | Description |
|---|---|---|
| PtrList | userDataList | User data stored for each given occurrence. |
See also:
- scene.getOccurrenceUserData
- scene.getPartUserData
- scene.hasMultipleOccurrenceUserData
- scene.hasOccurrenceUserData
- scene.hasPartUserData
- scene.setMultipleOccurrenceUserData
- scene.setOccurrenceUserData
- scene.setPartUserData
- scene.subscribeToOccurrenceUserData
- scene.subscribeToPartUserData
- scene.unsetMultipleOccurrenceUserData
- scene.unsetOccurrenceUserData
- scene.unsetPartUserData
- scene.unsubscribeFromOccurrenceUserData
- scene.unsubscribeFromPartUserData
getOccurrenceUserData
Set or replace a userdata stored on an occurrence.
scene.getOccurrenceUserData(userDataId, occurrence) -> core.Ptr
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceUserData | userDataId | UserData identifier provided by subscribeToOccurrenceUserData. |
| Occurrence | occurrence | Occurrence that store the user data. |
Returns
Type | Name | Description |
|---|---|---|
| Ptr | userData | User data stored in the given occurrence. |
See also:
- scene.getMultipleOccurrenceUserData
- scene.getPartUserData
- scene.hasMultipleOccurrenceUserData
- scene.hasOccurrenceUserData
- scene.hasPartUserData
- scene.setMultipleOccurrenceUserData
- scene.setOccurrenceUserData
- scene.setPartUserData
- scene.subscribeToOccurrenceUserData
- scene.subscribeToPartUserData
- scene.unsetMultipleOccurrenceUserData
- scene.unsetOccurrenceUserData
- scene.unsetPartUserData
- scene.unsubscribeFromOccurrenceUserData
- scene.unsubscribeFromPartUserData
getPartUserData
Set or replace a userdata stored on an Part.
scene.getPartUserData(userDataId, Part) -> core.Ptr
Parameters
Type | Name | Description |
|---|---|---|
| PartUserData | userDataId | UserData identifier provided by subscribeToPartUserData. |
| Part | Part | Part that store the user data. |
Returns
Type | Name | Description |
|---|---|---|
| Ptr | userData | User data stored in the given Part. |
See also:
- scene.getMultipleOccurrenceUserData
- scene.getOccurrenceUserData
- scene.hasMultipleOccurrenceUserData
- scene.hasOccurrenceUserData
- scene.hasPartUserData
- scene.setMultipleOccurrenceUserData
- scene.setOccurrenceUserData
- scene.setPartUserData
- scene.subscribeToOccurrenceUserData
- scene.subscribeToPartUserData
- scene.unsetMultipleOccurrenceUserData
- scene.unsetOccurrenceUserData
- scene.unsetPartUserData
- scene.unsubscribeFromOccurrenceUserData
- scene.unsubscribeFromPartUserData
hasMultipleOccurrenceUserData
Batch version of hasOccurrenceUserData.
scene.hasMultipleOccurrenceUserData(userDataId, occurrences) -> core.BoolList
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceUserData | userDataId | UserData identifier provided by subscribeToOccurrenceUserData. |
| OccurrenceList | occurrences | Occurrences that potentially store the user data. |
Returns
Type | Name | Description |
|---|---|---|
| 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.getOccurrenceUserData
- scene.getPartUserData
- scene.hasOccurrenceUserData
- scene.hasPartUserData
- scene.setMultipleOccurrenceUserData
- scene.setOccurrenceUserData
- scene.setPartUserData
- scene.subscribeToOccurrenceUserData
- scene.subscribeToPartUserData
- scene.unsetMultipleOccurrenceUserData
- scene.unsetOccurrenceUserData
- scene.unsetPartUserData
- scene.unsubscribeFromOccurrenceUserData
- scene.unsubscribeFromPartUserData
hasOccurrenceUserData
Set or replace a userdata stored on an occurrence.
scene.hasOccurrenceUserData(userDataId, occurrence) -> core.Bool
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceUserData | userDataId | UserData identifier provided by subscribeToOccurrenceUserData. |
| Occurrence | occurrence | Occurrence that potentially store the user data. |
Returns
Type | Name | Description |
|---|---|---|
| Bool | result | Returns true if a userdata is stored on this occurrence for the given userDataId. |
See also:
- scene.getMultipleOccurrenceUserData
- scene.getOccurrenceUserData
- scene.getPartUserData
- scene.hasMultipleOccurrenceUserData
- scene.hasPartUserData
- scene.setMultipleOccurrenceUserData
- scene.setOccurrenceUserData
- scene.setPartUserData
- scene.subscribeToOccurrenceUserData
- scene.subscribeToPartUserData
- scene.unsetMultipleOccurrenceUserData
- scene.unsetOccurrenceUserData
- scene.unsetPartUserData
- scene.unsubscribeFromOccurrenceUserData
- scene.unsubscribeFromPartUserData
hasPartUserData
Set or replace a userdata stored on an Part.
scene.hasPartUserData(userDataId, Part) -> core.Bool
Parameters
Type | Name | Description |
|---|---|---|
| PartUserData | userDataId | UserData identifier provided by subscribeToPartUserData. |
| Part | Part | Part that potentially store the user data. |
Returns
Type | Name | Description |
|---|---|---|
| Bool | result | Returns true if a userdata is stored on this Part for the given userDataId. |
See also:
- scene.getMultipleOccurrenceUserData
- scene.getOccurrenceUserData
- scene.getPartUserData
- scene.hasMultipleOccurrenceUserData
- scene.hasOccurrenceUserData
- scene.setMultipleOccurrenceUserData
- scene.setOccurrenceUserData
- scene.setPartUserData
- scene.subscribeToOccurrenceUserData
- scene.subscribeToPartUserData
- scene.unsetMultipleOccurrenceUserData
- scene.unsetOccurrenceUserData
- scene.unsetPartUserData
- scene.unsubscribeFromOccurrenceUserData
- scene.unsubscribeFromPartUserData
setMultipleOccurrenceUserData
Batch version of setOccurrenceUserData.
scene.setMultipleOccurrenceUserData(userDataId, occurrences, userDataList)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceUserData | userDataId | UserData identifier provided by subscribeToOccurrenceUserData. |
| OccurrenceList | occurrences | Occurrences that will store the user data. |
| PtrList | userDataList | User data to store on each occurrence. |
See also:
- scene.getMultipleOccurrenceUserData
- scene.getOccurrenceUserData
- scene.getPartUserData
- scene.hasMultipleOccurrenceUserData
- scene.hasOccurrenceUserData
- scene.hasPartUserData
- scene.setOccurrenceUserData
- scene.setPartUserData
- scene.subscribeToOccurrenceUserData
- scene.subscribeToPartUserData
- scene.unsetMultipleOccurrenceUserData
- scene.unsetOccurrenceUserData
- scene.unsetPartUserData
- scene.unsubscribeFromOccurrenceUserData
- scene.unsubscribeFromPartUserData
setOccurrenceUserData
Set or replace a userdata stored on an occurrence.
scene.setOccurrenceUserData(userDataId, occurrence, userData)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceUserData | userDataId | UserData identifier provided by subscribeToOccurrenceUserData. |
| Occurrence | occurrence | Occurrence that will store the user data. |
| Ptr | userData | User data to store in the given occurrence. |
See also:
- scene.getMultipleOccurrenceUserData
- scene.getOccurrenceUserData
- scene.getPartUserData
- scene.hasMultipleOccurrenceUserData
- scene.hasOccurrenceUserData
- scene.hasPartUserData
- scene.setMultipleOccurrenceUserData
- scene.setPartUserData
- scene.subscribeToOccurrenceUserData
- scene.subscribeToPartUserData
- scene.unsetMultipleOccurrenceUserData
- scene.unsetOccurrenceUserData
- scene.unsetPartUserData
- scene.unsubscribeFromOccurrenceUserData
- scene.unsubscribeFromPartUserData
setPartUserData
Set or replace a userdata stored on an Part.
scene.setPartUserData(userDataId, Part, userData)
Parameters
Type | Name | Description |
|---|---|---|
| PartUserData | userDataId | UserData identifier provided by subscribeToPartUserData. |
| Part | Part | Part that will store the user data. |
| Ptr | userData | User data to store in the given Part. |
See also:
- scene.getMultipleOccurrenceUserData
- scene.getOccurrenceUserData
- scene.getPartUserData
- scene.hasMultipleOccurrenceUserData
- scene.hasOccurrenceUserData
- scene.hasPartUserData
- scene.setMultipleOccurrenceUserData
- scene.setOccurrenceUserData
- scene.subscribeToOccurrenceUserData
- scene.subscribeToPartUserData
- scene.unsetMultipleOccurrenceUserData
- scene.unsetOccurrenceUserData
- scene.unsetPartUserData
- scene.unsubscribeFromOccurrenceUserData
- scene.unsubscribeFromPartUserData
subscribeToOccurrenceUserData
Subscribe to occurrence user data. multiple different userdata can be stored on the same occurrences if subscribeToOccurrenceUserData is called multiple times.
scene.subscribeToOccurrenceUserData() -> scene.OccurrenceUserData
Returns
Type | Name | Description |
|---|---|---|
| OccurrenceUserData | userDataId | UserData identifier to pass to setUserData/getUserData functions. |
See also:
- scene.getMultipleOccurrenceUserData
- scene.getOccurrenceUserData
- scene.getPartUserData
- scene.hasMultipleOccurrenceUserData
- scene.hasOccurrenceUserData
- scene.hasPartUserData
- scene.setMultipleOccurrenceUserData
- scene.setOccurrenceUserData
- scene.setPartUserData
- scene.subscribeToPartUserData
- scene.unsetMultipleOccurrenceUserData
- scene.unsetOccurrenceUserData
- scene.unsetPartUserData
- scene.unsubscribeFromOccurrenceUserData
- scene.unsubscribeFromPartUserData
subscribeToPartUserData
Subscribe to Part user data. multiple different userdata can be stored on the same Parts if subscribeToPartUserData is called multiple times.
scene.subscribeToPartUserData() -> scene.PartUserData
Returns
Type | Name | Description |
|---|---|---|
| PartUserData | userDataId | UserData identifier to pass to setUserData/getUserData functions. |
See also:
- scene.getMultipleOccurrenceUserData
- scene.getOccurrenceUserData
- scene.getPartUserData
- scene.hasMultipleOccurrenceUserData
- scene.hasOccurrenceUserData
- scene.hasPartUserData
- scene.setMultipleOccurrenceUserData
- scene.setOccurrenceUserData
- scene.setPartUserData
- scene.subscribeToOccurrenceUserData
- scene.unsetMultipleOccurrenceUserData
- scene.unsetOccurrenceUserData
- scene.unsetPartUserData
- scene.unsubscribeFromOccurrenceUserData
- scene.unsubscribeFromPartUserData
unsetMultipleOccurrenceUserData
Batch version of unsetOccurrenceUserData.
scene.unsetMultipleOccurrenceUserData(userDataId, occurrences)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceUserData | userDataId | UserData identifier provided by subscribeToOccurrenceUserData. |
| OccurrenceList | occurrences | Occurrences that will store the user data. |
See also:
- scene.getMultipleOccurrenceUserData
- scene.getOccurrenceUserData
- scene.getPartUserData
- scene.hasMultipleOccurrenceUserData
- scene.hasOccurrenceUserData
- scene.hasPartUserData
- scene.setMultipleOccurrenceUserData
- scene.setOccurrenceUserData
- scene.setPartUserData
- scene.subscribeToOccurrenceUserData
- scene.subscribeToPartUserData
- scene.unsetOccurrenceUserData
- scene.unsetPartUserData
- scene.unsubscribeFromOccurrenceUserData
- scene.unsubscribeFromPartUserData
unsetOccurrenceUserData
Unset the userdata stored on an occurrence.
scene.unsetOccurrenceUserData(userDataId, occurrence)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceUserData | userDataId | UserData identifier provided by subscribeToOccurrenceUserData. |
| Occurrence | occurrence | Occurrence that will store the user data. |
See also:
- scene.getMultipleOccurrenceUserData
- scene.getOccurrenceUserData
- scene.getPartUserData
- scene.hasMultipleOccurrenceUserData
- scene.hasOccurrenceUserData
- scene.hasPartUserData
- scene.setMultipleOccurrenceUserData
- scene.setOccurrenceUserData
- scene.setPartUserData
- scene.subscribeToOccurrenceUserData
- scene.subscribeToPartUserData
- scene.unsetMultipleOccurrenceUserData
- scene.unsetPartUserData
- scene.unsubscribeFromOccurrenceUserData
- scene.unsubscribeFromPartUserData
unsetPartUserData
Unset the userdata stored on an Part.
scene.unsetPartUserData(userDataId, Part)
Parameters
Type | Name | Description |
|---|---|---|
| PartUserData | userDataId | UserData identifier provided by subscribeToPartUserData. |
| Part | Part | Part that will store the user data. |
See also:
- scene.getMultipleOccurrenceUserData
- scene.getOccurrenceUserData
- scene.getPartUserData
- scene.hasMultipleOccurrenceUserData
- scene.hasOccurrenceUserData
- scene.hasPartUserData
- scene.setMultipleOccurrenceUserData
- scene.setOccurrenceUserData
- scene.setPartUserData
- scene.subscribeToOccurrenceUserData
- scene.subscribeToPartUserData
- scene.unsetMultipleOccurrenceUserData
- scene.unsetOccurrenceUserData
- scene.unsubscribeFromOccurrenceUserData
- scene.unsubscribeFromPartUserData
unsubscribeFromOccurrenceUserData
scene.unsubscribeFromOccurrenceUserData(userDataId)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceUserData | userDataId | UserData identifier to unsubscribe. |
See also:
- scene.getMultipleOccurrenceUserData
- scene.getOccurrenceUserData
- scene.getPartUserData
- scene.hasMultipleOccurrenceUserData
- scene.hasOccurrenceUserData
- scene.hasPartUserData
- scene.setMultipleOccurrenceUserData
- scene.setOccurrenceUserData
- scene.setPartUserData
- scene.subscribeToOccurrenceUserData
- scene.subscribeToPartUserData
- scene.unsetMultipleOccurrenceUserData
- scene.unsetOccurrenceUserData
- scene.unsetPartUserData
- scene.unsubscribeFromPartUserData
unsubscribeFromPartUserData
scene.unsubscribeFromPartUserData(userDataId)
Parameters
Type | Name | Description |
|---|---|---|
| PartUserData | userDataId | UserData identifier to unsubscribe. |
See also:
- scene.getMultipleOccurrenceUserData
- scene.getOccurrenceUserData
- scene.getPartUserData
- scene.hasMultipleOccurrenceUserData
- scene.hasOccurrenceUserData
- scene.hasPartUserData
- scene.setMultipleOccurrenceUserData
- scene.setOccurrenceUserData
- scene.setPartUserData
- scene.subscribeToOccurrenceUserData
- scene.subscribeToPartUserData
- scene.unsetMultipleOccurrenceUserData
- scene.unsetOccurrenceUserData
- scene.unsetPartUserData
- scene.unsubscribeFromOccurrenceUserData
variant
addVariant
Create a new variant.
scene.addVariant(name) -> scene.Variant
Parameters
Type | Name | Description |
|---|---|---|
| String | name | The name of the new variant. |
Returns
Type | Name | Description |
|---|---|---|
| Variant | variant | The new variant. |
See also:
- scene.duplicateVariant
- scene.endModifyAllVariants
- scene.getVariantComponentsDefinitions
- scene.getVariantTree
- scene.listVariants
- scene.removeVariant
- scene.setCurrentVariant
- scene.setVariantTree
- scene.startModifyAllVariants
duplicateVariant
Create a new variant which is a copy of an existing variant.
scene.duplicateVariant(variant, name) -> scene.Variant
Parameters
Returns
Type | Name | Description |
|---|---|---|
| Variant | newVariant | The created variant. |
See also:
- scene.addVariant
- scene.endModifyAllVariants
- scene.getVariantComponentsDefinitions
- scene.getVariantTree
- scene.listVariants
- scene.removeVariant
- scene.setCurrentVariant
- scene.setVariantTree
- scene.startModifyAllVariants
endModifyAllVariants
Call this function to disable the modifications of all variants at the same time.
scene.endModifyAllVariants()
See also:
- scene.addVariant
- scene.duplicateVariant
- scene.getVariantComponentsDefinitions
- scene.getVariantTree
- scene.listVariants
- scene.removeVariant
- scene.setCurrentVariant
- scene.setVariantTree
- scene.startModifyAllVariants
getVariantComponentsDefinitions
Returns the definitions of multiple variant components.
scene.getVariantComponentsDefinitions(variantComponents) -> scene.VariantDefinitionListList
Parameters
Type | Name | Description |
|---|---|---|
| VariantComponentList | variantComponents | The list of variant components to retrieve definitions. |
Returns
Type | Name | Description |
|---|---|---|
| VariantDefinitionListList | definitions | For each variant component, returns one list of variant definition (one by variant). |
See also:
- scene.addVariant
- scene.duplicateVariant
- scene.endModifyAllVariants
- scene.getVariantTree
- scene.listVariants
- scene.removeVariant
- scene.setCurrentVariant
- scene.setVariantTree
- scene.startModifyAllVariants
getVariantTree
Get the alternative tree used by this variant.
scene.getVariantTree(variant) -> scene.AlternativeTree
Parameters
Type | Name | Description |
|---|---|---|
| Variant | variant | The variant. |
Returns
Type | Name | Description |
|---|---|---|
| AlternativeTree | tree | The alternative tree used by this variant. |
See also:
- scene.addVariant
- scene.duplicateVariant
- scene.endModifyAllVariants
- scene.getVariantComponentsDefinitions
- scene.listVariants
- scene.removeVariant
- scene.setCurrentVariant
- scene.setVariantTree
- scene.startModifyAllVariants
listVariants
Returns all the available variants.
scene.listVariants() -> scene.VariantList
Returns
Type | Name | Description |
|---|---|---|
| VariantList | variants | All variants. |
See also:
- scene.addVariant
- scene.duplicateVariant
- scene.endModifyAllVariants
- scene.getVariantComponentsDefinitions
- scene.getVariantTree
- scene.removeVariant
- scene.setCurrentVariant
- scene.setVariantTree
- scene.startModifyAllVariants
removeVariant
Remove a variant.
scene.removeVariant(variant)
Parameters
Type | Name | Description |
|---|---|---|
| Variant | variant | The variant to remove. |
See also:
- scene.addVariant
- scene.duplicateVariant
- scene.endModifyAllVariants
- scene.getVariantComponentsDefinitions
- scene.getVariantTree
- scene.listVariants
- scene.setCurrentVariant
- scene.setVariantTree
- scene.startModifyAllVariants
setCurrentVariant
Change the current variant used.
scene.setCurrentVariant(variant=None)
Parameters
Type | Name | Description |
|---|---|---|
| Variant | variant | The variant to enable (can be null). |
See also:
- scene.addVariant
- scene.duplicateVariant
- scene.endModifyAllVariants
- scene.getVariantComponentsDefinitions
- scene.getVariantTree
- scene.listVariants
- scene.removeVariant
- scene.setVariantTree
- scene.startModifyAllVariants
setVariantTree
Set the alternative tree to use for this variant.
scene.setVariantTree(variant, tree)
Parameters
Type | Name | Description |
|---|---|---|
| Variant | variant | The variant to modify. |
| AlternativeTree | tree | The alternative tree to use for this variant. |
See also:
- scene.addVariant
- scene.duplicateVariant
- scene.endModifyAllVariants
- scene.getVariantComponentsDefinitions
- scene.getVariantTree
- scene.listVariants
- scene.removeVariant
- scene.setCurrentVariant
- scene.startModifyAllVariants
startModifyAllVariants
Call this function to to enable the modifications of all variants at the same time.
scene.startModifyAllVariants()
See also: