Ejemplo n.º 1
0
    def createMakePruneWeightsGroup(self,layout):
        self.controls.pruneWeightsGroup = group = self.createUIGroup(layout, 'Prune Small Weights')

        self.createFixedTitledRow(group, title="Prune elements")
        self.controls.pruneWeights = CheckBoxField(self.VAR_PRUNE_PREFIX+"pruneWeights",
                    "Influence weights", True);
        self.controls.pruneMask = CheckBoxField(self.VAR_PRUNE_PREFIX+"pruneMask",
                    "Mask", True);

        self.createFixedTitledRow(group, title="Prune influences below")
        self.controls.pruneWeightsThreshold = FloatField(self.VAR_PRUNE_PREFIX+'pruneWeightsThreshold', minValue=0, maxValue=1,step=0.001,defaultValue=0.01, 
                annotation='Influence weights lower than this value will be set to zero')
        
        
        self.createFixedTitledRow(group, title="Prune mask below")
        self.controls.pruneMaskThreshold = FloatField(self.VAR_PRUNE_PREFIX+'pruneMaskThreshold', minValue=0, maxValue=1,step=0.001,defaultValue=0.01, 
                annotation='Mask values lower than this value will be set to zero')

        cmds.setParent(group)

        cmds.rowLayout(nc=2,adjustableColumn=2,columnWidth2=[Constants.BUTTON_WIDTH_SMALL,50], columnAttach2=["both","both"],columnAlign2=["center","center"])
        BaseTab.createHelpButton(SkinToolsDocs.ASSIGNWEIGHTS_MAKERIGID_INTERFACE)
        cmds.button(height=Constants.BUTTON_HEIGHT,label='Prune',command=lambda *args:self.execPruneWeights())

        cmds.setParent(layout)  
Ejemplo n.º 2
0
    def createClosestJointGroup(self,layout):
        group = self.createUIGroup(layout,"From Closest Joint")

        # influence chooser group
        influenceFiltersForm = cmds.formLayout(parent=group)
        l = cmds.text(label='Influences to choose from: ')
        cmds.formLayout(influenceFiltersForm,e=True,attachForm=[(l,'left',0),(l,'top',0)],attachNone=[(l,'bottom'),(l,'right')])
        radios = cmds.columnLayout();
        cmds.radioCollection()
        cmds.formLayout(influenceFiltersForm,e=True,attachForm=[(radios,'left',Constants.MARGIN_BLOCK_INDENT),(radios,'right',0),(radios,'bottom',0)],attachControl=[(radios,'top',0,l)])
        RadioButtonField(self.VAR_CJ_PREFIX+'useAllInfluences',defaultValue=1,label='All influences available in skin cluster',
                         annotation='Use all influences present in skin cluster for closest joint  search')
        
        self.controls.rdioUseListerInfluences = RadioButtonField(self.VAR_CJ_PREFIX+'useSelectedInfluences',
                        defaultValue=0,label='Selected influences in lister',
                        annotation='Use only those influences that are selected in "List Influences" tab')
        
        cmds.setParent(group)
        
        self.controls.cjIntensity = IntensitySlider(
                'amount of effect to apply',
                self.VAR_CJ_PREFIX+'Intensity')
        self.createTitledRow(group, "Intensity",innerContentConstructor=self.controls.cjIntensity.create)
        
        self.controls.cjSoftSelection = SoftSelectionRow(self.VAR_CJ_PREFIX+'softSelection')
        self.controls.cjSoftSelection.create(group)

        cmds.setParent(group)
        cmds.rowLayout(nc=2,adjustableColumn=2,columnWidth2=[Constants.BUTTON_WIDTH_SMALL,50], columnAttach2=["both","both"],columnAlign2=["center","center"])
        BaseTab.createHelpButton(SkinToolsDocs.ASSIGNWEIGHTS_CLOSESTJOINT_INTERFACE)
        cmds.button(height=Constants.BUTTON_HEIGHT,label='Assign',command=lambda *args:self.execClosestJointAssign())
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 createMakePruneWeightsGroup(self,layout):
        self.controls.pruneWeightsGroup = group = self.createUIGroup(layout, 'Prune Small Weights')

        self.createFixedTitledRow(group, title="Prune elements")
        self.controls.pruneWeights = CheckBoxField(self.VAR_PRUNE_PREFIX+"pruneWeights",
                    "Influence weights", True);
        self.controls.pruneMask = CheckBoxField(self.VAR_PRUNE_PREFIX+"pruneMask",
                    "Mask", True);

        self.createFixedTitledRow(group, title="Prune influences below")
        self.controls.pruneWeightsThreshold = FloatField(self.VAR_PRUNE_PREFIX+'pruneWeightsThreshold', minValue=0, maxValue=1,step=0.001,defaultValue=0.01, 
                annotation='Influence weights lower than this value will be set to zero')
        
        
        self.createFixedTitledRow(group, title="Prune mask below")
        self.controls.pruneMaskThreshold = FloatField(self.VAR_PRUNE_PREFIX+'pruneMaskThreshold', minValue=0, maxValue=1,step=0.001,defaultValue=0.01, 
                annotation='Mask values lower than this value will be set to zero')

        cmds.setParent(group)

        cmds.rowLayout(nc=2,adjustableColumn=2,columnWidth2=[Constants.BUTTON_WIDTH_SMALL,50], columnAttach2=["both","both"],columnAlign2=["center","center"])
        BaseTab.createHelpButton(SkinToolsDocs.ASSIGNWEIGHTS_MAKERIGID_INTERFACE)
        cmds.button(height=Constants.BUTTON_HEIGHT,label='Prune',command=lambda *args:self.execPruneWeights())

        cmds.setParent(layout)  
