Skip to content

'pysplishsplash.Exec.SimulatorBase' object has no attribute 'getScene' #186

@chunleili

Description

@chunleili

Again, I tried the following codes in the documentation. It fails
image

import pysplishsplash
import pysplishsplash.Utilities.SceneLoaderStructs as Scene

def main():
    base = pysplishsplash.Exec.SimulatorBase()
    args = base.init()
    gui = pysplishsplash.GUI.Simulator_GUI_imgui(base)
    base.setGui(gui)
    scene = base.getScene()
    add_block = Scene.FluidBlock('Fluid', Scene.Box([0.0, 0.0, 0.0], [1.0, 1.0, 1.0]), 0, [0.0, 0.0, 0.0])
    scene.fluidBlocks[1] = add_block # In Place construction not supported yet
    base.run()

if __name__ == "__main__":
    main()

The error message:

Traceback (most recent call last):
  File "e:\codes\SPlisHSPlasH\pySPlisHSPlasH\myExamples\mySimulator.py", line 15, in <module>
    main()
  File "e:\codes\SPlisHSPlasH\pySPlisHSPlasH\myExamples\mySimulator.py", line 9, in main
    scene = base.getScene()
AttributeError: 'pysplishsplash.Exec.SimulatorBase' object has no attribute 'getScene'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions