Scene
Python API events
Read time 2 minutesLast updated 10 hours ago
ComponentChanged
def onComponentChanged(eventType, occurrence, component): pass id = scene.addComponentChangedCallback(onComponentChanged) ... scene.removeComponentChangedCallback(id)
Parameters
Type | Name | Description |
|---|---|---|
| ComponentChangeType | eventType | Type of change. |
| Occurrence | occurrence | Occurrence the component belongs to. |
| Component | component | Component concerned by change. |
SceneChanged
def onSceneChanged(eventType, occurrence, child, finalOccurrence): pass id = scene.addSceneChangedCallback(onSceneChanged) ... scene.removeSceneChangedCallback(id)
Parameters
Type | Name | Description |
|---|---|---|
| SceneChangeType | eventType | Type of change. |
| Occurrence | occurrence | Occurrence concerned by change. |
| Occurrence | child | Child occurrence for child insertion/removal. |
| Occurrence | finalOccurrence | Occurrence in the tree impact by the event. |
AnimationAdded
def onAnimationAdded(animation): pass id = scene.addAnimationAddedCallback(onAnimationAdded) ... scene.removeAnimationAddedCallback(id)
Parameters
Type | Name | Description |
|---|---|---|
| Animation | animation | Added animation. |
AnimationChanged
def onAnimationChanged(animation): pass id = scene.addAnimationChangedCallback(onAnimationChanged) ... scene.removeAnimationChangedCallback(id)
Parameters
Type | Name | Description |
|---|---|---|
| Animation | animation | Changed Animation. |
AnimationCleared
def onAnimationCleared(): pass id = scene.addAnimationClearedCallback(onAnimationCleared) ... scene.removeAnimationClearedCallback(id)
AnimationRemoved
def onAnimationRemoved(animation): pass id = scene.addAnimationRemovedCallback(onAnimationRemoved) ... scene.removeAnimationRemovedCallback(id)
Parameters
Type | Name | Description |
|---|---|---|
| Animation | animation | Removed Animation. |
IsolateBegan
def onIsolateBegan(): pass id = scene.addIsolateBeganCallback(onIsolateBegan) ... scene.removeIsolateBeganCallback(id)
IsolateEnded
def onIsolateEnded(): pass id = scene.addIsolateEndedCallback(onIsolateEnded) ... scene.removeIsolateEndedCallback(id)
SelectionChanged
def onSelectionChanged(type, occurrences): pass id = scene.addSelectionChangedCallback(onSelectionChanged) ... scene.removeSelectionChangedCallback(id)
Parameters
Type | Name | Description |
|---|---|---|
| SelectionChangeType | type | Type of change (CLEARED, ADDED or REMOVED). |
| OccurrenceList | occurrences | Only if type is ADDED or REMOVED, list of added or removed occurrences. |
VariantChanged
def onVariantChanged(type, variant): pass id = scene.addVariantChangedCallback(onVariantChanged) ... scene.removeVariantChangedCallback(id)
Parameters
Type | Name | Description |
|---|---|---|
| VariantChangeType | type | Type of change (ADDED, REMOVED, CURRENT_CHANGED). |
| Variant | variant |
onRayProbe
def ononRayProbe(proberID, proberInfo): pass id = scene.addonRayProbeCallback(ononRayProbe) ... scene.removeonRayProbeCallback(id)
Parameters
Type | Name | Description |
|---|---|---|
| Ident | proberID | The ray propber ID. |
| ProberInfo | proberInfo | The prober's info. |
onSphereProbe
def ononSphereProbe(proberID, proberInfo): pass id = scene.addonSphereProbeCallback(ononSphereProbe) ... scene.removeonSphereProbeCallback(id)
Parameters
Type | Name | Description |
|---|---|---|
| Ident | proberID | The sphere propber ID. |
| ProberInfo | proberInfo | The prober's info. |