Example #1
0
	def initUI(self):
		# self.setMinimumSize(200, 100)

		self.ui = ui.loadUiWidgetFromPyFile(__file__, parent=self)

		# layout
		self.setLayout(QtGui.QVBoxLayout())
		self.layout().addWidget(self.ui)
		self.layout().setSpacing(0)
		self.layout().setContentsMargins(2, 2, 2, 2)

		# table list config
		self.ui.tw_namesList.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
		self.ui.tw_namesList.insertColumn(0)
		self.ui.tw_namesList.insertColumn(1)
		self.ui.tw_namesList.horizontalHeader().setResizeMode(0, QtGui.QHeaderView.Stretch)
		self.ui.tw_namesList.horizontalHeader().setResizeMode(1, QtGui.QHeaderView.Stretch)
		lHeaders = ["Names Before", "Names After"]
		self.ui.tw_namesList.setHorizontalHeaderLabels(lHeaders)
		self.ui.tw_namesList.verticalHeader().hide()

		# fill UI info
		self.ui.cb_operateOn.addItems(["All", "Transforms", "Geometry", "Nurbs", "Polygon Objects", "Cameras", "Joints", "ikHandles", "Sets", "Lights", "Shaders"])
		self.ui.cb_numberedOrder.addItems(["Ascending", "Descending"])
		self.ui.cb_letteredOrder.addItems(["Ascending", "Descending"])
		self.letteredStartingUpdate()
		self.fillList()

		# signals connect
		self.signalsConnect()		

		# launch start scriptJobs
		self.updateSelectionChangedScriptJob()
Example #2
0
	def initUI(self):
		# self.setMinimumSize(200, 100)

		self.ui = ui.loadUiWidgetFromPyFile(__file__, parent=self)

		# layout
		self.setLayout(QtGui.QVBoxLayout())
		self.layout().addWidget(self.ui)
		self.layout().setSpacing(0)
		self.layout().setContentsMargins(2, 2, 2, 2)

		# fill UI info
		isValid = self.isValidContext()
		if isValid:
			self.ui.cb_imagePlanes.addItems(shader.getAllSceneImagePlanes())
		else:
			self.ui.setEnabled(False)
			cmds.confirmDialog(t="Alert", message="There are no ImagePlanes in the scene, there must be one at least.", button=["OK"], icon="warning")
		
		# add signals to the ui elements
		self.ui.pb_bakeImagePlane.clicked.connect(self.bakeImagePlane)
		self.ui.pb_useBackgroundShader.clicked.connect(self.applyUseBackgroundShader)
		self.ui.pb_lambertProjection.clicked.connect(self.applyLambertShader)
		self.ui.pb_surfaceShader.clicked.connect(self.applySurfaceShader)
		self.ui.pb_applyGreenScreenShader.clicked.connect(self.applyGreenScreenShader)
		self.ui.pb_applyGreenScreenShaderFx.clicked.connect(self.applyGreenScreenShaderFx)
		self.ui.pb_applyDefaultShader.clicked.connect(self.applyDefaultShader)
Example #3
0
    def initUI(self):
        # Load UI file

        self.ui = ui.loadUiWidgetFromPyFile(__file__, parent=self)

        # Layout

        self.setLayout(QtGui.QVBoxLayout())
        self.layout().addWidget(self.ui)
        self.layout().setSpacing(0)
        self.layout().setContentsMargins(2, 2, 2, 2)

        # Store ui elements for use later in signals or functions

        self.sld_cartoon_level = ui.get_child(self.ui, "sld_cartoon_level")
        self.rb_drama = ui.get_child(self.ui, "rb_drama")
        self.rb_comedy = ui.get_child(self.ui, "rb_comedy")
        self.rb_mistery = ui.get_child(self.ui, "rb_mistery")
        self.pb_apply = ui.get_child(self.ui, "pb_apply")
        self.pb_unapply = ui.get_child(self.ui, "pb_unapply")
        self.pb_para_final = ui.get_child(self.ui, "pb_para_final")

        # Connect signals

        self.pb_para_final.clicked.connect(self.make_film)
        self.pb_apply.clicked.connect(self.make_film)
        self.pb_unapply.clicked.connect(self.make_film)
