Example #1
0
	def doIt(self,argList):
		if (cmds.window(self.WindowName , exists=True)):
			cmds.deleteUI(self.WindowName)
		window = cmds.window( self.WindowName, title=self.Title, widthHeight=(self.WindowSize[0], self.WindowSize[1]) )
		
		#Get current connection status
		ConnectionText, ConnectedState = cmds.LiveLinkConnectionStatus()
		
		#Type your UI code here
		cmds.columnLayout( "mainColumn", adjustableColumn=True )
		cmds.rowLayout("HeaderRow", numberOfColumns=3, adjustableColumn=1, parent = "mainColumn")
		cmds.text(label="Unreal Engine Live Link", align="left")
		cmds.text(label="Connection:")
		cmds.text("ConnectionStatusUI", label=ConnectionText, align="center", backgroundColor=ConnectionColourMap[ConnectedState], width=150)
		cmds.textScrollList("ActiveSubjects", allowMultiSelection = True, parent = "mainColumn")

		PopulateSubjects()

		cmds.rowLayout("AddSelectedAsSubject", numberOfColumns=3, parent = "mainColumn")
		cmds.textField( "NewSubjectName", text = "Maya", parent = "AddSelectedAsSubject", width=300)
		cmds.button( label='Add Subject', parent = "AddSelectedAsSubject", command=self.AddSubject)
		cmds.button( label='Remove Subject', parent = "AddSelectedAsSubject", command=self.RemoveSubject)

		cmds.rowLayout("StreamSettings", numberOfColumns=1, parent="mainColumn")
		cmds.checkBox( "ToggleCorrectForYUp", label='Correct subject stream for Scene Y-Up', changeCommand=self.ToggleCorrectForYUp, parent="StreamSettings")

		self.LoadOptionValues()

		cmds.showWindow( self.WindowName )
Example #2
0
 def doIt(self, argList):
     if (cmds.window(MayaLiveLinkUI.WindowName, exists=True)):
         #Get current connection status
         ConnectionText, ConnectedState = cmds.LiveLinkConnectionStatus()
         cmds.text("ConnectionStatusUI",
                   edit=True,
                   label=ConnectionText,
                   backgroundColor=ConnectionColourMap[ConnectedState])
Example #3
0
    def doIt(self, argList):
        if (cmds.window(self.WindowName, exists=True)):
            cmds.deleteUI(self.WindowName)
        window = cmds.window(self.WindowName,
                             title=self.Title,
                             widthHeight=(self.WindowSize[0],
                                          self.WindowSize[1]))

        #Get current connection status
        ConnectionText, ConnectedState = cmds.LiveLinkConnectionStatus()

        cmds.columnLayout("mainColumn", adjustableColumn=True)
        cmds.rowLayout("HeaderRow",
                       numberOfColumns=3,
                       adjustableColumn=1,
                       parent="mainColumn")
        cmds.text(label="Unreal Engine Live Link", align="left")
        cmds.text(label="Connection:")
        cmds.text("ConnectionStatusUI",
                  label=ConnectionText,
                  align="center",
                  backgroundColor=ConnectionColourMap[ConnectedState],
                  width=150)

        cmds.separator(h=20, style="none", parent="mainColumn")
        cmds.columnLayout(
            "SubjectWrapperLayout", parent="mainColumn"
        )  # just used as a container that will survive refreshing, so the following controls stay in their correct place

        CreateSubjectTable()
        PopulateSubjects()

        cmds.separator(h=20, style="none", parent="mainColumn")
        cmds.button(label='Add Selection',
                    parent="mainColumn",
                    command=self.AddSelection)

        cmds.showWindow(self.WindowName)