Ejemplo n.º 5
0
    def createClosestJointGroup(self,layout):
        group = self.createUIGroup(layout,"Assign Weights From Closest Joint")
        # influence chooser group
        influenceFiltersForm = cmds.formLayout(parent=group)
        l = cmds.text(label='Influences to choose from: ')
        cmds.formLayout(influenceFiltersForm,e=True,attachForm=[(l,'left',0),(l,'top',0)],attachNone=[(l,'bottom'),(l,'right')])
        radios = cmds.columnLayout();
        cmds.radioCollection()
        cmds.formLayout(influenceFiltersForm,e=True,attachForm=[(radios,'left',Constants.MARGIN_BLOCK_INDENT),(radios,'right',0),(radios,'bottom',0)],attachControl=[(radios,'top',0,l)])
        RadioButtonField(self.VAR_CJ_PREFIX+'useAllInfluences',defaultValue=1,label='All influences available in skin cluster',
                         annotation='Use all influences present in skin cluster for closest joint  search')
        
        self.controls.rdioUseListerInfluences = RadioButtonField(self.VAR_CJ_PREFIX+'useSelectedInfluences',
                        defaultValue=0,label='Selected influences in lister',
                        annotation='Use only those influences that are selected in "List Influences" tab')
        
        cmds.setParent(group)
        
        self.controls.cjIntensity = IntensitySlider(
                'amount of effect to apply',
                self.VAR_CJ_PREFIX+'Intensity')
        self.createTitledRow(group, "Intensity",innerContentConstructor=self.controls.cjIntensity.create)
        
        self.controls.cjSoftSelection = SoftSelectionRow(self.VAR_CJ_PREFIX+'softSelection')
        self.controls.cjSoftSelection.create(group)

        cmds.setParent(group)
        cmds.rowLayout(nc=2,adjustableColumn=2,columnWidth2=[Constants.BUTTON_WIDTH_SMALL,50], columnAttach2=["both","both"],columnAlign2=["center","center"])
        BaseTab.createHelpButton(SkinToolsDocs.ASSIGNWEIGHTS_CLOSESTJOINT_INTERFACE)
        cmds.button(height=Constants.BUTTON_HEIGHT,label='Assign',command=lambda *args:self.execClosestJointAssign())
        cmds.setParent(layout)
