def _on_take_screenshot(self): if state.get('playing'): state.set('playing', False) directory = str( QFileDialog.getExistingDirectory(self, "Select Directory")) if directory is not None and directory != '': popup(dialog=ScreenshotProgressDialog, dialog_args=(directory, ))
def _submit(self): if self._is_server_on: shot = state.get('current_shot') if not shot.is_cali(): result = popup(dialog=ShotSubmitDialog) if result: popup(dialog=SubmitProgressDialog, dialog_args=(result['name'], result['frames'], result['parms'])) else: state.cast('camera', 'submit_shot', shot.name, [0], {}) else: self._check_server()
def _new_project(self): if state.get('project_new_dialog'): result = popup(self, 'Create New Project', "Please input new project's name", 'Project Name') if result: state.cast('project', 'create_project', result) state.set('project_new_dialog', False)
def _new_shot(self): if state.get('shot_new_dialog'): is_cali = state.get('is_cali') shot_type = 'cali' if is_cali else 'shot' result = popup(None, f'Create New {shot_type.title()}', f"Please input new {shot_type}'s name (optional)", f'{shot_type.title()} Name') if result is not False: project = state.get('current_project') project.create_shot(is_cali, result) state.set('shot_new_dialog', False)
def _remove(self): if (popup(None, 'Delete Shot Confirm', f'Are you sure to delete [{self._shot.name}]?')): self._shot.remove()
def _rename(self): result = popup(None, 'Rename Shot', "Please input new shot's name", f'Shot Name:{self._shot.name}') if result and result != self._shot.name: self._shot.rename(result)
def _show_parameters(self): popup(dialog=CameraParametersDialog)
def _on_cache(self): popup(dialog=CacheProgressDialog)
def _remove(self): if (popup(None, 'Delete Project Confirm', f'Are you sure to delete [{self._project.name}]?')): self._project.remove()
def _rename(self): result = popup(None, 'Rename Project', "Please input new project's name", f'Project Name:{self._project.name}') if result and result != self._project.name: self._project.rename(result)
def _export_model(self): directory = str( QFileDialog.getExistingDirectory(self, "Select Directory")) if directory is not None and directory != '': popup(dialog=ExportProgressDialog, dialog_args=(directory, ))