Esempio n. 1
0
 def execute(self, _context):
     try:
         config = pman.get_config(os.path.dirname(bpy.data.filepath) if bpy.data.filepath else None)
         if config['run']['auto_save']:
             bpy.ops.wm.save_mainfile()
         pman.run(config)
         return {'FINISHED'}
     except pman.PManException as err:
         self.report({'ERROR'}, str(err))
         return {'CANCELLED'}
Esempio n. 2
0
def test_run_args(projectdir):
    with open('main.py', 'w') as main_file:
        main_file.write(EXTRA_ARGS_MAIN)

    config = pman.get_config()
    config['run']['extra_args'] = "--test 'hello world'"
    config.write()

    pman.run()

    with open('tmp', 'r') as tmpfile:
        assert tmpfile.read() == "['--test', 'hello world']"
Esempio n. 3
0
 def execute(self, _context):
     try:
         config = pman.get_config(
             os.path.dirname(bpy.data.filepath) if bpy.data.
             filepath else None)
         if config['run']['auto_save']:
             bpy.ops.wm.save_mainfile()
         pman.run(config)
         return {'FINISHED'}
     except pman.PManException as err:
         self.report({'ERROR'}, str(err))
         return {'CANCELLED'}
Esempio n. 4
0
def run(_, config):
    pman.run(config)
Esempio n. 5
0
def run(_):
    pman.run()