text.py 542 B

12345678910111213141516171819
  1. # Copyright (C) 2009-2017, Panagiotis Christopoulos Charitos and contributors.
  2. # All rights reserved.
  3. # Code licensed under the BSD License.
  4. # http://www.anki3d.org/LICENSE
  5. # keep in alphabetical order
  6. import bpy
  7. from bpy.types import Operator
  8. class ANKI_TEXT_reload_run(Operator):
  9. """ANKI reload and run text"""
  10. bl_idname = "anki.reload_build"
  11. bl_label = "Reload Run Text"
  12. bl_options = {'REGISTER'}
  13. def execute(self, context):
  14. bpy.ops.text.reload()
  15. bpy.ops.text.run_script()
  16. return {'FINISHED'}