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 (default: null)
The name of the scene file to be imported. Either this or
url
must be provided. 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. - "filetype" : String (default: null)
Forces use of a specific importer when loading http resources.
filetype
must be provided as a file extension without the period (.) prefix. - "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.
- "progress_id" : String (default: null)
The identifier that will be received by command progress callbacks.
- "request_options" : Map (default: null)
Http request options used when importing from http or https. These will be provided to the http import api whenever
url
is provided. Request options are specified as key value pairs and may include the following:method
(String): The http method of the request. Which must be one of the following:get
post
put
connect
head
delete
patch
options
body
(String|Binary): The http request body.timeout
(Number): The timeout in seconds of the entire request.connect_timeout
(Number): The timeout in seconds of the connection handshake.follow_redirects
(Boolean): Whether http redirects will be automatically followed.maintain_request_methods
(Array): A list of http codes (String
) that will maintain http method when followed. May be one of:'301'
,'302'
,'303'
or'all'
.max_redirects
(Number): The maximum number of redirects followed for the request.authenticate_redirects
(Boolean): Whether redirects to other hostnames should have authentication credentials from the original host applied to them.headers
(Map): A collection of header key value pairs. Each value can either be a singleString
or anArray
ofString
if the same header is to be specified multiple times.verify_ssl
(Boolean): Whether ssl connections require certificate verification.
mi::nservices::IHttp_client
documentation.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.
The url of the scene to be imported. Either this or filename
must be provided.
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.