Exemplo n.º 1
0
def processXMLElementByGeometry(geometryOutput, xmlElement):
	"Process the xml element by geometryOutput."
	if geometryOutput == None:
		return
	geometryOutput = evaluate.getVector3ListsRecursively(geometryOutput)
	if 'target' in xmlElement.attributeDictionary and not evaluate.getEvaluatedBooleanDefault(False, 'copy', xmlElement):
		target = evaluate.getEvaluatedLinkValue(str(xmlElement.attributeDictionary['target']).strip(), xmlElement)
		if target.__class__.__name__ == 'XMLElement':
			target.removeChildrenFromIDNameParent()
			xmlElement = target
			if xmlElement.object != None:
				if xmlElement.parent.object != None:
					if xmlElement.object in xmlElement.parent.object.archivableObjects:
						xmlElement.parent.object.archivableObjects.remove(xmlElement.object)
	firstElement = None
	if len(geometryOutput) > 0:
		firstElement = geometryOutput[0]
	if firstElement.__class__ == list:
		if len(firstElement) > 1:
			path.convertXMLElementRenameByPaths(geometryOutput, xmlElement)
		else:
			path.convertXMLElementRename(firstElement, xmlElement)
	else:
		path.convertXMLElementRename(geometryOutput, xmlElement)
	path.processXMLElement(xmlElement)
Exemplo n.º 2
0
def processXMLElementByGeometry(geometryOutput, xmlElement):
    "Process the xml element by geometryOutput."
    if geometryOutput == None:
        return
    geometryOutput = evaluate.getVector3ListsRecursively(geometryOutput)
    if 'target' in xmlElement.attributeDictionary and not evaluate.getEvaluatedBooleanDefault(
            False, 'copy', xmlElement):
        target = evaluate.getEvaluatedLinkValue(
            str(xmlElement.attributeDictionary['target']).strip(), xmlElement)
        if target.__class__.__name__ == 'XMLElement':
            target.removeChildrenFromIDNameParent()
            xmlElement = target
            if xmlElement.object != None:
                if xmlElement.parent.object != None:
                    if xmlElement.object in xmlElement.parent.object.archivableObjects:
                        xmlElement.parent.object.archivableObjects.remove(
                            xmlElement.object)
    firstElement = None
    if len(geometryOutput) > 0:
        firstElement = geometryOutput[0]
    if firstElement.__class__ == list:
        if len(firstElement) > 1:
            path.convertXMLElementRenameByPaths(geometryOutput, xmlElement)
        else:
            path.convertXMLElementRename(firstElement, xmlElement)
    else:
        path.convertXMLElementRename(geometryOutput, xmlElement)
    path.processXMLElement(xmlElement)
Exemplo n.º 3
0
def processXMLElementByGeometry(geometryOutput, xmlElement, xmlProcessor):
	"Process the xml element by geometryOutput."
	geometryOutput = evaluate.getVector3ListsRecursively(geometryOutput)
	firstElement = None
	if len(geometryOutput) > 0:
		firstElement = geometryOutput[0]
	if firstElement.__class__ == list:
		if len(firstElement) > 1:
			group.convertXMLElementRenameByPaths(geometryOutput, xmlElement, xmlProcessor)
		else:
			path.convertXMLElementRename(firstElement, xmlElement, xmlProcessor)
	else:
		path.convertXMLElementRename(geometryOutput, xmlElement, xmlProcessor)
	xmlProcessor.processXMLElement(xmlElement)