gre.animation_resume
gre.animation_resume(animation_id, data)
--OR
gre.animation_resume("animation_name")
Pause a running animation. If an animation_id is used to pause the animation, then it must be the return value from gre.animation_create(). If a name is used to pause an animation, then that name must be the name of the animation specified in Designer. This function can take an optional parameter, data_table. The data_table contains the tags and values for the extra arguments to set.
Parameters
| Name | Type | Value |
|---|---|---|
animation_id | #string | The running animation to pause |
data | #table | [Optional] A table containing the tags and values for the extra arguments to set (see Animation Data) |
Animation Data
| Parameter | Type | Description |
|---|---|---|
id | #string | The animation id used in the case of multiple animations with the same name |
context | #string | The fully qualified name of an object in the model which will be used as the context for the animation. |
function resume_animation(id)
--Resume the animation
gre.animation_resume(id)
end
--Example of using gre.animation_resume passing animation names.
function cb_resume_cur_5day()
if cur_5day_toggle == false then
gre.animation_resume("show_5day")
else
gre.animation_resume("hide_mon_to_fri")
end
end
--Example of using gre.animation_resume with context.
function cb_resume_cur_5day()
local data = {}
data["context"] = "Layer1.mycontrol"
gre.animation_resume("show_5day", data)
end