Example #4
0
	def initUI(self):
		# self.setMinimumSize(200, 100)

		self.ui = ui.loadUiWidgetFromPyFile(__file__, parent=self)

		# layout
		self.setLayout(QtGui.QVBoxLayout())
		self.layout().addWidget(self.ui)
		self.layout().setSpacing(0)
		self.layout().setContentsMargins(2, 2, 2, 2)

		# fill UI info
		isValid = self.isValidContext()
		if isValid:
			self.ui.cb_job.addItem(jobTls.jobName())
			self.ui.cb_scene.addItem(jobTls.sceneName())
			self.ui.cb_shot.addItem(jobTls.shotName())
			self.ui.cb_playblast.addItems(self.getCurrentJobPlayblastPathsShot())
			self.ui.cb_colors.addItems(["256", "128", "64", "32", "16", "8"])
			self.ui.cb_colors.setCurrentIndex(1)
		else:
			self.ui.setEnabled(False)
			cmds.confirmDialog(t="Alert", message="You must job in a shot to use this tool", button=["OK"], icon="warning")
		
		# add signals to the ui elements
		self.ui.pb_createGIF.clicked.connect(self.createGIF)
Example #5
0
	def initUI(self):
		# self.setMinimumSize(200, 100)

		# load UI file
		self.ui = ui.loadUiWidgetFromPyFile(__file__, parent=self)

		# layout
		self.setLayout(QtGui.QVBoxLayout())
		self.layout().addWidget(self.ui)
		self.layout().setSpacing(0)
		self.layout().setContentsMargins(2, 2, 2, 2)
Example #6
0
	def initUI(self):
		# color vars
		self.foregroundColor = QtGui.QColor(200,200,200)
		self.categoryColor = QtGui.QColor(75,75,75)
		self.openStateColor = QtGui.QColor(0,255,100)
		self.closeStateColor = QtGui.QColor(255,160,0)
		self.executeStateColor = QtGui.QColor(0,170,255)

		self.categoryIcon = icons.getIconByName("folder_16x16.png")
		self.toolIcon = icons.getIconByName("tool_16x16.png")
		self.toolOpenIcon = icons.getIconByName("tool-open_16x16.png")
		self.scriptIcon = icons.getIconByName("gear_16x16.png")

		# load UI file
		self.ui = ui.loadUiWidgetFromPyFile(__file__, parent=self)

		# layout
		self.setLayout(QtGui.QVBoxLayout())
		self.layout().addWidget(self.ui)
		self.layout().setSpacing(0)
		self.layout().setContentsMargins(2, 2, 2, 2)

		# fNewFont = QtGui.QFont("Courier",8,QtGui.QFont.Normal)
		# fNewFont.setLetterSpacing(QtGui.QFont.PercentageSpacing,0.0)

		# tree config
		self.ui.tr_toolsTree.setColumnCount(3)
		self.ui.tr_toolsTree.setHeaderLabels(["Name", "State", "h_FileName", "h_type"])
		self.ui.tr_toolsTree.setColumnHidden(2, True)
		self.ui.tr_toolsTree.setColumnHidden(3, True)
		self.ui.tr_toolsTree.header().setResizeMode(0, QtGui.QHeaderView.Stretch)
		self.ui.tr_toolsTree.header().setResizeMode(1, QtGui.QHeaderView.Fixed)
		self.ui.tr_toolsTree.setColumnWidth(1,73)
		# self.ui.tr_toolsTree.setTextAlignment(1, QtCore.Qt.AlignVCenter)

		# tree fill
		self.fillTree()

		# add signals to the ui elements
		self.ui.rb_filterAnd.clicked.connect(self.refresh)
		self.ui.rb_filterOr.clicked.connect(self.refresh)
		self.ui.le_filter.editingFinished.connect(self.refresh)
		self.ui.cb_showTools.clicked.connect(self.refresh)
		self.ui.cb_showScripts.clicked.connect(self.refresh)
		self.ui.pb_refresh.clicked.connect(self.refresh)
		self.ui.pb_closeAll.clicked.connect(self.closeAll)
		self.ui.tr_toolsTree.itemClicked.connect(self.clickTreeItemExecution)
		self.ui.tr_toolsTree.itemDoubleClicked.connect(self.doubleClickTreeItemExecution)

		self.ui.tr_toolsTree.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
		self.ui.tr_toolsTree.customContextMenuRequested.connect(self.treeMenu)
Example #7
0
    def initUI(self):
        self.setMinimumSize(800, 600)

        self.ui = ui.loadUiWidgetFromPyFile(__file__, parent=self)

        # layout
        self.setLayout(QtGui.QVBoxLayout())
        # self.layout().addWidget(self.ui)
        self.layout().setSpacing(0)
        self.layout().setContentsMargins(2, 2, 2, 2)

        # self.vp_main_video = ui.get_child(self.ui, "vp_main_video")

        self.init_video()
	def initUI(self):
		# self.setMinimumSize(200, 100)

		self.ui = ui.loadUiWidgetFromPyFile(__file__, parent=self)

		# layout
		self.setLayout(QtGui.QVBoxLayout())
		self.layout().addWidget(self.ui)
		self.layout().setSpacing(0)
		self.layout().setContentsMargins(2, 2, 2, 2)

		# fill UI info

		# add signals to the ui elements
		self.ui.pb_install.clicked.connect(self.installToolCage)
		self.ui.pb_uninstall.clicked.connect(self.uninstallToolCage)
