def _login(self, op, context, *args): """ The execute method for the auth.login operator. Sets the functions to per performed by the authentication thread and updates the session page to "REDIRECT" while the thread executes. :Args: - op (:class:`bpy.types.Operator`): An instance of the current operator class. - context (:class:`bpy.types.Context`): The current blender context. :Returns: - Blender-specific value {'FINISHED'} to indicate the operator has completed its action. """ auth_thread = lambda: BatchAppsOps.session(self.web_authentication) self.props.thread = threading.Thread(name="AuthThread", target=auth_thread) bpy.ops.batchapps_auth.redirect('INVOKE_DEFAULT') if context.scene.batchapps_session.page == "LOGIN": context.scene.batchapps_session.page = "REDIRECT" return {'FINISHED'}
def _start(self, op, context, *args): """ The execute method for the submission.start operator. Sets the functions to be performed by the job submission thread and updates the session page to "PROCESSING" while the thread executes. :Args: - op (:class:`bpy.types.Operator`): An instance of the current operator class. - context (:class:`bpy.types.Context`): The current blender context. :Returns: - Blender-specific value {'FINISHED'} to indicate the operator has completed its action. """ submit_thread = lambda: BatchAppsOps.session(self.submit_job) self.props.thread = threading.Thread(name="SubmitThread", target=submit_thread) bpy.ops.batchapps_submission.processing('INVOKE_DEFAULT') if context.scene.batchapps_session.page == "SUBMIT": context.scene.batchapps_session.page = "PROCESSING" return {'FINISHED'}
def _start(self, op, context, *args): """ The execute method for the submission.start operator. Sets the functions to be performed by the job submission thread and updates the session page to "PROCESSING" while the thread executes. :Args: - op (:class:`bpy.types.Operator`): An instance of the current operator class. - context (:class:`bpy.types.Context`): The current blender context. :Returns: - Blender-specific value {'FINISHED'} to indicate the operator has completed its action. """ submit_thread = lambda: BatchAppsOps.session(self.submit_job) self.props.thread = threading.Thread(name="SubmitThread", target=submit_thread) bpy.ops.batchapps_submission.processing('INVOKE_DEFAULT') if context.scene.batchapps_session.page == "SUBMIT": context.scene.batchapps_session.page = "PROCESSING" return {'FINISHED'}
def _login(self, op, context, *args): """ The execute method for the auth.login operator. Sets the functions to per performed by the authentication thread and updates the session page to "REDIRECT" while the thread executes. :Args: - op (:class:`bpy.types.Operator`): An instance of the current operator class. - context (:class:`bpy.types.Context`): The current blender context. :Returns: - Blender-specific value {'FINISHED'} to indicate the operator has completed its action. """ auth_thread = lambda: BatchAppsOps.session(self.web_authentication) self.props.thread = threading.Thread(name="AuthThread", target=auth_thread) bpy.ops.batchapps_auth.redirect('INVOKE_DEFAULT') if context.scene.batchapps_session.page == "LOGIN": context.scene.batchapps_session.page = "REDIRECT" return {'FINISHED'}
def _history(self, op, context, *args): """ The execute method for the history.page operator. Sets the functions to be performed by the job data retrieval thread and updates the session page to "LOADING" while the thread executes. Also resets the job display paging controls. :Args: - op (:class:`bpy.types.Operator`): An instance of the current operator class. - context (:class:`bpy.types.Context`): The current blender context. :Returns: - Blender-specific value {'FINISHED'} to indicate the operator has completed its action. """ self.props.display = context.scene.batchapps_history self.props.display.selected = -1 self.props.display.index = 0 self.props.display.total_count = 0 history_thread = lambda: BatchAppsOps.session(self.get_job_list) self.props.thread = threading.Thread(name="HistoryThread", target=history_thread) bpy.ops.batchapps_history.loading('INVOKE_DEFAULT') if context.scene.batchapps_session.page == "HOME": context.scene.batchapps_session.page = "LOADING" return {'FINISHED'}
def _history(self, op, context, *args): """ The execute method for the history.page operator. Sets the functions to be performed by the job data retrieval thread and updates the session page to "LOADING" while the thread executes. Also resets the job display paging controls. :Args: - op (:class:`bpy.types.Operator`): An instance of the current operator class. - context (:class:`bpy.types.Context`): The current blender context. :Returns: - Blender-specific value {'FINISHED'} to indicate the operator has completed its action. """ self.props.display = context.scene.batchapps_history self.props.display.selected = -1 self.props.display.index = 0 self.props.display.total_count = 0 history_thread = lambda: BatchAppsOps.session(self.get_job_list) self.props.thread = threading.Thread(name="HistoryThread", target=history_thread) bpy.ops.batchapps_history.loading('INVOKE_DEFAULT') if context.scene.batchapps_session.page == "HOME": context.scene.batchapps_session.page = "LOADING" return {'FINISHED'}