Class IO
- Namespace
Methods
configureFunctionLogger
io.configureFunctionLogger(functionName, enableFunction, enableParameters, enableExecutionTime)
Parameters
exportSceneToDTPlatform
Export current scene to a local directory
See also:
io.exportSceneToDTPlatform(root=1, directory)
Parameters
root
OccurrenceIdentifier of the destination occurrence
directory
StringDirectory to export in
exportSceneToReflect
Export current scene to a reflect project
See also:
io.exportSceneToReflect(root=1, sourceName="", uid="", keepHierarchy=False, configFile="", disableDecimation=True)
Parameters
root
OccurrenceIdentifier of the destination occurrence
sourceName
StringPush source name
uid
StringUID of the push, overwrite old push if it's same UID
keepHierarchy
BooleanKeep hierarchy or rake tree
configFile
FilePathUse existing JSON config file, discard reflect UI prompt
disableDecimation
BooleanForces to disable the decimation applied on SyncObjectInstances on Reflect Server side
importSceneFromDTPlatform
io.importSceneFromDTPlatform(directory, root=0)
Parameters
directory
DirectoryPathDirectory to import from
root
OccurrenceIdentifier of the destination occurrence
exportScene
Export a file
See also:
io.exportScene(fileName, root=0)
Parameters
fileName
OutputFilePathPath of the file to export
root
OccurrenceIdentifier of the root occurrence to export
exportSelection
Export the selection to a file
See also:
io.exportSelection(fileName, keepIntermediaryNodes=False)
Parameters
fileName
OutputFilePathPath of the file to export
keepIntermediaryNodes
BooleanIf true, intermerdiary hierarchy is kept
getExportFormats
Give all the format name and their extensions that can be exported in Pixyz
See also:
io.getExportFormats() -> core.FormatList
Returns
- FormatList
Formats that can be exported in Pixyz
getImportFormats
Give all the format name and their extensions that can be imported in Pixyz
See also:
io.getImportFormats() -> core.FormatList
Returns
- FormatList
Formats that can be imported in Pixyz
importFiles
Import files
See also:
io.importFiles(fileNames, root) -> scene.OccurrenceList
Parameters
fileNames
FilesListList of files's paths to import
root
OccurrenceIdentifier of the destination occurrence
Returns
- OccurrenceList
The root occurrences of each imported file
importPicture
Imports a picture and applies is at as a texture on a 3D plane created in the scene.
See also:
io.importPicture(filename, root) -> scene.Occurrence
Parameters
filename
FilePathPath of the file to import
root
OccurrenceIdentifier of the destination occurrence
Returns
- Occurrence
The root occurrence if defined, otherwise a new occurrence created by the importer
importRemote3mxFile
Import a remote 3mx file
See also:
io.importRemote3mxFile(filePath, origin, root) -> scene.Occurrence
Parameters
filePath
StringThe path of the temp file
origin
StringRemote origin of the file
root
OccurrenceIdentifier of the destination occurrence
Returns
- Occurrence
The root occurrence if defined, otherwise a new occurrence created by the importer
importScene
Import a file
See also:
io.importScene(fileName, root) -> scene.Occurrence
Parameters
fileName
FilePathPath of the file to import
root
OccurrenceIdentifier of the destination occurrence
Returns
- Occurrence
The root occurrence if defined, otherwise a new occurrence created by the importer
listVariants
List all variants if file
See also:
io.listVariants(fileName) -> io.VariantNameList
Parameters
fileName
FilePathPath of the file to import
Returns
- VariantNameList
List all variants
loadReferencedData
See also:
io.loadReferencedData(component, recursively)
Parameters
component
ReferencedDataComponentThe component to load
recursively
BoolLoad it recursively or not
registerImportCallback
add new homade importer
io.registerImportCallback(name, extensions, callback)
Parameters
name
StringCallback name
extensions
StringListHandled extensions
callback
importFileCallbackCallback that import a file
splitPointCloud
io.splitPointCloud(files, outputDirectory, minVoxSize, useKDTree, aabb, density=-1)
Parameters
files
FilePathListPath of the point cloud files to process
outputDirectory
OutputDirectoryPathOutput directory
minVoxSize
DoubleSize of minimum leaves (mm)
useKDTree
BooleanIf true, uses a kd_tree, otherwise, uses an octree
aabb
AABBGlobal scene aabb
density
DoublePoint cloud density (-1 to compute)