コード例 #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()
コード例 #2
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()
コード例 #3
0
ファイル: tabPaint.py プロジェクト: leandropim/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:
            currentInfluencePath = LayerDataModel.getInstance().mll.getPaintTargetPath();
            if currentInfluencePath:
                newHighlightItems.append(currentInfluencePath)
                
            
        SelectHelper.replaceHighlight(newHighlightItems)
コード例 #4
0
ファイル: tabPaint.py プロジェクト: lazerdaze/lancer
    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
ファイル: tabPaint.py プロジェクト: BigMacchia/ngSkinTools
    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
ファイル: initTransferWindow.py プロジェクト: leandropim/Tapp
    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
ファイル: initTransferWindow.py プロジェクト: leandropim/Tapp
 def highlight(self):
     SelectHelper.replaceHighlight([self.source.path,self.destination.path])
コード例 #10
0
 def highlight(self):
     SelectHelper.replaceHighlight([self.source, self.destination])