def reference_turntable(): current_project = get_current_project.get_current_project() current_root = Project(current_project).primary turn_table_template_path = "%s/%s/templates/turnTable/turn_table.mb" % ( current_root, current_project) if os.path.isfile(turn_table_template_path): mc.file(turn_table_template_path, r=1, namespace='turntable') else: mc.confirmDialog(title='Error', message='turn table not exists')
def __init__(self, parent=None): super(LayoutProducer, self).__init__(parent) self.setObjectName("LayoutProducer") self.setStyle(QStyleFactory.create('plastique')) self.setStyleSheet(open(qss_path, 'r').read()) self.setWindowFlags(Qt.Window) self.__threads = list() self.__show_thread = CollectAssetsThread() self.__projects = pipeMira.get_projects() self.__current_project = get_current_project.get_current_project() self.__asset_model_data = list() self.__include_model_data = list() self.init() self.set_asset_model() self.set_include_model() self.set_signals()
def init_info_combo(self): projects = pipeGlobal.projects self.project_cbox.addItems(projects) current_project = get_current_project.get_current_project() self.project_cbox.setCurrentIndex( self.project_cbox.findText(current_project)) if self.run_app.endswith("maya.exe"): obj = pipeFile.PathDetails.parse_path() if obj: seq = obj.seq shot = obj.shot self.sequence_le.setText(seq) self.shot_le.setText(shot) path = pipeFile.get_shot_step_dir(seq, shot, "anim", "_publish", current_project) self.path_le.setText(os.path.dirname(path)) self.set_model(os.path.dirname(path))
def __init__(self, parent=None): super(SwitchShader, self).__init__(parent) self.logger = logging.getLogger(__name__) self.setWindowFlags(Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowMinimizeButtonHint) self.setWindowTitle("Switch Shader") self.resize(400, 350) self.current_project = get_current_project.get_current_project() self.__db = sql_api.SqlApi(self.current_project) main_layout = QVBoxLayout(self) main_layout.setContentsMargins(4, 4, 4, 4) self.filter_layout = QHBoxLayout() self.filter_le = Filter() self.filter_layout.addStretch() self.filter_layout.addWidget(self.filter_le) self.update_btn = QToolButton() icon_path = join_path.join_path2(pipeGlobal.icons_dir, "update.png") self.update_btn.setIcon(QIcon(icon_path)) self.update_btn.setStyleSheet( "QToolButton{background:transparent;}" "QToolButton::hover{background:#00BFFF;border-color:#00BFFF;}") self.filter_layout.addWidget(self.update_btn) self.table_view = QTableView() self.table_view.verticalHeader().hide() self.table_view.horizontalHeader().setStretchLastSection(True) self.table_view.setSortingEnabled(True) self.table_view.setAlternatingRowColors(True) self.table_view.setSelectionBehavior(QAbstractItemView.SelectRows) self.btn_layout = QHBoxLayout() self.switch_btn = QPushButton("Switch") self.cancel_btn = QPushButton("Cancel") self.btn_layout.addStretch() self.btn_layout.addWidget(self.switch_btn) self.btn_layout.addWidget(self.cancel_btn) main_layout.addLayout(self.filter_layout) main_layout.addWidget(self.table_view) main_layout.addLayout(self.btn_layout) self.set_model() self.set_signals()
def set_project_when_scene_opened(self, *args): current_project = get_current_project.get_current_project() self.project = current_project self.set_project(self.project)
def __init__(self): self.current_project = get_current_project.get_current_project() self.current_root = Project(self.current_project).primary