def dropCallback(self, dragControl, dropControl, messages, x, y, dragType): if messages[0] == 'rig' or messages[0] == 'uvs': database.addComponent(self.item, 'ref', messages[0], messages[1], 'reference') self.refreshList(itemMData=self.item) else: pm.confirmDialog(title='error', ma='center', message='please choose rigs or uvs!', button=['OK'], defaultButton='OK', dismissString='OK')
def createAssetCallBack(self, component, *args): if component: ns = pm.textFieldGrp('nsFieldPrompt', q=True, tx=True) database.addComponent(self.item, ns, component.task, component.code, 'reference', update=True) createdTasks = database.getShotCreatedTasks(self.item) for itemMData in createdTasks: database.addComponent(itemMData, ns, component.task, component.code, 'reference', update=True) pm.layoutDialog(dismiss='ok')