diff --git a/examples/ReadTheDocs_Example.py b/examples/ReadTheDocs_Example.py index c995b504a..049eeae9a 100644 --- a/examples/ReadTheDocs_Example.py +++ b/examples/ReadTheDocs_Example.py @@ -15,7 +15,7 @@ def createScene(rootNode): rootNode.bbox = [[-1, -1, -1],[1,1,1]] - rootNode.addObject("RequiredPlugin", pluginName=[ 'Sofa.Component.AnimationLoop', + rootNode.addObject("RequiredPlugin", pluginName=['Sofa.Component.AnimationLoop', 'Sofa.Component.Collision.Detection.Algorithm', 'Sofa.Component.Collision.Detection.Intersection', 'Sofa.Component.Collision.Geometry', diff --git a/examples/additional-examples/ControllerScene.py b/examples/additional-examples/ControllerScene.py index a5010a7a2..cec5368c2 100755 --- a/examples/additional-examples/ControllerScene.py +++ b/examples/additional-examples/ControllerScene.py @@ -119,7 +119,7 @@ def main(): # Create and initialize the scene root = Sofa.Core.Node() createScene(root) - Sofa.Simulation.init(root) + Sofa.Simulation.initRoot(root) # Run simulation for i in range(0, 360): diff --git a/examples/additional-examples/pygame_example.py b/examples/additional-examples/pygame_example.py index 8b93819ca..75a1404ee 100644 --- a/examples/additional-examples/pygame_example.py +++ b/examples/additional-examples/pygame_example.py @@ -100,7 +100,7 @@ def createScene(root): if __name__ == '__main__': root = Sofa.Core.Node("myroot") createScene(root) - Sofa.Simulation.init(root) + Sofa.Simulation.initRoot(root) init_display(root) try: while True: diff --git a/examples/additional-examples/pyqt_example.py b/examples/additional-examples/pyqt_example.py index 91d7a59b0..fe60bd8d4 100644 --- a/examples/additional-examples/pyqt_example.py +++ b/examples/additional-examples/pyqt_example.py @@ -143,7 +143,7 @@ def __init__(self): def init_sim(self): # start the simulator - Sofa.Simulation.init(self.root) + Sofa.Simulation.initRoot(self.root) def step_sim(self): self.visuals.camera.position = self.visuals.camera.position + [-0.0002, 0, 0] diff --git a/examples/advanced_timer.py b/examples/advanced_timer.py index b62937752..6551a6a46 100644 --- a/examples/advanced_timer.py +++ b/examples/advanced_timer.py @@ -89,7 +89,7 @@ def createScene(root): def main(): root = Sofa.Core.Node("root") createScene(root) - Sofa.Simulation.init(root) + Sofa.Simulation.initRoot(root) # Run the simulation for 5 steps for iteration in range(5): diff --git a/examples/basic-addGUI.py b/examples/basic-addGUI.py index 20b338bd8..f69551134 100644 --- a/examples/basic-addGUI.py +++ b/examples/basic-addGUI.py @@ -15,7 +15,7 @@ def main(): root = Sofa.Core.Node("root") # Call the below 'createScene' function to create the scene graph createScene(root) - Sofa.Simulation.init(root) + Sofa.Simulation.initRoot(root) if not USE_GUI: for iteration in range(10): diff --git a/examples/basic.py b/examples/basic.py index a327c79cd..43b4cb352 100644 --- a/examples/basic.py +++ b/examples/basic.py @@ -12,7 +12,7 @@ def main(): createScene(root) # Once defined, initialization of the scene graph - Sofa.Simulation.init(root) + Sofa.Simulation.initRoot(root) # Run the simulation for 10 steps for iteration in range(10): diff --git a/examples/emptyController.py b/examples/emptyController.py index ef5709bd6..60a74fca6 100644 --- a/examples/emptyController.py +++ b/examples/emptyController.py @@ -99,6 +99,7 @@ def main(): root=Sofa.Core.Node("root") createScene(root) + Sofa.Simulation.initRoot(root) Sofa.Gui.GUIManager.Init("myscene", "qglviewer") Sofa.Gui.GUIManager.createGUI(root, __file__) diff --git a/examples/emptyDataEngine.py b/examples/emptyDataEngine.py index dc3433aee..ff30eda63 100644 --- a/examples/emptyDataEngine.py +++ b/examples/emptyDataEngine.py @@ -36,7 +36,7 @@ def main(): root=Sofa.Core.Node("root") createScene(root) - Sofa.Simulation.init(root) + Sofa.Simulation.initRoot(root) Sofa.Gui.GUIManager.Init("myscene", "qglviewer") Sofa.Gui.GUIManager.createGUI(root, __file__) diff --git a/examples/emptyForceField.py b/examples/emptyForceField.py index bbc78739e..f6e130e45 100644 --- a/examples/emptyForceField.py +++ b/examples/emptyForceField.py @@ -61,7 +61,7 @@ def main(): root=Sofa.Core.Node("root") createScene(root) - Sofa.Simulation.init(root) + Sofa.Simulation.initRoot(root) Sofa.Gui.GUIManager.Init("myscene", "qglviewer") Sofa.Gui.GUIManager.createGUI(root, __file__) diff --git a/examples/example-forcefield.py b/examples/example-forcefield.py index 02bd000c8..9322bbb53 100644 --- a/examples/example-forcefield.py +++ b/examples/example-forcefield.py @@ -63,7 +63,7 @@ def main(): root=Sofa.Core.Node("root") createScene(root) - Sofa.Simulation.init(root) + Sofa.Simulation.initRoot(root) Sofa.Gui.GUIManager.Init("myscene", "qglviewer") Sofa.Gui.GUIManager.createGUI(root, __file__) diff --git a/examples/liver-scriptcontroller.py b/examples/liver-scriptcontroller.py index 39f157d6c..40fdc468e 100644 --- a/examples/liver-scriptcontroller.py +++ b/examples/liver-scriptcontroller.py @@ -12,7 +12,7 @@ def main(): root = Sofa.Core.Node("root") createScene(root) - Sofa.Simulation.init(root) + Sofa.Simulation.initRoot(root) if not USE_GUI: for iteration in range(10): diff --git a/examples/liver.py b/examples/liver.py index 32188b01a..f2391d5c3 100644 --- a/examples/liver.py +++ b/examples/liver.py @@ -12,7 +12,7 @@ def main(): root = Sofa.Core.Node("root") createScene(root) - Sofa.Simulation.init(root) + Sofa.Simulation.initRoot(root) if not USE_GUI: for iteration in range(10): diff --git a/examples/loadXMLfromPython.py b/examples/loadXMLfromPython.py index 816a88d98..94f68798f 100644 --- a/examples/loadXMLfromPython.py +++ b/examples/loadXMLfromPython.py @@ -34,7 +34,7 @@ def main(): root = Sofa.Core.Node("root") createScene(root) - Sofa.Simulation.init(root) + Sofa.Simulation.initRoot(root) # Find out the supported GUIs print ("Supported GUIs are: " + Sofa.Gui.GUIManager.ListSupportedGUI(",")) diff --git a/examples/springForceField.py b/examples/springForceField.py index ebd657173..2a8753cf7 100644 --- a/examples/springForceField.py +++ b/examples/springForceField.py @@ -18,7 +18,6 @@ def createScene(root): ]) - root.addObject('DefaultAnimationLoop') surface_node = root.addChild('Surface') diff --git a/examples/taskScheduler.py b/examples/taskScheduler.py index 7a87684fb..598bec9f2 100644 --- a/examples/taskScheduler.py +++ b/examples/taskScheduler.py @@ -33,7 +33,7 @@ def createScene(root): def main(): root = Sofa.Core.Node("root") createScene(root) - Sofa.Simulation.init(root) + Sofa.Simulation.initRoot(root) for nb_threads in range(1, TaskScheduler.GetHardwareThreadsCount() + 1): print(f'Number of threads #{nb_threads}')