Ejemplo n.º 6
0
    def createMakeUnifyGroup(self, layout):
        group = self.createUIGroup(layout, 'Unify Weights')

        self.controls.rigidIntensity = IntensitySlider(
            'amount of effect to apply', self.VAR_RIGID_PREFIX + 'Intensity')
        self.createTitledRow(
            group,
            "Intensity",
            innerContentConstructor=self.controls.rigidIntensity.create)

        row = self.createFixedTitledRow(group, "Clustering")
        self.controls.chkSingleClusterMode = CheckBoxField(
            self.VAR_RIGID_PREFIX + "singleClusterMode",
            "Ignore separate shells or selection gaps", False,
            "When selected, whole selection is treated as one vertex cluster, regardless if vertices "
            + " are in different shells or selection is not contiguous")

        self.controls.rigidSoftSelection = SoftSelectionRow(
            self.VAR_RIGID_PREFIX + 'softSelection')
        self.controls.rigidSoftSelection.create(group)

        cmds.setParent(group)

        cmds.rowLayout(nc=2,
                       adjustableColumn=2,
                       columnWidth2=[Constants.BUTTON_WIDTH_SMALL, 50],
                       columnAttach2=["both", "both"],
                       columnAlign2=["center", "center"])
        BaseTab.createHelpButton(
            SkinToolsDocs.ASSIGNWEIGHTS_MAKERIGID_INTERFACE)
        cmds.button(height=Constants.BUTTON_HEIGHT,
                    label='Assign',
                    command=lambda *args: self.execUnifyWeights())

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

        BaseTab.createFixedTitledRow(rows, "Source")
        cmds.text(label=self.importer.sourceSkinCluster)
        BaseTab.createFixedTitledRow(rows, "Destination")
        cmds.text(label=self.importer.destinationSkinCluster)

        cmds.setParent(rows)

        cmds.text(label="Select influences to add to %s:" %
                  self.importer.destinationSkinCluster,
                  font='boldLabelFont',
                  align='left')
        influences = self.remapToShorterNames(
            self.importer.listInfluencesDiff())
        self.influencesList = cmds.textScrollList(numberOfRows=8,
                                                  allowMultiSelection=True,
                                                  append=influences,
                                                  sc=self.updateSelectedItems)

        return rows
Ejemplo n.º 8
0
    def __init__(self):
        BaseTab.__init__(self)

        self.parentWindow = None  # type: MainWindow

        self.controls.brushShapeButtons = []

        self.intensityReplace = PersistentValueModel(self.VAR_PREFIX +
                                                     'intensityReplace',
                                                     defaultValue=1.0)
        self.intensityAdd = PersistentValueModel(self.VAR_PREFIX +
                                                 'intensityAdd',
                                                 defaultValue=.1)
        self.intensityScale = PersistentValueModel(self.VAR_PREFIX +
                                                   'intensityScale',
                                                   defaultValue=.95)
        self.intensitySmooth = PersistentValueModel(self.VAR_PREFIX +
                                                    'intensitySmooth',
                                                    defaultValue=.5)
        self.intensitySharpen = PersistentValueModel(self.VAR_PREFIX +
                                                     'intensitySharpen',
                                                     defaultValue=.3)

        self.brushShape = PersistentValueModel(self.VAR_PREFIX + 'brushShape',
                                               defaultValue=1)
