Skip to content

Commit 6376097

Browse files
authored
[examples] Use initRoot instead of init (#476)
1 parent 9d01d90 commit 6376097

16 files changed

+15
-15
lines changed

examples/ReadTheDocs_Example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def createScene(rootNode):
1515

1616
rootNode.bbox = [[-1, -1, -1],[1,1,1]]
1717

18-
rootNode.addObject("RequiredPlugin", pluginName=[ 'Sofa.Component.AnimationLoop',
18+
rootNode.addObject("RequiredPlugin", pluginName=['Sofa.Component.AnimationLoop',
1919
'Sofa.Component.Collision.Detection.Algorithm',
2020
'Sofa.Component.Collision.Detection.Intersection',
2121
'Sofa.Component.Collision.Geometry',

examples/additional-examples/ControllerScene.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def main():
119119
# Create and initialize the scene
120120
root = Sofa.Core.Node()
121121
createScene(root)
122-
Sofa.Simulation.init(root)
122+
Sofa.Simulation.initRoot(root)
123123

124124
# Run simulation
125125
for i in range(0, 360):

examples/additional-examples/pygame_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def createScene(root):
100100
if __name__ == '__main__':
101101
root = Sofa.Core.Node("myroot")
102102
createScene(root)
103-
Sofa.Simulation.init(root)
103+
Sofa.Simulation.initRoot(root)
104104
init_display(root)
105105
try:
106106
while True:

examples/additional-examples/pyqt_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def __init__(self):
143143

144144
def init_sim(self):
145145
# start the simulator
146-
Sofa.Simulation.init(self.root)
146+
Sofa.Simulation.initRoot(self.root)
147147

148148
def step_sim(self):
149149
self.visuals.camera.position = self.visuals.camera.position + [-0.0002, 0, 0]

examples/advanced_timer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def createScene(root):
8989
def main():
9090
root = Sofa.Core.Node("root")
9191
createScene(root)
92-
Sofa.Simulation.init(root)
92+
Sofa.Simulation.initRoot(root)
9393

9494
# Run the simulation for 5 steps
9595
for iteration in range(5):

examples/basic-addGUI.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def main():
1515
root = Sofa.Core.Node("root")
1616
# Call the below 'createScene' function to create the scene graph
1717
createScene(root)
18-
Sofa.Simulation.init(root)
18+
Sofa.Simulation.initRoot(root)
1919

2020
if not USE_GUI:
2121
for iteration in range(10):

examples/basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def main():
1212
createScene(root)
1313

1414
# Once defined, initialization of the scene graph
15-
Sofa.Simulation.init(root)
15+
Sofa.Simulation.initRoot(root)
1616

1717
# Run the simulation for 10 steps
1818
for iteration in range(10):

examples/emptyController.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ def main():
9999

100100
root=Sofa.Core.Node("root")
101101
createScene(root)
102+
Sofa.Simulation.initRoot(root)
102103

103104
Sofa.Gui.GUIManager.Init("myscene", "qglviewer")
104105
Sofa.Gui.GUIManager.createGUI(root, __file__)

examples/emptyDataEngine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def main():
3636

3737
root=Sofa.Core.Node("root")
3838
createScene(root)
39-
Sofa.Simulation.init(root)
39+
Sofa.Simulation.initRoot(root)
4040

4141
Sofa.Gui.GUIManager.Init("myscene", "qglviewer")
4242
Sofa.Gui.GUIManager.createGUI(root, __file__)

examples/emptyForceField.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def main():
6161

6262
root=Sofa.Core.Node("root")
6363
createScene(root)
64-
Sofa.Simulation.init(root)
64+
Sofa.Simulation.initRoot(root)
6565

6666
Sofa.Gui.GUIManager.Init("myscene", "qglviewer")
6767
Sofa.Gui.GUIManager.createGUI(root, __file__)

0 commit comments

Comments
 (0)