(self)
When PROJECT selected in UI
When PROJECT selected in UI
When PROJECT selected in UI
def init_project(self):
        """
        When PROJECT selected in UI
        """

        # Show and set up PROPERTIES widget
        self.project_properties_ui.show()
        self.asset_properties_ui.hide()
        self.sequence_properties_ui.hide()
        self.shot_properties_ui.hide()

        # Setup data
        model_index = self.listProjects.currentIndex()  # .selectedIndexes()[0]
        project_id = model_index.data(QtCore.Qt.UserRole + 1)
        project = self.eve_data.get_project(project_id)
        self.selected_project = project
        self.eve_data.get_project_assets(project)
        self.eve_data.get_project_sequences(project)

        # Clear SHOTS in UI
        self.listShots.setModel(models.ListModel([]))

        # Fill Project Properties widget
        project_root = build_project_root(project.name)
        self.project_properties_ui.project_ui.linProjectLocation.setText(project_root)
        self.project_properties_ui.project_ui.linProjectLocation.setEnabled(False)
        self.project_properties_ui.project_ui.linProjectName.setText(project.name)
        self.project_properties_ui.project_ui.linProjectName.setEnabled(False)
        self.project_properties_ui.project_ui.linHoudini.setText(project.houdini_build)
        self.project_properties_ui.project_ui.linProjectWidth.setText(str(project.width))
        self.project_properties_ui.project_ui.linProjectHeight.setText(str(project.height))
        self.project_properties_ui.project_ui.txtDescription.setText(project.description)

        # FILL ASSET and SEQUENCE WIDGETS
        self.model_assets = models.ListModel(self.eve_data.project_assets)
        self.listAssets.setModel(self.model_assets)

        self.model_sequences = models.ListModel(self.eve_data.project_sequences)
        self.listSequences.setModel(self.model_sequences)

        # Enable/disable UI buttons depending on project existence
        if os.path.exists(project_root):
            self.project_properties_ui.btnCreateProject.setText(self.btn_project_update)
            self.project_properties_ui.btnLaunchHoudini.setEnabled(True)
            self.project_properties_ui.btnLaunchNuke.setEnabled(True)
            self.project_properties_ui.btnOpenFolder.setEnabled(True)
        else:
            self.project_properties_ui.btnCreateProject.setText(self.btn_project_create)
            self.project_properties_ui.btnLaunchHoudini.setEnabled(False)
            self.project_properties_ui.btnLaunchNuke.setEnabled(False)
            self.project_properties_ui.btnOpenFolder.setEnabled(False)
def init_project ( self ) : # Show and set up PROPERTIES widget self . project_properties_ui . show ( ) self . asset_properties_ui . hide ( ) self . sequence_properties_ui . hide ( ) self . shot_properties_ui . hide ( ) # Setup data model_index = self . listProjects . currentIndex ( ) # .selectedIndexes()[0] project_id = model_index . data ( QtCore . Qt . UserRole + 1 ) project = self . eve_data . get_project ( project_id ) self . selected_project = project self . eve_data . get_project_assets ( project ) self . eve_data . get_project_sequences ( project ) # Clear SHOTS in UI self . listShots . setModel ( models . ListModel ( [ ] ) ) # Fill Project Properties widget project_root = build_project_root ( project . name ) self . project_properties_ui . project_ui . linProjectLocation . setText ( project_root ) self . project_properties_ui . project_ui . linProjectLocation . setEnabled ( False ) self . project_properties_ui . project_ui . linProjectName . setText ( project . name ) self . project_properties_ui . project_ui . linProjectName . setEnabled ( False ) self . project_properties_ui . project_ui . linHoudini . setText ( project . houdini_build ) self . project_properties_ui . project_ui . linProjectWidth . setText ( str ( project . width ) ) self . project_properties_ui . project_ui . linProjectHeight . setText ( str ( project . height ) ) self . project_properties_ui . project_ui . txtDescription . setText ( project . description ) # FILL ASSET and SEQUENCE WIDGETS self . model_assets = models . ListModel ( self . eve_data . project_assets ) self . listAssets . setModel ( self . model_assets ) self . model_sequences = models . ListModel ( self . eve_data . project_sequences ) self . listSequences . setModel ( self . model_sequences ) # Enable/disable UI buttons depending on project existence if os . path . exists ( project_root ) : self . project_properties_ui . btnCreateProject . setText ( self . btn_project_update ) self . project_properties_ui . btnLaunchHoudini . setEnabled ( True ) self . project_properties_ui . btnLaunchNuke . setEnabled ( True ) self . project_properties_ui . btnOpenFolder . setEnabled ( True ) else : self . project_properties_ui . btnCreateProject . setText ( self . btn_project_create ) self . project_properties_ui . btnLaunchHoudini . setEnabled ( False ) self . project_properties_ui . btnLaunchNuke . setEnabled ( False ) self . project_properties_ui . btnOpenFolder . setEnabled ( False )