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()
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)
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)
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)
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)
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)
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)
def highlight(self): SelectHelper.replaceHighlight([self.source.path,self.destination.path])
def highlight(self): SelectHelper.replaceHighlight([self.source, self.destination])