Example #9
0
	def initUI(self):
		# self.setMinimumSize(200, 100)

		self.ui = ui.loadUiWidgetFromPyFile(__file__, parent=self)

		# layout
		self.setLayout(QtGui.QVBoxLayout())
		self.layout().addWidget(self.ui)
		self.layout().setSpacing(0)
		self.layout().setContentsMargins(2, 2, 2, 2)

		# fill UI info
		self.fillSceneACPdynamicsList()
		self.useSceneFrameRange()

		# add signals to the ui elements
		self.ui.pb_toBake.clicked.connect(self.toBakeList)
		self.ui.pb_toScene.clicked.connect(self.toSceneList)
		self.ui.pb_fillFromScene.clicked.connect(self.fillListsFromSelection)
		self.ui.sb_start.editingFinished.connect(self.preserveFrameRangeValidityUp)
		self.ui.sb_end.editingFinished.connect(self.preserveFrameRangeValidityDown)
		self.ui.pb_reset.clicked.connect(self.useSceneFrameRange)
		self.ui.pb_bake.clicked.connect(self.bake)
Example #10
0
	def initUI(self):
		# color vars
		self.nodeset_color = QtGui.QColor(25,25,25)

		# Icons
		self.layersNewIcon = icons.getIconByName("layers_16x16.png")
		self.layersNewSelectionIcon = icons.getIconByName("layersNew_16x16.png")
		self.layersDuplicateIcon = icons.getIconByName("layersDuplicate_16x16.png")
		self.layersDeleteIcon = icons.getIconByName("layersDelete_16x16.png")
		self.layersAddIcon = icons.getIconByName("layersAdd_16x16.png")
		self.layersRemoveIcon = icons.getIconByName("layersRemove_16x16.png")
		self.layersClearIcon = icons.getIconByName("layersClear_16x16.png")
		self.layersSelectObjectsIcon = icons.getIconByName("layersSelectObjects_16x16.png")
		self.layersSelectIcon = icons.getIconByName("layersSelect_16x16.png")
		self.layersLoadIcon = icons.getIconByName("layersLoad_16x16.png")
		self.objectIcon = icons.getIconByName("3Dobject_16x16.png")

		self.containerIcon = icons.getIconByName("container_16x16.png")
		self.passTreeIcon = icons.getIconByName("passTree_16x16.png")
		self.passGroupIcon = icons.getIconByName("passGroup_16x16.png")
		self.passIcon = icons.getIconByName("pass_16x16.png")
		self.overridesetIcon = icons.getIconByName("overrideset_16x16.png")
		self.overrideIcon = icons.getIconByName("override_16x16.png")
		self.lightsetIcon = icons.getIconByName("lightset_16x16.png")
		self.objectsetIcon = icons.getIconByName("objectset_16x16.png")
		self.lodsetIcon = icons.getIconByName("lodset_16x16.png")
		self.nodesetIcon = icons.getIconByName("nodeset_16x16.png")

		# Load UI file
		self.ui = ui.loadUiWidgetFromPyFile(__file__, parent=self)
		
		# Layout
		self.setLayout(QtGui.QVBoxLayout())
		self.layout().addWidget(self.ui)
		self.layout().setSpacing(0)
		self.layout().setContentsMargins(2, 2, 2, 2)

		# Nodesets

		# Nodesets UI init
		self.nodesets_buttons_layout = self.ui.tab_all.widget(1).layout().children()[0]
		
		self.nodesets_buttons_layout.itemAt(0).widget().setIcon(self.layersNewIcon)
		self.nodesets_buttons_layout.itemAt(1).widget().setIcon(self.layersNewSelectionIcon)
		self.nodesets_buttons_layout.itemAt(2).widget().setIcon(self.layersDuplicateIcon)
		self.nodesets_buttons_layout.itemAt(3).widget().setIcon(self.layersDeleteIcon)

		self.nodesets_buttons_layout.itemAt(5).widget().setIcon(self.layersAddIcon)
		self.nodesets_buttons_layout.itemAt(6).widget().setIcon(self.layersRemoveIcon)
		self.nodesets_buttons_layout.itemAt(7).widget().setIcon(self.layersClearIcon)

		self.nodesets_buttons_layout.itemAt(9).widget().setIcon(self.layersSelectObjectsIcon)
		self.nodesets_buttons_layout.itemAt(10).widget().setIcon(self.layersSelectIcon)

		self.nodesets_buttons_layout.itemAt(12).widget().setIcon(self.layersLoadIcon)

		self.nodesets_tree = self.ui.tab_all.widget(1).layout().itemAt(0).widget()
		self.nodesets_tree.setColumnCount(1)
		self.nodesets_tree.setHeaderLabels(["Name"])
		# self.nodesets_tree.setColumnHidden(1, True)
		self.nodesets_tree.header().setResizeMode(0, QtGui.QHeaderView.Stretch)

		self.nodesets_name_edit = self.ui.tab_all.widget(1).layout().itemAt(2).widget()

		# Nodesets fill UI

		self.fill_nodesets_tree()

		# Nodesets UI signals

		self.nodesets_buttons_layout.itemAt(0).widget().clicked.connect(self.new_nodeset)
		self.nodesets_buttons_layout.itemAt(1).widget().clicked.connect(lambda: self.new_nodeset(selection=True))
		self.nodesets_buttons_layout.itemAt(2).widget().clicked.connect(self.duplicate_selected_nodesets)
		self.nodesets_buttons_layout.itemAt(3).widget().clicked.connect(self.remove_selected_nodesets)

		self.nodesets_buttons_layout.itemAt(5).widget().clicked.connect(self.add_selected_objects_to_nodesets)
		self.nodesets_buttons_layout.itemAt(6).widget().clicked.connect(self.remove_selected_objects_from_nodesets)
		self.nodesets_buttons_layout.itemAt(7).widget().clicked.connect(self.clear_nodesets)

		self.nodesets_buttons_layout.itemAt(9).widget().clicked.connect(self.select_nodests_objects)
		self.nodesets_buttons_layout.itemAt(10).widget().clicked.connect(self.select_objects_nodesets)

		self.nodesets_buttons_layout.itemAt(12).widget().clicked.connect(self.import_nodesets)

		self.nodesets_tree.itemSelectionChanged.connect(self.fix_nodesets_selection)
		self.nodesets_tree.itemSelectionChanged.connect(self.update_nodeset_name_edit)
		self.nodesets_tree.itemClicked.connect(self.select_nodesets_objects)

		self.nodesets_name_edit.returnPressed.connect(self.nodeset_rename)

		# Passes UI init
		# self.nodesets_buttons_layout = self.ui.tab_all.widget(1).layout().children()[0]
		
		self.tab_containers_spliter = self.ui.tab_all.widget(0).layout().itemAt(0).widget()
		self.tab_containers_spliter.setSizes([400,80])

		self.containers_buttons_layout = self.tab_containers_spliter.widget(0).layout().children()[0]
		
		self.containers_buttons_layout.itemAt(0).widget().setIcon(self.passTreeIcon)
		self.containers_buttons_layout.itemAt(1).widget().setIcon(self.passGroupIcon)
		self.containers_buttons_layout.itemAt(2).widget().setIcon(self.passIcon)

		self.containers_buttons_layout.itemAt(4).widget().setIcon(self.overrideIcon)
		self.containers_buttons_layout.itemAt(5).widget().setIcon(self.lightsetIcon)
		self.containers_buttons_layout.itemAt(6).widget().setIcon(self.objectsetIcon)
		self.containers_buttons_layout.itemAt(7).widget().setIcon(self.lodsetIcon)
		self.containers_buttons_layout.itemAt(8).widget().setIcon(self.nodesetIcon)

		self.containers_buttons_layout.itemAt(10).widget().setIcon(self.layersLoadIcon)

		self.containers_tree = self.tab_containers_spliter.widget(0).layout().itemAt(1).widget()
		self.containers_tree.setColumnCount(2)
		self.containers_tree.setHeaderLabels(["Name", "Info", "Type"])
		self.containers_tree.setColumnHidden(2, True)
		self.containers_tree.setColumnWidth(0,200)
		self.containers_tree.header().setResizeMode(1, QtGui.QHeaderView.Stretch)

		# self.containers_name_edit = self.ui.tab_all.widget(0).layout().itemAt(2).widget()

		# Passes fill Ui
		self.fill_containers_tree()

		# Passes UI signals

		self.containers_tree.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
		self.containers_tree.customContextMenuRequested.connect(self.pass_tree_menu)

		self.containers_buttons_layout.itemAt(0).widget().clicked.connect(lambda type="tree": self.new_container(type))
		self.containers_buttons_layout.itemAt(1).widget().clicked.connect(lambda type="group": self.new_container(type))
		self.containers_buttons_layout.itemAt(2).widget().clicked.connect(lambda type="pass": self.new_container(type))

		self.containers_buttons_layout.itemAt(4).widget().clicked.connect(lambda type="override": self.new_container(type))
		self.containers_buttons_layout.itemAt(5).widget().clicked.connect(lambda type="lightset": self.new_container(type))
		self.containers_buttons_layout.itemAt(6).widget().clicked.connect(lambda type="objectset": self.new_container(type))
		self.containers_buttons_layout.itemAt(7).widget().clicked.connect(lambda type="lodset": self.new_container(type))
		self.containers_buttons_layout.itemAt(8).widget().clicked.connect(lambda type="nodeset": self.new_container(type))

		self.containers_tree.itemSelectionChanged.connect(self.fix_containers_selection)
