Expression Script to check animate box in style customizer

Is there some way to be able to check the animate check box in the style customizer via a script?

Not that I’m aware of. What problem are you trying to solve?

I’m trying to use a tag to trigger an animation (i.e. tag = 1, animation running, tag = 0 animation off)

Ideally, I think the tag should control the value (or custom property) of the component which then has an animation enabled or disabled.

For example, you could add a custom property to the component called ‘AnimationEnabled’.

1 Like

This is the way.

In addition, if you really need to do something dynamic with styles, you can just bind to the ‘Styles’ dataset property on any component that supports the Style Customizer. An animated style is just defined as a style with multiple rows for the same driving value.

This is for a log (rectangle) that I’m moving along an infeed belt. I have a custom property called infeed belt that is set to either a 1 or 0. Would using system.gui.transform within a script make more sense? I thought that I would be able to figure out a way to use a tag to check or uncheck the animate box.

I setup a rectangle and added a property InFeedBelt and my animation works when I enable that property (InFeedBelt is set as a boolean).

Is yours not working?

In your picture you are using the ‘visible’ property to drive (change) the used properties InFeedBelt, X, and Y. Not sure that is what you meant to do. You want to use your InFeedBelt property to drive the X and Y properties instead.




That was the problem, thanks for your help! :smile:

1 Like