Shuvit game master repo. http://shuvit.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

refresh_scripts.py 319B

123456789
  1. reload_on = False #reload from external file or save all from internal
  2. import bpy
  3. area = bpy.context.area
  4. for text in bpy.data.texts:
  5. area.spaces[0].text = text
  6. if text.filepath != '' and reload_on == True:
  7. bpy.ops.text.reload()
  8. if text.filepath != '' and text.is_dirty:
  9. bpy.ops.text.save()