Exemplo n.º 1
0
    def execute(self, context):
        if state.compileproc != None:
            return {"CANCELLED"}

        if not armutils.check_saved(self):
            return {"CANCELLED"}

        if not armutils.check_camera(self):
            return {"CANCELLED"}

        if not armutils.check_sdkpath(self):
            return {"CANCELLED"}

        if context.area == None:
            return {"CANCELLED"}

        nodes_renderpath.check_default()

        assets.invalidate_enabled = False
        if state.playproc == None and state.krom_running == False:
            if context.area.type != 'VIEW_3D':
                return {"CANCELLED"}
            log.clear()
            # Cancel viewport render
            for space in context.area.spaces:
                if space.type == 'VIEW_3D':
                    if space.viewport_shade == 'RENDERED':
                        space.viewport_shade = 'SOLID'
                    break
            make.play_project(True)
        else:
            make.play_project(True)
        assets.invalidate_enabled = True
        return{'FINISHED'}
Exemplo n.º 2
0
    def execute(self, context):
        if not armutils.check_saved(self):
            return {"CANCELLED"}

        if not armutils.check_camera(self):
            return {"CANCELLED"}
            
        nodes_renderpath.check_default()

        assets.invalidate_enabled = False
        make.play_project(self, False)
        assets.invalidate_enabled = True
        return{'FINISHED'}
Exemplo n.º 3
0
    def execute(self, context):
        if not armutils.check_saved(self):
            return {"CANCELLED"}

        if not armutils.check_camera(self):
            return {"CANCELLED"}

        if not armutils.check_sdkpath(self):
            return {"CANCELLED"}

        make.publish_project()
        self.report({'INFO'}, 'Publishing project, check console for details.')
        return{'FINISHED'}
Exemplo n.º 4
0
    def execute(self, context):
        if not armutils.check_saved(self):
            return {"CANCELLED"}

        if not armutils.check_camera(self):
            return {"CANCELLED"}

        if not armutils.check_sdkpath(self):
            return {"CANCELLED"}

        state.target = bpy.data.worlds['Arm'].arm_project_target
        assets.invalidate_enabled = False
        make.build_project(target=state.target)
        make.compile_project(target_name=state.target, watch=True)
        assets.invalidate_enabled = True
        return{'FINISHED'}
Exemplo n.º 5
0
    def execute(self, context):
        if not armutils.check_saved(self):
            return {"CANCELLED"}

        if not armutils.check_camera(self):
            return {"CANCELLED"}

        if not armutils.check_sdkpath(self):
            return {"CANCELLED"}

        state.target = make.runtime_to_target(in_viewport=False)
        assets.invalidate_enabled = False
        make.build_project(target=state.target)
        make.compile_project(target_name=state.target, watch=True)
        assets.invalidate_enabled = True
        return{'FINISHED'}
Exemplo n.º 6
0
    def execute(self, context):
        if state.compileproc != None:
            return {"CANCELLED"}
        
        if not armutils.check_saved(self):
            return {"CANCELLED"}

        if not armutils.check_camera(self):
            return {"CANCELLED"}

        if not armutils.check_sdkpath(self):
            return {"CANCELLED"}
            
        nodes_renderpath.check_default()

        assets.invalidate_enabled = False
        make.play_project(False)
        assets.invalidate_enabled = True
        return{'FINISHED'}
Exemplo n.º 7
0
    def execute(self, context):
        if not armutils.check_saved(self):
            return {"CANCELLED"}

        if not armutils.check_camera(self):
            return {"CANCELLED"}

        nodes_renderpath.check_default()

        assets.invalidate_enabled = False
        if state.playproc == None:
            log.clear()
            # Cancel viewport render
            for space in context.area.spaces:
                if space.type == 'VIEW_3D':
                    if space.viewport_shade == 'RENDERED':
                        space.viewport_shade = 'SOLID'
                    break
            make.play_project(self, True)
        else:
            make.patch_project()
            make.compile_project()
        assets.invalidate_enabled = True
        return{'FINISHED'}