Ejemplo n.º 9
0
    def createMakeUnifyGroup(self,layout):
        group = self.createUIGroup(layout, 'Unify Weights')

        self.controls.rigidIntensity = IntensitySlider(
                'amount of effect to apply',
                self.VAR_RIGID_PREFIX+'Intensity')
        self.createTitledRow(group, "Intensity",innerContentConstructor=self.controls.rigidIntensity.create)

        row = self.createFixedTitledRow(group, "Clustering")
        self.controls.chkSingleClusterMode = CheckBoxField(self.VAR_RIGID_PREFIX+"singleClusterMode",
                    "Ignore separate shells or selection gaps", False, "When selected, whole selection is treated as one vertex cluster, regardless if vertices "+ 
                    " are in different shells or selection is not contiguous");

        
        self.controls.rigidSoftSelection = SoftSelectionRow(self.VAR_RIGID_PREFIX+'softSelection')
        self.controls.rigidSoftSelection.create(group)
        

        cmds.setParent(group)

        cmds.rowLayout(nc=2,adjustableColumn=2,columnWidth2=[Constants.BUTTON_WIDTH_SMALL,50], columnAttach2=["both","both"],columnAlign2=["center","center"])
        BaseTab.createHelpButton(SkinToolsDocs.ASSIGNWEIGHTS_MAKERIGID_INTERFACE)
        cmds.button(height=Constants.BUTTON_HEIGHT,label='Assign',command=lambda *args:self.execUnifyWeights())

        cmds.setParent(layout)
Ejemplo n.º 10
0
    def create(self, parent):
        cmds.rowLayout(parent=parent,
                       nc=2,
                       adjustableColumn=2,
                       columnWidth2=[Constants.MARGIN_COLUMN2, 50])
        self.useSoftSelect = CheckBoxField(
            self.name + 'On',
            label='Use soft selection',
            defaultValue=0,
            annotation=
            'extend effect outside selection with a fade out by defined distance'
        )
        self.useSoftSelect.changeCommand.addHandler(self.uiChanged)

        self.nativeSoftSelect = CheckBoxField(
            self.name + 'Native',
            label='Native soft selection',
            defaultValue=0,
            annotation=
            'use maya\'s soft selection instead of soft selection radius')
        self.nativeSoftSelect.changeCommand.addHandler(self.uiChanged)

        BaseTab.createFixedTitledRow(parent, "Selection radius")
        self.softSelectRadius = FloatField(
            self.name + 'Radius',
            minValue=0,
            defaultValue=1,
            step=0.1,
            annotation='soft selection radius is defined in world units')

        self.checkUiEnabled()
Ejemplo n.º 11
0
 def createUI(self, parent):
     self.setTitle('Settings')
     self.outerLayout = FormLayout()
     scrollLayout = BaseTab.createScrollLayout(self.outerLayout)
     self.baseLayout = cmds.columnLayout(adjustableColumn=1)
     self.outerLayout.attachForm(scrollLayout, 0, 0, 0, 0)
     
     
     self.controls.selectedSkinSettingsGroup = group = self.createUIGroup(self.baseLayout, 'Selected Skin Settings')
     self.controls.useInfluenceLimit = CheckBoxField(None,defaultValue=0,label="Use maximum influences per vertex limit",
             annotation='Turn this on to enforce a max influences per vertex limit')
     self.controls.useInfluenceLimit.changeCommand.addHandler(self.updateUIEnabled, ownerUI=parent)
     
     
     self.controls.influenceLimitRow = self.createFixedTitledRow(group, 'Influence limit')
     self.controls.numMaxInfluences = IntField(None,minValue=1,maxValue=None,annotation="Number of max influences per vertex")
     
     cmds.setParent(group)
     cmds.rowLayout(nc=2,adjustableColumn=2,columnWidth2=[Constants.BUTTON_WIDTH_SMALL,50], columnAttach2=["both","both"],columnAlign2=["center","center"])
     BaseTab.createHelpButton(SkinToolsDocs.CURRENTSKINSETTINGS_INTERFACE)
     cmds.button(height=Constants.BUTTON_HEIGHT,label='Apply',command=lambda *args:self.applyCurrentSkinSettings())        
     
     LayerEvents.layerAvailabilityChanged.addHandler(self.refreshSettingsFromSelection, parent)
     MayaEvents.nodeSelectionChanged.addHandler(self.refreshSettingsFromSelection,parent)
     MayaEvents.undoRedoExecuted.addHandler(self.refreshSettingsFromSelection,parent)
     
     self.refreshSettingsFromSelection()
     
     return self.outerLayout
