Ejemplo n.º 1
0
    def createInnerUi(self, parent):
        rows = cmds.columnLayout(parent=parent,
                                 adjustableColumn=1,
                                 rowSpacing=Constants.MARGIN_SPACING_VERTICAL,
                                 width=400)

        BaseTab.createTitledRow(parent=rows, title="Layer Name")
        self.controls.name = StoredTextEdit(self.layerNameValue)
        self.controls.name.editUI(enterCommand=lambda *args: self.
                                  closeDialogWithResult(self.BUTTON_OK),
                                  alwaysInvokeEnterCommandOnReturn=True)

        if not self.newLayerMode:
            self.controls.opacity = FloatSliderField(range=[0, 1])
            self.controls.opacity.model = self.layerOpacityValue
            self.controls.opacity.onChange.addHandler(
                self.onOpacityChange.emit,
                ownerUI=self.controls.opacity.floatField)
            BaseTab.createTitledRow(
                parent=rows,
                title="Opacity",
                innerContentConstructor=self.controls.opacity.create)

        self.controls.name.focus()
        return rows
Ejemplo n.º 2
0
    def createInnerUi(self,parent):
        
        #container = BaseTab.createScrollLayout(parent)
        rows=cmds.columnLayout(parent=parent,
            adjustableColumn=1,rowSpacing=Constants.MARGIN_SPACING_VERTICAL,
            width=400)
        
        BaseTab.createFixedTitledRow(rows, "Influence names")
        self.chkLongNames = CheckBoxField(AddPairDialog.CTRL_PREFIX+'longNames',label="Longer, where ambiguous",annotation="Show long names in drop down boxes")
        self.chkLongNames.changeCommand.addHandler(self.updateInfluenceLabels)
        
        BaseTab.createFixedTitledRow(rows, "Source influence")
        
        
        self.sourceDropdown = DropDownField(self.sourceValue)

        BaseTab.createFixedTitledRow(rows, None)

        self.chkSelfReference = CheckBoxField(AddPairDialog.CTRL_PREFIX+'selfReference',label="Self reference",annotation="Don't map to another influence, mirror on the same influence")
        self.chkSelfReference.changeCommand.addHandler(self.updateEnabled)
        self.chkBidirectional = CheckBoxField(AddPairDialog.CTRL_PREFIX+'bidirectional',label="Bidirectional association")
            
 
        self.destinationRow = BaseTab.createTitledRow(rows, "Destination influence")
        self.destinationDropdown = DropDownField(self.destinationValue)
        
        self.updateEnabled()
        self.updateInfluenceLabels()
        self.sourceDropdown.updateModel()
        self.destinationDropdown.updateModel()
        return rows
Ejemplo n.º 3
0
 def createInnerUi(self,parent):
     rows=cmds.columnLayout(parent=parent,
         adjustableColumn=1,rowSpacing=Constants.MARGIN_SPACING_VERTICAL,
         width=400)
     
     BaseTab.createTitledRow(parent=rows, title="Layer Name")
     self.controls.name = StoredTextEdit(self.layerNameValue)
     self.controls.name.editUI(enterCommand=lambda *args:self.closeDialogWithResult(self.BUTTON_OK),alwaysInvokeEnterCommandOnReturn=True)
     
     if not self.newLayerMode:
         self.controls.opacity = FloatSliderField(range=[0,1])
         self.controls.opacity.model = self.layerOpacityValue
         self.controls.opacity.onChange.addHandler(self.onOpacityChange.emit,ownerUI=self.controls.opacity.floatField)
         BaseTab.createTitledRow(parent=rows, title="Opacity",innerContentConstructor=self.controls.opacity.create)
         
     self.controls.name.focus()
     return rows
Ejemplo n.º 4
0
    def createInnerUi(self, parent):

        #container = BaseTab.createScrollLayout(parent)
        rows = cmds.columnLayout(parent=parent,
                                 adjustableColumn=1,
                                 rowSpacing=Constants.MARGIN_SPACING_VERTICAL,
                                 width=400)

        BaseTab.createFixedTitledRow(rows, "Influence names")
        self.chkLongNames = CheckBoxField(
            AddPairDialog.CTRL_PREFIX + 'longNames',
            label="Longer, where ambiguous",
            annotation="Show long names in drop down boxes")
        self.chkLongNames.changeCommand.addHandler(self.updateInfluenceLabels)

        BaseTab.createFixedTitledRow(rows, "Source influence")

        self.sourceDropdown = DropDownField(self.sourceValue)

        BaseTab.createFixedTitledRow(rows, None)

        self.chkSelfReference = CheckBoxField(
            AddPairDialog.CTRL_PREFIX + 'selfReference',
            label="Self reference",
            annotation=
            "Don't map to another influence, mirror on the same influence")
        self.chkSelfReference.changeCommand.addHandler(self.updateEnabled)
        self.chkBidirectional = CheckBoxField(
            AddPairDialog.CTRL_PREFIX + 'bidirectional',
            label="Bidirectional association")

        self.destinationRow = BaseTab.createTitledRow(rows,
                                                      "Destination influence")
        self.destinationDropdown = DropDownField(self.destinationValue)

        self.updateEnabled()
        self.updateInfluenceLabels()
        self.sourceDropdown.updateModel()
        self.destinationDropdown.updateModel()
        return rows