Alembic_Import : ImporterPlugin
Exposes the Alembic Importer plugin to MAXScript. Available in 3ds Max 2016 and higher.
Several properties have been added, removed, or changed in 2019. Available in 3ds Max 2019 and higher.
| 2019 | 2018 |
|---|---|
| AnimTimeRange | CacheTimeRange |
| CustomAttributes | new in 2019 |
| EndFrame | EndFrameTime |
| ExtraChannels | new in 2019 |
| gone in 2019 | StepFrameTime |
| Hidden | new in 2019 |
| LayerName | new in 2019 |
| MaterialIDs | new in 2019 |
| MaterialName | new in 2019 |
| Normals | new in 2019 |
| ObjectID | new in 2019 |
| SamplesPerFrame | new in 2019 |
| ShapeSuffix | ShapeName |
| StartFrame | StartFrameTime |
| UVs | new in 2019 |
| Velocity | new in 2019 |
| VertexColors | new in 2019 |
| Visibility | new in 2019 |
Constructor
Class instances not creatable by MAXScript.Aliases:
Alembic_Import
AlembicImportAlembic_Import interfaces:
Interface: AlembicImportProperties:
AlembicImport.CoordinateSystem : enum : Read|Write
CoordinateSystem enums: {#Max|#Maya|#ZUp|#YUp}Set the coordinate system of the imported Alembic file.
AlembicImport.ImportToRoot : boolean : Read|WriteControls the state of the "Import To Root" option of the Alembic Importer.
When set to False (default), the imported Alembic objects will be parented to an Alembic Container. This is useful if you want to transform or select all imported Alembic objects as one.
When set to True, the imported Alembic objects will become Children Of The World without a parent.
AlembicImport.FitTimeRange : boolean : Read|WriteWhen true, update the scene time range to match the imported Alembic animation time range.
AlembicImport.SetStartTime : boolean : Read|WriteWhen true, set the current scene time to match the imported Alembic animation start time.
AlembicImport.UVs : boolean : Read|WriteWhen true, import the mesh UV map channel. This global import option is copied locally into the created Alembic node.
AlembicImport.Normals : boolean : Read|WriteWhen true, import the mesh normals. This global import option is copied locally into the created Alembic node.
AlembicImport.VertexColors : boolean : Read|WriteWhen true, import the mesh vertex color map 0. This global import option is copied locally into the created Alembic node.
AlembicImport.ExtraChannels : boolean : Read|WriteWhen true, import the mesh extra map channels. This global import option is copied locally into the created Alembic node.
AlembicImport.Velocity : boolean : Read|WriteWhen true, import the mesh vertex velocity data. This global import option is copied locally into the created Alembic node.
AlembicImport.MaterialIDs : boolean : Read|WriteWhen true, import the mesh material IDs from Alembic face sets. This global import option is copied locally into the created Alembic node.
AlembicImport.Visibility : boolean : Read|WriteWhen true, import the node visibility data. This global import option is copied locally into the created Alembic node.
AlembicImport.ShapeSuffix : boolean : Read|WriteWhen set to true, the "Shape" suffix is stripped from the name of the imported objects. This property is set to false by default.
Methods:
<void>setDefaults()Reset all AlembicImport properties to their default values.
Alembic File Inspection Methods
<string> AlembicImport.Inspect <string>alembicFileLoads the specified almembicFile for inspection, and returns the "root" path of the Alembic file hierarchy. This method exposes the Inspect Alembic File option on the Alembic Import Options dialog.
Available in 3ds Max 2019.1 Update and higher.
<integer> AlembicImport.GetNumChildren <string>pathToNodeReturns the number of children for the specified node path.
Available in 3ds Max 2019.1 Update and higher.
<string> AlembicImport.GetParent <string>pathToNodeReturns the path of the parent node of the specified node.
Available in 3ds Max 2019.1 Update and higher.
<string> AlembicImport.GetChild <string>pathToNode <integer>indexReturns the path of the child node for the specified node, at the specified index.
Available in 3ds Max 2019.1 Update and higher.
<string> AlembicImport.GetABCNodeName <string>pathToNodeReturns the name of the specified node. This is the string displayed in the tree view in the Inspect Alembic File dialog.
Available in 3ds Max 2019.1 Update and higher.
<boolean> AlembicImport.IsPropertyNode <string>pathToNodeRemoved in 3ds Max 2019.2 Update: Returns true if the specified node defines a property.
<enum> AlembicImport.GetABCNodeType <string>pathToNode
GetABCNodeType enums: {#Compound|#Scalar|#ArrayRemoved in 3ds Max 2019.2 Update: Returns the property type of the specified node.
<enum> AlembicImport.GetABCNodeDataType <string>pathToNode
GetABCNodeDataType enums: {#Bool|#Int8|#UInt8|#Int16|#UInt16|#Int32|#UInt32|#Int64|#UInt64|#Float16|#Float32|#Float64|#String|#WString|#UnknownRemoved in 3ds Max 2019.2 Update: Returns the data type of the specified node.
<integer> AlembicImport.GetABCNodeExtent <string>pathToNodeRemoved in 3ds Max 2019.2 Update: Returns the extent of the specified node.
<string> AlembicImport.GetABCNodeProperties <string>pathToNodeReturns the object properties node for the specified node, where pathToNode is a string in the form of "path/to/alembic/object".
Available in 3ds Max 2019.2 Update and higher.
<integer> AlembicImport.GetNumProperties <string>pathToNode
<string>pathToPropertyReturns the number of properties held in the specified property node.
The pathToNode argument is a string in the form "path/to/alembic/object".
The pathToProperty argument is a string in the form "path/to/parent/property". Note: only compounded properties can have children.
Available in 3ds Max 2019.2 Update and higher.
<string> AlembicImport.GetChildPropertyFromIndex <string>pathToNode
<string>pathToProperty <integer> indexReturns the path to the child property node at the specified index. The index is 0-based.
The pathToNode argument is a string in the form "path/to/alembic/object".
The pathToProperty argument is a string in the form "path/to/parent/property". Note: only compounded properties can have children.
Available in 3ds Max 2019.2 Update and higher.
<string> AlembicImport.GetChildPropertyFromName <string>pathToNode
<string>pathToProperty <string>name);Gets the property node path for the first property with the specified name. The named property can be a grandchild, since this function is recursive.
The pathToNode argument is a string in the form "path/to/alembic/object".
The pathToProperty argument is a string in the form "path/to/parent/property". Note: only compounded properties can have children.
Available in 3ds Max 2019.2 Update and higher.
<enum> AlembicImport.GetPropertyType <string>pathToNode
<string>pathToProperty
GetPropertyType enums: {#Compound|#Scalar|#ArrayGets the type of the specified property node.
The pathToNode argument is a string in the form "path/to/alembic/object".
The pathToProperty argument is a string in the form "path/to/parent/property". Note: only compounded properties can have children.
Available in 3ds Max 2019.2 Update and higher.
<enum> AlembicImport.GetPropertyDataType <string>pathToNode
<string>pathToProperty
GetPropertyDataType enums: {#Bool|#Int8|#UInt8|#Int16|#UInt16|#Int32|#UInt32|#Int64|#UInt64|#Float16|#Float32|#Float64|#String|#WString|#UnknownGets the data type of the specified property node.
The pathToNode argument is a string in the form "path/to/alembic/object".
The pathToProperty argument is a string in the form "path/to/parent/property". Note: only compounded properties can have children.
Available in 3ds Max 2019.2 Update and higher.
<integer> AlembicImport.GetPropertyExtent <string>pathToNode
<string>pathToPropertyGets the extent of the specified property node.
The pathToNode argument is a string in the form "path/to/alembic/object".
The pathToProperty argument is a string in the form "path/to/parent/property". Note: only compounded properties can have children.
Available in 3ds Max 2019.2 Update and higher.
Custom Attribute and Object Attribute Methods
<void> AlembicImport.CA_AddProperty <enum>location <string>alembicObjectPath <string>propertyPath
CA_AddProperty - no automatic redraw after invoked
location enums: {#Modifier|#BaseObject}Adds a custom attribute to the list to be added to a base object or modifier.
location indicates where the custom attribute will be stored, either #Modifier or #BaseObject.
alembicObjectPath is the path alembic object that owns the custom attribute.
propertyPath is the path to the property of the custom attribute.
<void> AlembicImport.CA_Build()
CA_Build - no automatic redraw after invoked Builds the script that writes out the custom attributes and connects them to the alembic file.
<void> AlembicImport.CA_SetNode <node>node <string>alembicFileAssociates a node with an alembic file. This method needs to be called before adding properties to a node.
<boolean> AlembicImport.OA_SetBool <node>node <string>name <boolean>val
<boolean> AlembicImport.OA_SetInt <node>node <string>name <integer>val
<boolean> AlembicImport.OA_SetFloat <node>node <string>name <float>val
<boolean> AlembicImport.OA_SetPoint3 <node>node <string>name <point3>val
<boolean> AlembicImport.OA_SetString <node>node <string>name <string>valThese methods set object attributes on the specified node, and return true if the attribute was successfully set.
Actions:
No actions exposed.
EXAMPLE
--This example uses the files created in the --AlembicExport:ExporterPlugin topic: resetMaxFile #noprompt --reset the scene AlembicImport.ZUp = true --tell the importer to expect Z up (Max mode) AlembicImport.ImportToRoot = false --parent to an Alembic Container importFile (GetDir #export +"\\alembictest_hdm5_max.abc") #noPrompt using:AlembicImport --RESULT: The loaded Cone matches the original animation resetMaxFile #noprompt --reset the scene --note that the importer is still in Max Z up mode importFile (GetDir #export +"\\alembictest_ogawa_maya.abc") #noPrompt --RESULT: The Cone will be imported with the wrong orientation --because the file contains Y up data. resetMaxFile #noprompt --reset the scene AlembicImport.ZUp = false --tell the importer the file is not Z-up AlembicImport.ImportToRoot = true --import as Child Of The World --import the Maya file with Z up disabled: importFile (GetDir #export +"\\alembictest_ogawa_maya.abc") #noPrompt --RESULT: The Cone will now be oriented correctlyINSPECTION EXAMPLE
mypath = @"C:\My Documents\3ds Max\export\helicopter.ABC" pathToParent = AlembicImport.Inspect mypath fn getAllChildren pathToParent = ( numChildren = AlembicImport.GetNumChildren pathToParent for i = 1 to numChildren do ( pathToChild = AlembicImport.GetChild pathToParent (i-1) -- Also possible to get the parent by calling -- pathToParent = AlembicImport.GetParent pathToChild nodeName = AlembicImport.GetABCNodeName pathToChild format "Name: %\n" nodeName propPath = AlembicImport.GetABCNodeProperties pathToChild if propPath != undefined then ( numProps = AlembicImport.GetNumProperties pathToChild propPath nodeType = AlembicImport.GetPropertyType pathToChild propPath dataType = AlembicImport.GetPropertyDataType pathToChild propPath extent = AlembicImport.GetPropertyExtent pathToChild propPath format "%, %, %, %\n" numProps nodeType dataType extent ) getAllChildren pathToChild ) ) getAllChildren pathToParent