Ejemplo n.º 12
0
 def __init__(self):
     BaseTab.__init__(self)
     self.items = []
     self.dataModel = None
     self.currentSelection = None
     self.currentInfluencesSelection = []
     self.manualOverrides = {}
     self.mirrorMode = True
Ejemplo n.º 13
0
 def __init__(self):
     BaseTab.__init__(self)
     self.items = []
     self.dataModel = None
     self.currentSelection = None
     self.currentInfluencesSelection = []
     self.manualOverrides = {}
     self.mirrorMode = True
Ejemplo n.º 14
0
    def __init__(self):
        BaseTab.__init__(self)
        self.dataModel = CopyWeightsModel()
        self.dataModel.parent = self
        self.currentSelection = None

        self.influenceMappingPreview = InfluencesMappingPreview()
        self.influencesManualMapping = InfluencesManualMapping()
Ejemplo n.º 15
0
 def __init__(self):
     BaseTab.__init__(self)
     
     self.controls.brushShapeButtons = []
     
     self.intensityReplace = PersistentValueModel(self.VAR_PREFIX+'intensityReplace',defaultValue=1.0)
     self.intensityAdd = PersistentValueModel(self.VAR_PREFIX+'intensityAdd',defaultValue=.1)
     self.intensityScale = PersistentValueModel(self.VAR_PREFIX+'intensityScale',defaultValue=.95)
     self.intensitySmooth = PersistentValueModel(self.VAR_PREFIX+'intensitySmooth',defaultValue=.5)
     
     self.brushShape = PersistentValueModel(self.VAR_PREFIX+'brushShape',defaultValue=1)
Ejemplo n.º 16
0
 def __init__(self):
     BaseTab.__init__(self)
     
     self.controls.brushShapeButtons = []
     
     self.intensityReplace = PersistentValueModel(self.VAR_PREFIX+'intensityReplace',defaultValue=1.0)
     self.intensityAdd = PersistentValueModel(self.VAR_PREFIX+'intensityAdd',defaultValue=.1)
     self.intensityScale = PersistentValueModel(self.VAR_PREFIX+'intensityScale',defaultValue=.95)
     self.intensitySmooth = PersistentValueModel(self.VAR_PREFIX+'intensitySmooth',defaultValue=.5)
     
     self.brushShape = PersistentValueModel(self.VAR_PREFIX+'brushShape',defaultValue=1)
Ejemplo n.º 17
0
    def create(self,parent):
        cmds.rowLayout(parent=parent,nc=2,adjustableColumn=2,columnWidth2=[Constants.MARGIN_COLUMN2,50])
        self.useSoftSelect = CheckBoxField(self.name+'On',label='Use soft selection',defaultValue=0,annotation='extend effect outside selection with a fade out by defined distance') 
        self.useSoftSelect.changeCommand.addHandler(self.uiChanged)

        self.nativeSoftSelect = CheckBoxField(self.name+'Native',label='Native soft selection',defaultValue=0,annotation='use maya\'s soft selection instead of soft selection radius') 
        self.nativeSoftSelect.changeCommand.addHandler(self.uiChanged)
        
        BaseTab.createFixedTitledRow(parent, "Selection radius")
        self.softSelectRadius = FloatField(self.name+'Radius', minValue=0,defaultValue=1,step=0.1,annotation='soft selection radius is defined in world units') 
        
        self.checkUiEnabled()
