Exemplo n.º 1
0
def assets_done():
    if state.proc_build == None:
        return
    result = state.proc_build.poll()
    if result == 0:
        # Connect to the compilation server
        os.chdir(arm.utils.build_dir() + '/debug/')
        cmd = [
            arm.utils.get_haxe_path(), '--connect', '6000', 'project-krom.hxml'
        ]
        state.proc_build = run_proc(cmd, compilation_server_done)
    else:
        state.proc_build = None
        state.redraw_ui = True
        log.print_info('Build failed, check console')
Exemplo n.º 2
0
def watch_compile(mode):
    state.compileproc.wait()
    log.print_progress(100)
    if state.compileproc == None:  ##
        return
    result = state.compileproc.poll()
    state.compileproc = None
    state.compileproc_finished = True
    if result == 0:
        bpy.data.worlds['Arm'].arm_recompile = False
        state.compileproc_success = True
        on_compiled(mode)
    else:
        state.compileproc_success = False
        log.print_info('Build failed, check console')
Exemplo n.º 3
0
def check_projectpath(self):
    s = get_fp()
    if check_path(s) == False:
        msg = "Project path '{0}' contains special characters, build process may fail.".format(s)
        self.report({"ERROR"}, msg) if self != None else log.print_info(msg)
        return False
    else:
        return True
Exemplo n.º 4
0
def check_sdkpath(self):
    s = get_sdk_path()
    if check_path(s) == False:
        msg = "SDK path '{0}' contains special characters. Please move SDK to different path for now.".format(s)
        self.report({"ERROR"}, msg) if self != None else log.print_info(msg)
        return False
    else:
        return True
Exemplo n.º 5
0
def check_engine(self):
    if bpy.context == None or bpy.context.scene == None:
        return False
    engine = bpy.context.scene.render.engine
    if engine != 'CYCLES' and engine != 'BLENDER_EEVEE' and engine != 'ARMORY':
        msg = "Switch to Armory, Cycles or Eevee engine first"
        self.report({"ERROR"}, msg) if self != None else log.print_info(msg)
        return False
    return True
Exemplo n.º 6
0
def check_saved(self):
    if bpy.data.filepath == "":
        msg = "Save blend file first"
        self.report({"ERROR"}, msg) if self != None else log.print_info(msg)
        return False
    return True