(self)
When ASSET selected in UI
When ASSET selected in UI
When ASSET selected in UI
def init_asset(self):
        """
        When ASSET selected in UI
        """

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

        # Setup data
        model_index = self.listAssets.currentIndex()
        asset_id = model_index.data(QtCore.Qt.UserRole + 1)
        asset = self.eve_data.get_asset(asset_id)
        self.selected_asset = asset

        # Fill ASSET WIDGET
        self.asset_properties_ui.asset_ui.linAssetName.setEnabled(False)
        self.asset_properties_ui.asset_ui.linProjectName.setText(self.selected_project.name)
        self.asset_properties_ui.asset_ui.linAssetName.setText(asset.name)

        model_asset_types = models.ListModel(self.eve_data.asset_types)
        self.asset_properties_ui.asset_ui.comAssetType.setModel(model_asset_types)
        # Find AssetType string by database index
        # !!! Probably wrong implementation of model data! and can be done via ListModel() !!!!!
        asset_type_string = self.eve_data.get_asset_type_string(asset.type)
        self.asset_properties_ui.asset_ui.comAssetType.setCurrentText(asset_type_string)
        self.asset_properties_ui.asset_ui.txtDescription.setText(asset.description)
def init_asset ( self ) : # Show and set up PROPERTIES widget self . project_properties_ui . hide ( ) self . asset_properties_ui . show ( ) self . sequence_properties_ui . hide ( ) self . shot_properties_ui . hide ( ) # Setup data model_index = self . listAssets . currentIndex ( ) asset_id = model_index . data ( QtCore . Qt . UserRole + 1 ) asset = self . eve_data . get_asset ( asset_id ) self . selected_asset = asset # Fill ASSET WIDGET self . asset_properties_ui . asset_ui . linAssetName . setEnabled ( False ) self . asset_properties_ui . asset_ui . linProjectName . setText ( self . selected_project . name ) self . asset_properties_ui . asset_ui . linAssetName . setText ( asset . name ) model_asset_types = models . ListModel ( self . eve_data . asset_types ) self . asset_properties_ui . asset_ui . comAssetType . setModel ( model_asset_types ) # Find AssetType string by database index # !!! Probably wrong implementation of model data! and can be done via ListModel() !!!!! asset_type_string = self . eve_data . get_asset_type_string ( asset . type ) self . asset_properties_ui . asset_ui . comAssetType . setCurrentText ( asset_type_string ) self . asset_properties_ui . asset_ui . txtDescription . setText ( asset . description )