# MotionScene

Artifact: [androidx.constraintlayout:constraintlayout-compose](https://developer.android.com/jetpack/androidx/releases/constraintlayout) [View Source](https://cs.android.com/search?q=file:androidx/constraintlayout/compose/MotionScene.kt+class:androidx.constraintlayout.compose.MotionScene) Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

<br />

```
@ExperimentalMotionApi
interface MotionScene : CoreMotionScene
```

<br />

*** ** * ** ***

Information for MotionLayout to animate between multiple `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet`s.

## Summary

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet?` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionScene#getConstraintSetInstance(kotlin.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/Transition?` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionScene#getTransitionInstance(kotlin.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` |

### Inherited functions

From [androidx.constraintlayout.core.state.CoreMotionScene](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/CoreMotionScene) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/CoreMotionScene#getConstraintSet(java.lang.String)(ext: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`

Get the ConstraintSet as a string
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/CoreMotionScene#getConstraintSet(int)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

get a constraintset
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/CoreMotionScene#getTransition(java.lang.String)(str: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`

get a transition give the name
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/CoreMotionScene#setConstraintSetContent(java.lang.String,java.lang.String)(csName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, toJSON: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`

set the constraintSet json string
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/CoreMotionScene#setDebugName(java.lang.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`

set the debug name for remote access
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/CoreMotionScene#setTransitionContent(java.lang.String,java.lang.String)(elementName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, toJSON: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`

set the Transitions string onto the MotionScene

## Public functions

### getConstraintSetInstance

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun getConstraintSetInstance(name: String): ConstraintSet?
```

### getTransitionInstance

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun getTransitionInstance(name: String): Transition?
```