Ejemplo n.º 18
0
    def createUI(self, parent):
        self.setTitle('Settings')
        self.outerLayout = FormLayout()
        scrollLayout = BaseTab.createScrollLayout(self.outerLayout)
        self.baseLayout = cmds.columnLayout(adjustableColumn=1)
        self.outerLayout.attachForm(scrollLayout, 0, 0, 0, 0)

        self.controls.selectedSkinSettingsGroup = group = self.createUIGroup(
            self.baseLayout, 'Selected Skin Settings')
        self.controls.useInfluenceLimit = CheckBoxField(
            None,
            defaultValue=0,
            label="Use maximum influences per vertex limit",
            annotation=
            'Turn this on to enforce a max influences per vertex limit')
        self.controls.useInfluenceLimit.changeCommand.addHandler(
            self.updateUIEnabled, ownerUI=parent)

        self.controls.influenceLimitRow = self.createFixedTitledRow(
            group, 'Influence limit')
        self.controls.numMaxInfluences = IntField(
            None,
            minValue=1,
            maxValue=None,
            annotation="Number of max influences per vertex")

        cmds.setParent(group)
        cmds.rowLayout(nc=2,
                       adjustableColumn=2,
                       columnWidth2=[Constants.BUTTON_WIDTH_SMALL, 50],
                       columnAttach2=["both", "both"],
                       columnAlign2=["center", "center"])
        BaseTab.createHelpButton(SkinToolsDocs.CURRENTSKINSETTINGS_INTERFACE)
        cmds.button(height=Constants.BUTTON_HEIGHT,
                    label='Apply',
                    command=lambda *args: self.applyCurrentSkinSettings())

        LayerEvents.layerAvailabilityChanged.addHandler(
            self.refreshSettingsFromSelection, parent)
        MayaEvents.nodeSelectionChanged.addHandler(
            self.refreshSettingsFromSelection, parent)
        MayaEvents.undoRedoExecuted.addHandler(
            self.refreshSettingsFromSelection, parent)

        self.refreshSettingsFromSelection()

        cmds.setParent(parent)

        return self.outerLayout
Ejemplo n.º 19
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.º 20
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.º 21
0
    def createLimitWeightsGroup(self, layout):
        group = self.createUIGroup(layout, 'Limit Weights')

        cmds.rowLayout(parent=group,
                       nc=2,
                       columnWidth2=[
                           Constants.MARGIN_COLUMN2,
                           Constants.NUMBER_FIELD_WIDTH
                       ],
                       columnAttach2=["both", "both"],
                       columnAlign2=["right", "left"])
        cmds.text(label='Max Limit: ')
        self.controls.limitWeightsMaxInfluences = IntField(
            self.VAR_LW_PREFIX + 'maxInfluences',
            minValue=1,
            maxValue=1000,
            step=1,
            defaultValue=3,
            annotation='Maximum amount of influences per vertex')

        self.controls.limitWeightsIntensity = IntensitySlider(
            'amount of effect to apply', self.VAR_LW_PREFIX + 'Intensity')
        self.createTitledRow(
            group,
            "Intensity",
            innerContentConstructor=self.controls.limitWeightsIntensity.create)

        self.controls.limitWeightsSoftSelection = SoftSelectionRow(
            self.VAR_LW_PREFIX + 'softSelection')
        self.controls.limitWeightsSoftSelection.create(group)

        cmds.setParent(group)

        cmds.rowLayout(nc=2,
                       adjustableColumn=2,
                       columnWidth2=[Constants.BUTTON_WIDTH_SMALL, 50],
                       columnAttach2=["both", "both"],
                       columnAlign2=["center", "center"])
        BaseTab.createHelpButton(
            SkinToolsDocs.ASSIGNWEIGHTS_LIMITWEIGHTS_INTERFACE)
        cmds.button(height=Constants.BUTTON_HEIGHT,
                    label='Assign',
                    command=lambda *args: self.execLimitWeights())

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

        BaseTab.createFixedTitledRow(rows, "Source")
        cmds.text(label=self.importer.sourceSkinCluster)
        BaseTab.createFixedTitledRow(rows, "Destination")
        cmds.text(label=self.importer.destinationSkinCluster)
        
        cmds.setParent(rows)
        
        cmds.text(label="Select influences to add to %s:" % self.importer.destinationSkinCluster,font='boldLabelFont',align='left')
        influences = self.remapToShorterNames(self.importer.listInfluencesDiff())
        self.influencesList = cmds.textScrollList(numberOfRows=8,allowMultiSelection=True,append=influences,sc=self.updateSelectedItems)
        
        return rows
