I am trying to write a script that allows me to set the frame to a specific number when I press a button. However I can’t work out how to make the UI button into a button rather than a slider. Here’s my current script:
import bpy class SetFrame (bpy.types.Panel): bl_label = "Set Frame" bl_space_type = "VIEW_3D" bl_region_type = "TOOLS" bl_context = "objectmode" def draw(self, context): layout = self.layout col = layout.column(align=True) col.prop(bpy.context.scene, "frame_current", index=30,) bpy.utils.register_class(SetFrame)
What I want it to do is create a button that I can press to set the frame number to X (say 30 for example), rather than having to input the number with a slider or something (as happens currently).