示例#1
0
    def onInfluenceSelected(self, *args):
        newHighlight = []
        for i in self.getSelectedPairs():
            newHighlight.append(i.source)
            newHighlight.append(i.destination)

        SelectHelper.replaceHighlight(newHighlight)

        self.removePairAction.updateEnabled()
 def onInfluenceSelected(self,*args):
     newHighlight = []
     for i in self.getSelectedPairs():
         newHighlight.append(i.source)
         newHighlight.append(i.destination)
         
     SelectHelper.replaceHighlight(newHighlight)
     
     self.removePairAction.updateEnabled()
示例#3
0
    def updateHighlight(self,includeInfluence=True):
        '''
        updates highlight - if painting, adds  current influence to highlight
        '''
        if cmds.currentCtx()!=self.TOOL_PAINT:
            return

        if not LayerDataModel.getInstance().layerDataAvailable:
            return

        newHighlightItems = []
        if includeInfluence:
            currentInfluencePath = LayerDataModel.getInstance().mll.getPaintTargetPath();
            if currentInfluencePath:
                newHighlightItems.append(currentInfluencePath)
                
            
        SelectHelper.replaceHighlight(newHighlightItems)
示例#4
0
    def updateHighlight(self, includeInfluence=True):
        '''
        updates highlight - if painting, adds  current influence to highlight
        '''
        if cmds.currentCtx() != self.TOOL_PAINT:
            return

        if not LayerDataModel.getInstance().layerDataAvailable:
            return

        newHighlightItems = []
        if includeInfluence:
            currentInfluencePath = LayerDataModel.getInstance(
            ).mll.getPaintTargetPath()
            if currentInfluencePath:
                newHighlightItems.append(currentInfluencePath)

        SelectHelper.replaceHighlight(newHighlightItems)
示例#5
0
文件: tabPaint.py 项目: jonntd/Tapp
    def updateHighlight(self, includeInfluence=True):
        '''
        updates highlight - if painting, adds  current influence to highlight
        '''
        if cmds.currentCtx() != self.TOOL_PAINT:
            return

        if not LayerDataModel.getInstance().layerDataAvailable:
            return

        newHighlightItems = []
        if includeInfluence:
            currentInfluence = cmds.ngSkinLayer(q=True, ci=True)
            # returns influence path, if current paint target has any
            if (len(currentInfluence) > 1):
                newHighlightItems.append(currentInfluence[1])

        SelectHelper.replaceHighlight(newHighlightItems)
示例#6
0
    def updateHighlight(self,includeInfluence=True):
        '''
        updates highlight - if painting, adds  current influence to highlight
        '''
        if cmds.currentCtx()!=self.TOOL_PAINT:
            return

        if not LayerDataModel.getInstance().layerDataAvailable:
            return

        newHighlightItems = []
        if includeInfluence:
            currentInfluence = cmds.ngSkinLayer(q=True,ci=True)
            # returns influence path, if current paint target has any
            if (len(currentInfluence)>1):
                newHighlightItems.append(currentInfluence[1])
                
            
        SelectHelper.replaceHighlight(newHighlightItems)
示例#7
0
    def onInfluenceSelected(self, *args):
        newSelection = list(self.getSelectedPairs())

        newHighlight = []
        for i in newSelection:
            if i.source is not None:
                newHighlight.append(i.source.path)
            if i.destination is not None:
                newHighlight.append(i.destination.path)

        SelectHelper.replaceHighlight(newHighlight)

        # the weird way of forming this currentInfluencesSelection like that
        # is because we want the items to be ordered in first to last selected order
        # when new selection happens, first all items that are not selected anymore
        # are removed from the current selection cache,
        # then all new items that are selected are added at the end.
        for i in self.currentInfluencesSelection[:]:
            if i not in newSelection:
                self.currentInfluencesSelection.remove(i)
        for i in newSelection:
            if i not in self.currentInfluencesSelection:
                self.currentInfluencesSelection.append(i)
示例#8
0
    def onInfluenceSelected(self,*args):
        newSelection = list(self.getSelectedPairs())

        newHighlight = []
        for i in newSelection:
            if i.source is not None:
                newHighlight.append(i.source.path)
            if i.destination is not None:
                newHighlight.append(i.destination.path)
            
        SelectHelper.replaceHighlight(newHighlight)
        
        
        # the weird way of forming this currentInfluencesSelection like that
        # is because we want the items to be ordered in first to last selected order
        # when new selection happens, first all items that are not selected anymore 
        # are removed from the current selection cache,
        # then all new items that are selected are added at the end.
        for i in self.currentInfluencesSelection[:]:
            if i not in newSelection:
                self.currentInfluencesSelection.remove(i)
        for i in newSelection:
            if i not in self.currentInfluencesSelection:
                self.currentInfluencesSelection.append(i)
示例#9
0
 def highlight(self):
     SelectHelper.replaceHighlight([self.source.path,self.destination.path])
示例#10
0
 def highlight(self):
     SelectHelper.replaceHighlight([self.source, self.destination])