Skip To Content

MSPKExportSettings

Mobile Scene Package Export Settings.

@example:
# settings class to export the scene as a MSPK file. Note that the user may be prompted for
# a coordinate system for the scene if none is set.
ce.setSceneCoordSystem("EPSG:26954")
scene = ce.getObjectsFrom(ce.scene, ce.withName("Heightmap"))
scene = scene + ce.getObjectsFrom(ce.scene, ce.withName("Landmarks"))
exportSettings = MSPKExportSettings()
exportSettings.setOutputPath(ce.toFSPath("models"))
exportSettings.setBaseName("myScene")
ce.export(scene, exportSettings)

 

Methods defined here:

getBaseName

getBaseName(self):

Gets the base name for the exported file.

@return: The base name for the exported file. [str]

@example:
exportSettings = MSPKExportSettings()
print exportSettings.getBaseName()

getOutputPath

getOutputPath(self):

Gets the export folder path.

@return: The absolute system path to the folder for the exported file. [str]

@example:
exportSettings = MSPKExportSettings()
print exportSettings.getOutputPath()

getOverwrite

getOverwrite(self):

Gets the state of the overwrite option.

@return: Whether existing files will be overwritten. [True/False]

@example:
exportSettings = MSPKExportSettings()
print exportSettings.getOverwrite()

getSceneType

getSceneType(self):

Gets the set scene type.

@return: A string containing the curently set scene type. [str]

@example:
exportSettings = MSPKExportSettings()
print exportSettings.getSceneType()

setBaseName

setBaseName(self, baseName):

Sets the base name for the exported file.

@param baseName: The base name of the exported file.  [str]

@example:
exportSettings = MSPKExportSettings()
exportSettings.setBaseName("myScene")

setOutputPath

setOutputPath(self, outputPath):

Sets the folder path in which to export.

@param outputPath: The absolute system path to the folder which will contain the exported file.  [str]

@example:
exportSettings = MSPKExportSettings()
exportSettings.setOutputPath(ce.toFSPath("models"))

setOverwrite

setOverwrite(self, overwrite):

Sets whether extisting files should be overwritten.

@param overwrite: True = overwrite existing files, False = don't. Default = True.  [True/False]

@example:
exportSettings = MSPKExportSettings()
exportSettings.setOverwrite(False)

setSceneType

setSceneType(self, sceneType):

Sets in what scene environment the files should be written.

@param sceneType: String which defines whether a global or a local scene is written. Possible values are [ GLOBAL, LOCAL ]. Default is GLOBAL.  [str]

@example:
exportSettings = MSPKExportSettings()
exportSettings.setSceneType("LOCAL")