Example #11
0
    def initUI(self):
        """Initializes the widget UI"""

        # Color vars

        # Icons

        self.solutionNewIcon = icons.getIconByName("solutionNew_16x16.png")
        self.solutionRemoveIcon = icons.getIconByName("solutionRemove_16x16.png")

        self.solutionFitIcon = self.solution_manager.get_solution_goal_icon("fit")
        self.solutionDeformIcon = self.solution_manager.get_solution_goal_icon("deform")
        self.solutionAnimIcon = self.solution_manager.get_solution_goal_icon("anim")

        self.solutionImportIcon = icons.getIconByName("solutionImport_16x16.png")
        self.solutionExportIcon = icons.getIconByName("solutionExport_16x16.png")

        # Load UI file

        self.ui = ui.loadUiWidgetFromPyFile(__file__, parent=self)

        # Layout

        self.setLayout(QtGui.QVBoxLayout())
        self.layout().addWidget(self.ui)
        self.layout().setSpacing(0)
        self.layout().setContentsMargins(2, 2, 2, 2)

        # ------------------------------------------
        # SOLUTIONS TAB

        # Solutions UI init.

        self.tab_solutions_spliter = ui.get_child(self.ui, "sp_splitter")
        self.tab_solutions_spliter.setSizes([400, 250])

        ui.get_child(self.ui, "pb_solutions_new").setIcon(self.solutionNewIcon)
        ui.get_child(self.ui, "pb_solutions_delete").setIcon(self.solutionRemoveIcon)

        ui.get_child(self.ui, "pb_solutions_fit").setIcon(self.solutionFitIcon)
        ui.get_child(self.ui, "pb_solutions_deform").setIcon(self.solutionDeformIcon)
        ui.get_child(self.ui, "pb_solutions_anim").setIcon(self.solutionAnimIcon)

        ui.get_child(self.ui, "pb_solutions_import_preset").setIcon(self.solutionImportIcon)
        ui.get_child(self.ui, "pb_solutions_export_preset").setIcon(self.solutionExportIcon)

        self.solution_trees = ui.get_child(self.ui, "tr_solutions")

        self.header_labels = ["Name"] + self.solution_manager.get_solution_goals()
        self.solution_trees.setColumnCount(len(self.header_labels))
        self.solution_trees.setHeaderLabels(self.header_labels)
        # self.solution_trees.setColumnHidden(2, True)
        # self.solution_trees.setColumnWidth(0,200)
        self.solution_trees.header().setResizeMode(0, QtGui.QHeaderView.Stretch)

        self.solution_description = ui.get_child(self.ui, "lb_solution_desc")
        self.solution_widget_layout = ui.get_child(self.ui, "wi_solution_widget").layout()
        self.solution_channel_box_layout = ui.get_child(self.ui, "wi_channel_box").layout()

        # Fills the solution trees in the UI.
        self.fill_solution_trees()

        # Solutions UI signals.

        # self.solution_trees.itemSelectionChanged.connect(self.fix_solution_trees_selection)
        self.solution_trees.itemSelectionChanged.connect(self.select_solutions_nodes)
        self.solution_trees.itemSelectionChanged.connect(self.load_selected_solution_ui)

        self.solution_trees.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
        self.solution_trees.customContextMenuRequested.connect(self.solution_trees_menu)
        # ------------------------------------------

        # ------------------------------------------
        # UTILS TAB

        # Utils UI init.

        self.dsp_joints_display_size = ui.get_child(self.ui, "dsp_joints_display_size")
        self.dsp_joints_display_size.setValue(pm.jointDisplayScale(q=True))

        # Utils UI signals.

        self.dsp_joints_display_size.valueChanged.connect(self.update_joints_display_size)