def doIt(self): attribute = coralApp.findAttribute(self.argAsString("attribute")) affect = eval(self.argAsString("affect")) affectedBy = eval(self.argAsString("affectedBy")) allowedSpecialization = eval(self.argAsString("allowedSpecialization")) specLinkedTo = eval(self.argAsString("specializationLinkedTo")) specLinkedBy = eval(self.argAsString("specializationLinkedBy")) parentNode = attribute.parent() parentNodeDynamicAttrs = parentNode.dynamicAttributes() if attribute in parentNodeDynamicAttrs: for attrName in affect: attr = coralApp.findAttribute(attrName) if attr.isAffectedBy(attribute) == False: parentNode._setAttributeAffect(attribute, attr) for attrName in affectedBy: attr = coralApp.findAttribute(attrName) if attribute.isAffectedBy(attr) == False: parentNode._setAttributeAffect(attr, attribute) for attrName in specLinkedTo: attr = coralApp.findAttribute(attrName) if attr not in attribute.specializationLinkedTo(): parentNode._addAttributeSpecializationLink(attribute, attr) for attrName in specLinkedBy: attr = coralApp.findAttribute(attrName) if attribute not in attr.specializationLinkedTo(): parentNode._addAttributeSpecializationLink(attr, attribute) parentNode._setAttributeAllowedSpecializations(attribute, allowedSpecialization) parentNode._updateAttributeSpecialization(attribute)
def doIt(self): success = False error = None sourceAttributeName = self.argAsString("sourceAttribute") destinationAttributeName = self.argAsString("destinationAttribute") sourceAttribute = coralApp.findAttribute(sourceAttributeName) destinationAttribute = coralApp.findAttribute(destinationAttributeName) if sourceAttribute and destinationAttribute: if destinationAttribute.input() is not None: destinationAttribute.disconnectInput() error = ErrorObject() success = NetworkManager.connect(sourceAttribute, destinationAttribute, error) if not success: errorMessage = "error during connection between " + sourceAttributeName + " and " + destinationAttributeName + "\n" if error: if error.message(): errorMessage += "extended info: " + error.message() coralApp.logDebug(errorMessage)
def doIt(self): attribute = coralApp.findAttribute(self.argAsString("attribute")) affect = eval(self.argAsString("affect")) affectedBy = eval(self.argAsString("affectedBy")) allowedSpecialization = eval(self.argAsString("allowedSpecialization")) specLinkedTo = eval(self.argAsString("specializationLinkedTo")) specLinkedBy = eval(self.argAsString("specializationLinkedBy")) parentNode = attribute.parent() parentNodeDynamicAttrs = parentNode.dynamicAttributes() if attribute in parentNodeDynamicAttrs: for attrName in affect: attr = coralApp.findAttribute(attrName) if attr.isAffectedBy(attribute) == False: parentNode._setAttributeAffect(attribute, attr) for attrName in affectedBy: attr = coralApp.findAttribute(attrName) if attribute.isAffectedBy(attr) == False: parentNode._setAttributeAffect(attr, attribute) for attrName in specLinkedTo: attr = coralApp.findAttribute(attrName) if attr not in attribute.specializationLinkedTo(): parentNode._addAttributeSpecializationLink(attribute, attr) for attrName in specLinkedBy: attr = coralApp.findAttribute(attrName) if attribute not in attr.specializationLinkedTo(): parentNode._addAttributeSpecializationLink(attr, attribute) parentNode._setAttributeAllowedSpecializations( attribute, allowedSpecialization) parentNode._updateAttributeSpecialization(attribute)
def doIt(self): attribute = self.argAsString("attribute") value = self.argAsString("value") attribute = coralApp.findAttribute(attribute) if attribute: if attribute.outValue(): attribute.outValue().setFromString(value); attribute.valueChanged()
def _deleteAttributes(self, attributesName): attributes = [] for attrName in attributesName: attr = coralApp.findAttribute(attrName) if attr: attributes.append(attr) if attributes: coralApp.deleteAttributes(attributes)
def doIt(self): attribute = self.argAsString("attribute") value = self.argAsString("value") attribute = coralApp.findAttribute(attribute) if attribute: if attribute.outValue(): attribute.outValue().setFromString(value) attribute.valueChanged()
def doIt(self): attribute = self.argAsString("attribute") attribute = coralApp.findAttribute(attribute) attribute.disconnectInput()