Skip to content

Commit

Permalink
Add an example.
Browse files Browse the repository at this point in the history
  • Loading branch information
damienmarchal committed May 22, 2024
1 parent d4c6fa1 commit bbfa6fa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python3/src/splib3/loaders/xmlloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,12 @@ def loadXML(filename, sofaNode, context={}):
from splib3.loaders.xmlloader import loadXML
def createScene(root):
loadXML("MyScene.xml", root)
loadXML("Caduceus.xml", root)
"""
tree = ET.parse(filename)
xmlNode = tree.getroot()
_processNode(xmlNode, sofaNode, context)
return sofaNode

def createScene(root):
loadXML(SofaRuntime.DataRepository.getFile("Demos/caduceus.scn"), root)

0 comments on commit bbfa6fa

Please sign in to comment.