setImage

abstract fun setImage(key: String, uri: String, target: VariableTarget?)

Set an image variable. Creates the variable if no variable has this key. Every block property bound to the variable takes the URI that the scene shows. If a bound property rejects the value, the call throws its error, but the variable and the other bound properties change anyway. Experimental: this API may change in a minor release.

Parameters

key

the variable's key.

uri

the URI of the image.

target

the layer to write. null writes the active value set when it holds the key, else the default value, so that the getter returns the new value. A value set needs a variable of this type.


open fun setImage(key: String, uri: String)

Set an image variable in the layer that the scene shows. Same as setImage with no target.