# What is the Python script to set the current frame

I have made a script to generate a game asset in one click ( http://blenderartists.org/forum/showthread.php?383624-Dark-Blender-(Official-Thread)-optimized-for-sculpting-and-game-asset-creation ). My script save the textures by doing a render and import them with the .0001 number meaning frame 1. If the frame is changed my script is unable to find the texture.0001 so i want to set at the beginning of my Python script the frame to 1.

bpy.context.scene.frame_current = 1
bpy.context.scene.frame_set(1)
• frame_current should only really be used as a read-only property. See: blender.stackexchange.com/a/6510/241 – Ray Mairlot Jun 10 '16 at 23:35
• @IvanKartofanov You need to import the bpy module. Just insert the line import bpy as the first line of the script. – Leander Feb 21 '18 at 20:10