def setMultiChannel(self): """sets new rows from the selectec channels. 1 channel for each row""" oSel = pm.selected() if oSel: channels = attribute.getSelectedChannels(True) if not channels: channels = attribute.getSelectedObjectChannels( oSel[0], True, True) for ch in channels: self._addNewRow(ch, oSel[0].name(), oSel[0].name()) else: pm.displayWarning("To set the source, you need to select at " "one source object")
def edit_sculpt_frame(): """Edit the sculpt frame selected in the channel box. Multiple layers can be edited at the same time. But Only one frame at the time! We only set editable the first selected channel/frame. Returns: bool: If the edit is set successful """ attrs = attribute.getSelectedChannels() if attrs: for x in pm.selected(): if x.hasAttr(attrs[0]): _set_channel_edit_target(x.attr(attrs[0]), edit=True) return True else: pm.displayWarning("Not channels selected for edit!") return False
def populateChannelLineEdit(self): oSel = pm.selected() if oSel: chan = attribute.getSelectedChannels(True)[0] self.cwUIInst.channel_lineEdit.setText( "{}.{}".format(oSel[0].name(), chan))