Class IO
Inheritance
Namespace:
Syntax
Methods
configureFunctionLogger
Declaration
io.configureFunctionLogger(functionName, enableFunction, enableParameters, enableExecutionTime)
Parameters
Type | Name | Description |
---|---|---|
String | functionName | |
Boolean | enableFunction | |
Boolean | enableParameters | |
Boolean | enableExecutionTime |
addAssetPaths
add directory paths to search assets in
See also:
Declaration
io.addAssetPaths(path)
Parameters
Type | Name | Description |
---|---|---|
StringList | path | The paths to add |
clearAssetPaths
clear all asset paths
See also:
Declaration
io.clearAssetPaths()
findInDirectories
find the final path. This will search for the file in asset paths
See also:
Declaration
io.findInDirectories(filePath) -> core.String
Parameters
Type | Name | Description |
---|---|---|
String | filePath | The (relative) file path to search for |
Returns
Type | Description |
---|---|
String | The returned final path |
getAssetPaths
get user defined paths to find assets
See also:
Declaration
io.getAssetPaths() -> core.StringList
Returns
Type | Description |
---|---|
StringList | The asset paths |
setAssetPaths
replace paths to find assets
See also:
Declaration
io.setAssetPaths(assetPaths)
Parameters
Type | Name | Description |
---|---|---|
StringList | assetPaths | The asset paths |
applyAutoTessellate
Handle auto tessellate options on given part, need to be complete
See also:
Declaration
io.applyAutoTessellate(part)
Parameters
Type | Name | Description |
---|---|---|
Part | part | Part to be auto tessellated |
exportScene
Export a file
See also:
Declaration
io.exportScene(fileName, root=0)
Parameters
Type | Name | Description |
---|---|---|
OutputFilePath | fileName | Path of the file to export |
Occurrence | root | Identifier of the root occurrence to export |
exportSelection
Export the selection to a file
See also:
Declaration
io.exportSelection(fileName, keepIntermediaryNodes=False)
Parameters
Type | Name | Description |
---|---|---|
OutputFilePath | fileName | Path of the file to export |
Boolean | keepIntermediaryNodes | If true, intermerdiary hierarchy is kept |
getExportFormats
Give all the format name and their extensions that can be exported in Pixyz
See also:
Declaration
io.getExportFormats() -> core.FormatList
Returns
Type | Description |
---|---|
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:
Declaration
io.getImportFormats() -> core.FormatList
Returns
Type | Description |
---|---|
FormatList | Formats that can be imported in Pixyz |
importFiles
Import files
See also:
Declaration
io.importFiles(fileNames, root=0) -> scene.OccurrenceList
Parameters
Type | Name | Description |
---|---|---|
FilesList | fileNames | List of files's paths to import |
Occurrence | root | Identifier of the destination occurrence |
Returns
Type | Description |
---|---|
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:
Declaration
io.importPicture(filename, root=0) -> scene.Occurrence
Parameters
Type | Name | Description |
---|---|---|
FilePath | filename | Path of the file to import |
Occurrence | root | Identifier of the destination occurrence |
Returns
Type | Description |
---|---|
Occurrence | The root occurrence if defined, otherwise a new occurrence created by the importer |
importRemote3mxFile
Import a remote 3mx file
See also:
Declaration
io.importRemote3mxFile(filePath, origin="", root=0) -> scene.Occurrence
Parameters
Type | Name | Description |
---|---|---|
String | filePath | The path of the temp file |
String | origin | Remote origin of the file |
Occurrence | root | Identifier of the destination occurrence |
Returns
Type | Description |
---|---|
Occurrence | The root occurrence if defined, otherwise a new occurrence created by the importer |
importScene
Import a file
See also:
Declaration
io.importScene(fileName, root=0) -> scene.Occurrence
Parameters
Type | Name | Description |
---|---|---|
FilePath | fileName | Path of the file to import |
Occurrence | root | Identifier of the destination occurrence |
Returns
Type | Description |
---|---|
Occurrence | The root occurrence if defined, otherwise a new occurrence created by the importer |
listVariants
List all variants if file
See also:
Declaration
io.listVariants(fileName) -> io.VariantNameList
Parameters
Type | Name | Description |
---|---|---|
FilePath | fileName | Path of the file to import |
Returns
Type | Description |
---|---|
VariantNameList | List all variants |
loadReferencedData
Load partial model
See also:
Declaration
io.loadReferencedData(component, recursively)
Parameters
Type | Name | Description |
---|---|---|
ReferencedDataComponent | component | The component to load |
Bool | recursively | Load it recursively or not |
unloadReferencedData
Unload partial model
See also:
Declaration
io.unloadReferencedData(component)
Parameters
Type | Name | Description |
---|---|---|
ReferencedDataComponent | component | The component to unload |
registerIOCallbacks
Register import and export callbacks
Declaration
io.registerIOCallbacks(name, importCallback, exportCallback, fileFormats)
Parameters
Type | Name | Description |
---|---|---|
String | name | Callback name |
importFileCallback | importCallback | Callback that import a file |
exportFileCallback | exportCallback | Callback that exports to a file |
FileFormatList | fileFormats | Gives the extension and parameters to Import/Export |
splitPointCloud
Declaration
io.splitPointCloud(files, outputDirectory, minVoxSize, useKDTree, aabb=None, density=-1)
Parameters
Type | Name | Description |
---|---|---|
FilePathList | files | Path of the point cloud files to process |
OutputDirectoryPath | outputDirectory | Output directory |
Double | minVoxSize | Size of minimum leaves (mm) |
Boolean | useKDTree | If true, uses a kd_tree, otherwise, uses an octree |
AABB | aabb | Global scene aabb |
Double | density | Point cloud density (-1 to compute) |
getExtensionPriority
get the priority of an extension from the pixyz importer
Declaration
io.getExtensionPriority(extensionName) -> io.PriorityImportLevel
Parameters
Type | Name | Description |
---|---|---|
String | extensionName | The name of the extension |
Returns
Type | Description |
---|---|
PriorityImportLevel | The level of priority of the extension |