Skip to content

Commit 79507e0

Browse files
committed
simplify writing for ImGui use
1 parent 492a9e0 commit 79507e0

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

docs/sphinx/source/content/FirstSteps.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,10 @@ In case you want to manage the simulation from the runSofa GUI, you can call the
101101
Sofa.Simulation.initRoot(root)
102102
103103
# Import the GUI package
104-
import SofaRuntime
104+
import SofaImGui
105105
import Sofa.Gui
106106
107107
# Launch the GUI (imgui is now by default, to use Qt please refer to the example "basic-useQtGui.py")
108-
SofaRuntime.importPlugin("SofaImGui")
109108
Sofa.Gui.GUIManager.Init("myscene", "imgui")
110109
Sofa.Gui.GUIManager.createGUI(root, __file__)
111110
Sofa.Gui.GUIManager.SetDimension(1080, 800)
@@ -376,7 +375,7 @@ Here is the entire code of the scene :
376375
.. code-block:: python
377376
378377
import Sofa
379-
import SofaRuntime
378+
import SofaImGui
380379
import Sofa.Gui
381380
382381
@@ -391,7 +390,6 @@ Here is the entire code of the scene :
391390
Sofa.Simulation.initRoot(root)
392391
393392
# Launch the GUI (imgui is now by default, to use Qt please refer to the example "basic-useQtGui.py")
394-
SofaRuntime.importPlugin("SofaImGui")
395393
Sofa.Gui.GUIManager.Init("myscene", "imgui")
396394
Sofa.Gui.GUIManager.createGUI(root, __file__)
397395
Sofa.Gui.GUIManager.SetDimension(1080, 800)

docs/sphinx/source/content/UsingThePlugin.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ By structuring your scripts this way, you get the advantage to have a script loa
222222
Sofa.Simulation.init(root)
223223
224224
# Launch the GUI (imgui is now by default, to use Qt please refer to the example "basic-useQtGui.py")
225-
import SofaRuntime
226-
SofaRuntime.importPlugin("SofaImGui")
225+
import SofaImGui
226+
import Sofa.Gui
227227
Sofa.Gui.GUIManager.Init("myscene", "imgui")
228228
Sofa.Gui.GUIManager.createGUI(root, __file__)
229229
Sofa.Gui.GUIManager.SetDimension(1080, 800)
@@ -417,7 +417,7 @@ Here is the entire code of the scene :
417417
.. code-block:: python
418418
419419
import Sofa
420-
import SofaRuntime
420+
import SofaImGui
421421
import Sofa.Gui
422422
423423
@@ -432,7 +432,6 @@ Here is the entire code of the scene :
432432
Sofa.Simulation.init(root)
433433
434434
# Launch the GUI (imgui is now by default, to use Qt please refer to the example "basic-useQtGui.py")
435-
SofaRuntime.importPlugin("SofaImGui")
436435
Sofa.Gui.GUIManager.Init("myscene", "imgui")
437436
Sofa.Gui.GUIManager.createGUI(root, __file__)
438437
Sofa.Gui.GUIManager.SetDimension(1080, 800)

0 commit comments

Comments
 (0)