import_scene
Imports a scene.
arguments
-
"add_scene_shader_paths" : Boolean (default: true)
Whether to add the scene file path to the shader search path to allow loading of scene specific MDL shaders.
References:
-
"block" : Boolean (default: false)
A boolean flag indicating if the scene creation is a blocking operation.
-
"errors_as_warnings" : Boolean (default: true)
If true then errors produced by the import as downgraded to warnings. This can be useful for importers that return errors for issues like missing textures however still import a functional scene. True errors, like syntax errors that prevent scene parsing, will usually still produce error messages since items like the root group will not be available to create a scene from.
-
"expiry_delay" : Uint32 (default: 0)
The time, in seconds, after which the scene will be deleted if inactive. The default value of zero indicates the scene should never be deleted.
-
"filename" : String
The name of the scene file to be imported. This file must be within the content root directory. A relative path will automatically be resolved within the content root. An absolute path must terminate within the content root or else importation will fail. A file URI (file://) may be used instead of a filename in which case the path will always be interpreted as relative to content root.
-
"import_options" : Map (default: null)
The import options. All importers support the prefix and list_elements options. The name of the option is used as the key of the map. E.g.: import_options["list_elements"] = true.
-
"scene_name" : String
The name of the scene. This is the name under which the scene will be stored in the database. If the scene does not exist it will be created.
return value
Import_resultA user type containing the name of the imported root group, options block, camera instance and camera. Also an array of imported elements if list_elements was set to true. The messages element will contain an array with any import warnings or messages. On successful import this will contain 1 element with code 0. Any other entries will be import warnings. Import failure is indicated by returning an error response (rather than an Import_result) which will provide an array of error messages as additional error information.