# Prevent Integer Property from being Animated

How can I make a custom UI widget, using Blender Python, which cannot be animated by the user?

-->

I've looked on the docs but can't find reference to 'preventing' animation.

• Why would you want to do that? What problem are you trying to solve? Jan 23 at 6:49
• I have a script that adds a speaker every X-amount of frames. It's the property for that X-amount that I want to prevent from being animated. Animating it doesn't change how the speakers are made, it just uses the value when the script was started, so being able to animate that value just confuses things. Jan 23 at 7:10

By default, props has ANIMATABLE option. Just override it by passing empty set:

Frame: bpy.props.IntProperty(
name = "frame",
default = 0,
options = set()
)

• Thank you, modifying this a little has appeared to have fixed it. Instead of [] I used options = {'HIDDEN'} and it appears to be working. Jan 23 at 11:29
• I just found that I've used : instead of '='. That was a mistake. But yes, I can mess up with the names: list, array, set, dictionary, etc... Jan 23 at 11:29
• @Smail at least I've shown the direction, I'm not a pro in Python, as you see Jan 23 at 11:31
• A direction's sometimes better than an answer since it leads you to think for yourself. I'll mark the answer correct; could change it to {'HIDDEN'}? Jan 23 at 11:33
• I've checked, seems to be that Gorgious's comment is correct. Changing to set() Jan 23 at 11:43