Ejemplo n.º 23
0
    def createUI(self,parent):
        MayaEvents.nodeSelectionChanged.addHandler(self.updateInfluenceList,parent)

        self.setTitle('Influence Lister')
        BaseTab.createUI(self, parent)
        
        self.createListingMethodRow();

        cmds.setParent(self.baseLayout)
        self.createNameFilterRow()

        cmds.setParent(self.baseLayout)
        self.controls.inflList = cmds.textScrollList(numberOfRows=8,
                allowMultiSelection=True,
                selectCommand=self.doInfluenceListItemSelected,
                doubleClickCommand=self.doInflListPaintWeights)
        
        cmds.button('reload',command=lambda *args:self.updateInfluenceList())
        self.createInflListContextMenu()
        
        return self.baseLayout
Ejemplo n.º 24
0
    def createLimitWeightsGroup(self,layout):
        group = self.createUIGroup(layout, 'Limit Weights')

        cmds.rowLayout(parent=group,nc=2,columnWidth2=[Constants.MARGIN_COLUMN2,Constants.NUMBER_FIELD_WIDTH], columnAttach2=["both","both"],columnAlign2=["right","left"])
        cmds.text(label='Max Limit: ')
        self.controls.limitWeightsMaxInfluences = IntField(self.VAR_LW_PREFIX+'maxInfluences', minValue=1,maxValue=1000,step=1,
                defaultValue=3, annotation='Maximum amount of influences per vertex')

        self.controls.limitWeightsIntensity = IntensitySlider(
                'amount of effect to apply',
                self.VAR_LW_PREFIX+'Intensity')
        self.createTitledRow(group, "Intensity",innerContentConstructor=self.controls.limitWeightsIntensity.create)
        
        self.controls.limitWeightsSoftSelection = SoftSelectionRow(self.VAR_LW_PREFIX+'softSelection')
        self.controls.limitWeightsSoftSelection.create(group)

        cmds.setParent(group)

        cmds.rowLayout(nc=2,adjustableColumn=2,columnWidth2=[Constants.BUTTON_WIDTH_SMALL,50], columnAttach2=["both","both"],columnAlign2=["center","center"])
        BaseTab.createHelpButton(SkinToolsDocs.ASSIGNWEIGHTS_LIMITWEIGHTS_INTERFACE)
        cmds.button(height=Constants.BUTTON_HEIGHT,label='Assign',command=lambda *args:self.execLimitWeights())
    def createUI(self, parent):
        MayaEvents.nodeSelectionChanged.addHandler(self.updateInfluenceList,
                                                   parent)

        self.setTitle('Influence Lister')
        BaseTab.createUI(self, parent)

        self.createListingMethodRow()

        cmds.setParent(self.baseLayout)
        self.createNameFilterRow()

        cmds.setParent(self.baseLayout)
        self.controls.inflList = cmds.textScrollList(
            numberOfRows=8,
            allowMultiSelection=True,
            selectCommand=self.doInfluenceListItemSelected,
            doubleClickCommand=self.doInflListPaintWeights)

        cmds.button('reload', command=lambda *args: self.updateInfluenceList())
        self.createInflListContextMenu()

        return self.baseLayout
Ejemplo n.º 26
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.º 27
0
 def __init__(self):
     BaseTab.__init__(self)
     self.listedInfluences = []
Ejemplo n.º 28
0
 def __init__(self):
     BaseTab.__init__(self)
     self.layerDataModel = LayerDataModel.getInstance()
 def __init__(self):
     BaseTab.__init__(self)
     self.listedInfluences = []
Ejemplo n.º 30
0
 def __init__(self):
     BaseTab.__init__(self)
Ejemplo n.º 31
0
 def __init__(self):
     BaseTab.__init__(self)
Ejemplo n.º 32
0
 def __init__(self):
     BaseTab.__init__(self)
     self.items = []
     self.manualItems = []
Ejemplo n.º 33
0
 def __init__(self):
     BaseTab.__init__(self)
     self.items = []
     self.manualItems = []
Ejemplo n.º 34
0
 def __init__(self):
     BaseTab.__init__(self)
     self.layerDataModel = LayerDataModel.getInstance()