Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions examples/additional-examples/ControllerScene.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ def createScene(root):

def main():
# Load the required plugins
SofaRuntime.importPlugin("SofaOpenglVisual")
SofaRuntime.importPlugin("SofaGeneralEngine")
SofaRuntime.importPlugin("Sofa.GL.Component")
SofaRuntime.importPlugin("Sofa.Component")


# Check and save if the script is called from python environment
global _runAsPythonScript
Expand Down
16 changes: 2 additions & 14 deletions examples/additional-examples/pygame_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,8 @@ def simple_render(rootNode):
def createScene(root):
# Register all the common component in the factory.
SofaRuntime.PluginRepository.addFirstPath(os.path.join(sofa_directory, 'bin'))
root.addObject("RequiredPlugin", name="SofaOpenglVisual") # visual stuff
root.addObject("RequiredPlugin", name="SofaLoader") # geometry loaders
root.addObject("RequiredPlugin", name="SofaSimpleFem") # diffusion fem
root.addObject("RequiredPlugin", name="SofaBoundaryCondition") # constraints
root.addObject("RequiredPlugin", name="SofaEngine") # Box Roi
root.addObject("RequiredPlugin", name="SofaImplicitOdeSolver") # implicit solver
root.addObject("RequiredPlugin", name="SofaMiscForceField") # meshmatrix
root.addObject("RequiredPlugin", name="SofaGeneralEngine") # TextureInterpolation
root.addObject("RequiredPlugin", name="CImgPlugin") # for loading a bmp image for texture
root.addObject("RequiredPlugin", name="SofaBaseLinearSolver")
root.addObject("RequiredPlugin", name="SofaGeneralVisual")
root.addObject("RequiredPlugin", name="SofaTopologyMapping")
root.addObject("RequiredPlugin", name="SofaGeneralTopology")
root.addObject("RequiredPlugin", name="SofaGeneralLoader")
root.addObject("RequiredPlugin", name="Sofa.Component")
root.addObject("RequiredPlugin", name="Sofa.GL.Component")

### these are just some things that stay still and move around
# so you know the animation is actually happening
Expand Down
11 changes: 3 additions & 8 deletions examples/additional-examples/pyqt_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,9 @@ class SofaSim():
def __init__(self):
# Register all the common component in the factory.
SofaRuntime.PluginRepository.addFirstPath(os.path.join(sofa_directory, 'bin'))
SofaRuntime.importPlugin('SofaOpenglVisual')
SofaRuntime.importPlugin("SofaComponentAll")
SofaRuntime.importPlugin("SofaGeneralLoader")
SofaRuntime.importPlugin("SofaImplicitOdeSolver")
SofaRuntime.importPlugin("SofaLoader")
SofaRuntime.importPlugin("SofaSimpleFem")
SofaRuntime.importPlugin("SofaBoundaryCondition")
SofaRuntime.importPlugin("SofaMiscForceField")
SofaRuntime.importPlugin('Sofa.GL.Component')
SofaRuntime.importPlugin("Sofa.Component")

self.root = Sofa.Core.Node("Root")
root = self.root
root.gravity = [0, -1., 0]
Expand Down
2 changes: 1 addition & 1 deletion examples/emptyController.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def createScene(root):
def main():
import SofaRuntime
import Sofa.Gui
SofaRuntime.importPlugin("SofaOpenglVisual")

root=Sofa.Core.Node("root")
createScene(root)

Expand Down
2 changes: 1 addition & 1 deletion examples/emptyDataEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def createScene(root):
def main():
import Sofa.Gui
import SofaRuntime
SofaRuntime.importPlugin("SofaOpenglVisual")

root=Sofa.Core.Node("root")
createScene(root)
Sofa.Simulation.init(root)
Expand Down
3 changes: 0 additions & 3 deletions examples/example-forcefield.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ def createScene(root):
def main():
import SofaRuntime
import Sofa.Gui
SofaRuntime.importPlugin("SofaOpenglVisual")
SofaRuntime.importPlugin("Sofa.Component.StateContainer")
SofaRuntime.importPlugin("SofaImplicitOdeSolver")

root=Sofa.Core.Node("root")
createScene(root)
Expand Down
2 changes: 0 additions & 2 deletions examples/liver.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
def main():
import SofaRuntime
import Sofa.Gui
SofaRuntime.importPlugin("SofaOpenglVisual")
SofaRuntime.importPlugin("SofaImplicitOdeSolver")

root = Sofa.Core.Node("root")
createScene(root)
Expand Down