Functions
Python bindings to Alias C++ API
- class alias_api.AlCurveNodeJoinErrors
Members:
BadData
Success
DuplicateCurve
Failure
BadCluster
NoAttributes
InvalidKeyPoint
CurveClosed
- property name
- class alias_api.AlDisplayModeType
Members:
GeomEditPoints
BoundingBox
Invisible
GeomKeyPoints
Template
Dashed
ConstructionPlane
GeomHull
GeomCVs
CompressedSbd
- property name
- class alias_api.AlMessageType
Members:
DagNodeModifiedGeometry
DagNodeModified
TrimSurface
Invalid
FirstMessage
DagNodeDeleted
DagNodeInstanced
DagNodeModifiedShaderAssignment
DeleteAll
DagNodeModifiedConstraint
HierarchyModified
StageActive
DagNameModified
JointModified
Refresh
DagNodePreReplaceGeometry
Update
DagNodeReplaceGeometry
DagNodeApplyTransformation
DagNodeVisible
DagDispModified
ReferenceFileDeleted
CosDeleted
CosModified
CosVisible
LayerSymmetryModified
PostRetrieve
AttributesDelete
UniverseDeleted
PreUpdate
PostUpdate
PreRetrieve
Quit
StageMerged
AnimPlayback
ListModifiedNodes
PreRefresh
ReferenceFileSetDeleted
TextureDeleted
CommandInstall
LayerStateModified
CommandFree
LayerAssign
PickListModified
UntrimSurface
PlotRefresh
UniverseCreated
StageCreated
StageDeleted
UniverseMerged
CloudDeleted
PreStore
UniverseActive
PostStore
TextureModified
ClMemberModified
DagInserted
ShaderDeleted
CameraModified
ExprModified
LayersEnabled
CommandUnInstall
ShaderAdded
CnetDeleted
ShaderModified
LightModified
TextureAdded
DagNodeUndeleted
LayerVisibilityModified
LayersReordered
LayerAdded
LayerDeleted
LayerAttributeChanged
LastMessage
- property name
- class alias_api.AlObjectType
Members:
ClusterType
ConicAttributeType
ClusterNodeType
AmbientLightType
GroupNodeType
NonAmbientLightType
AreaLightType
PointConstraintType
DirectionLightType
CameraType
LightUpNodeType
BoxLightType
CameraViewType
LightType
LightNodeType
SpotLightType
CameraEyeType
SetType
CameraUpType
TrimBoundaryType
ClusterMemberType
ConstructionPlaneType
ConeLightType
CurveNodeType
CurveOnSurfaceType
CurveType
CurveCVType
KeyframeType
PolygonType
VolumeLightType
LightLookAtNodeType
CylinderLightType
DagNodeType
FaceNodeType
FaceType
SphereLightType
ImagePlaneType
LinearLightType
CurveAttributeType
TextureType
SurfaceType
ReferenceFileType
OrthographicCameraType
PerspectiveCameraType
PointLightType
FuturePointType3
ArcAttributeType
SetMemberType
SurfaceNodeType
SurfaceCurveType
JointType
SurfaceCVType
LayerType
TorusLightType
LineAttributeType
PolysetType
MotionActionType
LocatorType
WindowType
ChannelType
ActionType
ParamActionType
StreamType
EnvironmentType
ShaderType
PolysetNodeType
AttributeType
PolysetVertexType
PlaneAttributeType
DeviationLocatorType
RevSurfAttributeType
ConstraintType
OrientationConstraintType
AimConstraintType
CharacterType
TextureNodeType
ShellNodeType
ShellType
TrimRegionType
TrimCurveType
CommandType
CommandRefType
ContactType
CharacterSpaceType
CharSnippetType
CharTransitionType
IKHandleType
IKHandleNodeType
AnnotationLocatorType
DistanceLocatorType
CurvePointType
AngleLocatorType
RadialLocatorType
MinmaxLocatorType
ConstructionEntityType
ConstructionVectorType
ConstructionFutureType1
ConstructionFutureType2
PointType
SpacePointType
SurfacePointType
CurveOnSurfacePointType
FuturePointType1
FuturePointType2
ReferenceFileSetType
FuturePointType4
FuturePointType5
CloudType
BlendCurveType
BlendPointType
CategoryType
MeshType
MeshNodeType
EvaluateType
- property name
- class alias_api.AlStatusCode
Members:
NameChangedToUniqueOne
Success
AlreadyCreated
Failure
ExprParseError
CannotDelete
InsufficientMemory
InvalidArgument
NoProjectEnvironment
NoParent
RenameStageFailure
ExprNotValidRelative
InvalidObject
InvalidWireFile
ObjectInSet
ObjectInAnotherSet
ExprBadVariable
ObjectInExclusiveSet
ExprNotValidName
ObjectAncestorInSet
ObjectDescendentInSet
ObjectNotAMember
ExprNotDagObject
ExprNotValidCV
ExprNotValidParameter
DeleteStageFailure
ExprAxInsertCircRef
ExprAxInsertBadRef
ExprAxInsertSelfRef
SetStageFailure
AlreadyTrimmed
ObjectNotFound
NotAvailable
ObjectAlreadyPresent
EndOfGlobalCodes
InvalidWindowType
EndOfAlStatusCodes
- property name
- alias_api.add_message_handler(message_type: alias_api.AlMessageType, callback_func: Callable[[alias_api.MessageResult], None]) Tuple[int, int]
Install a message handler in the Alias Universe.
- alias_api.al_are_equal(al_object1: alias_api.AlObject, al_object2: alias_api.AlObject) int
Return True if the two Alias Objects are equal, else False.
- alias_api.al_is_valid(al_object: alias_api.AlObject) int
Return True if the Alias Object is valid, else False.
- alias_api.apply_iterator_to_dag_nodes(iter: AlIterator, retcode: int) int
Applies the iterator to all AlDagNodes. It does not recursively go down the DAG.
- alias_api.apply_iterator_to_shaders(iter: AlIterator, retcode: int) int
Apply the iterator to each AlShader.
- Parameters
iter (AlIterator) – the iterator to apply
retcode (int) – the return value of the last application of the iterator
- Returns
The status code result Success - the iterator was successfully applied to each shader InvalidArgument - ‘iter’ was None Failure - AlUniverse was not initialized
- Return type
int(AlStatusCode)
- alias_api.cleanup_geometry_model(face_to_surf: bool = False, split_c1_breaks: bool = False, split_closed_basis: bool = False, shrink_closed_surf: bool = False, set_persistent_ids: bool = False, split_sphere: bool = False, picked_dags_only: bool = False, split_multiknots: bool = False, delete_null_nodes: bool = False, delete_degenerate_geo: bool = False) int
Clean up the geometry of the model.
- alias_api.clear_pick_list() int
Remove all objects from the pick list.
- alias_api.convert_face_node_to_trimmed_surface_node(node: alias_api.AlDagNode) int
Convert a AlFaceNode to AlSurfaceNode (a trimmed surface).
The dag node and the attachment is not changed but the geometry is replaced by a trimmed surface. The animation and other attachment on geometry level are gone (lost).
- Parameters
node (AlDagNode) – The face node to convert. This will be modified if the function succeeds.
- Returns
The status code result.
- Return type
int(AlStatusCode)
- alias_api.convert_to_trimmed_surface_node(node: alias_api.AlDagNode) int
This function works on a AlSurfaceNode only, and only on a surface that is a closed/periodic and untrimmed surface (e.g. a pure cylinder). then the function converts it to a trimmed surface and split the closed surface into multiple open regions.
- Parameters
node (AlDagNode) – The node to convert.
- Returns
The status code result Success - the conversion is done so the geometry under
node is changed (also the wrapper AlDagNode)
- Failure - there is no need to convert or error happened
the node is not changed at all.
- Return type
int(AlStatusCode)
- alias_api.copy_object(node: alias_api.AlDagNode, run_cleanup: int = True) alias_api.AlDagNode
This function performs the copy of the dag node based on the copy options that have been set with the setCopyOptionFlags() routine.
Note: set runCleanup to False if you will be performing many copies, then call AlDagNodeExt::copyObjectCleanup() after. This will speed up the copying of objects.
- alias_api.copy_object_cleanup() int
Call this method after performing a number of dag node copy object operations to clean up the scene.
- alias_api.create_alternative(name: str, force: bool = False) alias_api.AlReferenceFileSet
Create an AlReferenceFileSet in the Alias Universe.
- alias_api.create_construction_plane(tm: alias_api.AlTM) alias_api.AlDagNode
Create a dag node that is a construction plane at the position denoted by ‘tm’.
- alias_api.create_layer(layer_name: str) alias_api.AlLayer
Create a new AlLayer in the Alias Universe.
- alias_api.create_layer_folder(folder_name: str) alias_api.AlLayer
Create a new AlLayer folder in the Alias Universe.
- alias_api.create_orthographic_camera(view_type: AlWindow::AlViewType) alias_api.AlOrthographicCamera
Create and return an AlOrthographicCamera object.
- alias_api.create_perspective_camera() alias_api.AlPerspectiveCamera
Create and return a AlPerspectiveCamera object.
- alias_api.create_reference(arg0: str) alias_api.AlReferenceFile
Create an AlReferenceFile with the given path, in the Alias Universe.
- alias_api.create_reference_alternative(name: str) alias_api.AlReferenceFileSet
Create an AlReferenceFileSet with the given name.
- alias_api.create_shader() alias_api.AlShader
Create a new AlShader in the Alias Universe.
- alias_api.create_stage(arg0: str) int
Create a new stage in Alias.
- alias_api.create_texture_node(*args, **kwargs)
Overloaded function.
create_texture_node(imagePath: str, useConstructionPlane: bool = False, errs: list = []) -> bool
A function which creates a Canvas Image at the center of the world.
create_texture_node(name : str, imagePath : str, useConstructionPlane: bool, errs: list) -> bool
A function which creates a Canvas Image at the center of the world.
- alias_api.delete_all_construction_entities() int
Delete all AlConstructionPlane objects found in the Alias Universe.
- alias_api.delete_history(node: alias_api.AlDagNode) None
Delete the history from this dag node.
- Parameters
node (AlDagNode) – The dag node to delete history from.
- Returns
The status code result.
- Return type
int(AlStatusCode)
- alias_api.delete_null_nodes() int
Delete all null nodes in the Alias scene.
- alias_api.expand_instances(node: alias_api.AlDagNode) int
Convert all instsances below the given node (top node of tree) to uninstanced geometry.
- alias_api.find_dag_node_by_name(name: str) alias_api.AlDagNode
Find and return the DagNode that matches the given name.
This traverses into group nodes to search the entire DAG for the node.
- Parameters
name (str) – The unique dag node name to search by.
- alias_api.find_top_level_dag_node_by_name(name: str) alias_api.AlDagNode
Find and return the DagNode that matches the given name.
This does not traverse into group nodes, only the top-level nodes in the DAG.
- Parameters
name (str) – The unique dag node name to search by.
- alias_api.first_construction_entity() alias_api.AlConstructionEntity
Return the first AlConstructionPlane object found in the Alias Universe.
- alias_api.first_dag_node() alias_api.AlDagNode
Return the first AlDagNode in the list of Alias AlDagNode objects (the DAG).
- alias_api.first_layer() alias_api.AlLayer
Return the first layer which refers to the default layer. This layer is always valid in the universe. None is returned if the universe is not initialized.
- alias_api.first_pick_item() int
Set the pick list to reference the first object in the list.
- alias_api.first_shader() alias_api.AlShader
Return the first AlShader in the list of Alias AlShader objects. None is returned if the list is empty.
- alias_api.get_alternative_by_name(name: str) alias_api.AlReferenceFileSet
Return the AlReferenceFileSet matching the given name.
- alias_api.get_alternatives() List[alias_api.AlReferenceFileSet]
Return a list of all the alternatives for the current AlReferenceFileSet.
- alias_api.get_annotation_locators() List[str]
Return all the annotation locators of the current file.
- alias_api.get_children(arg0: alias_api.AlGroupNode) List[alias_api.AlDagNode]
Return a list of all the children in the group node.
- alias_api.get_construction_plane_by_name(name: str) alias_api.AlConstructionPlane
Return the AlConstructionPlane matching the given unique name.
- alias_api.get_current_path() str
Return the current file path.
- alias_api.get_current_pick_item() AlObject
Return the object that the pick list is currently referencing.
- alias_api.get_current_stage() alias_api.Stage
Return the current stage.
- alias_api.get_layer_by_name(layer_name: str) alias_api.AlLayer
Return a layer given its name in the Alias Universe.
- alias_api.get_layer_by_number(layer_number: int) alias_api.AlLayer
Return a layer given its number in the Alias Universe.
- alias_api.get_layers() List[alias_api.AlLayer]
Return a list of all the layers in the Alias Universe.
- alias_api.get_perspective_camera_by_name(name: str) alias_api.AlPerspectiveCamera
Find and return the AlPerspectiveCamera that matches the unique identifier name.
- alias_api.get_perspective_cameras() List[alias_api.AlPerspectiveCamera]
Find and return all AlPerspectiveCameras in the Alias Universe.
- alias_api.get_pick_item_dag_nodes() List[AlDagNode]
Return a list of all dag nodes that are in the pick list.
- alias_api.get_product_information() dict
Return the Alias product information.
- alias_api.get_reference_by_name(name: str) alias_api.AlReferenceFile
Return the AlReferenceFile matching the given name.
- alias_api.get_reference_by_path(path: str) alias_api.AlReferenceFile
Return the AlReferenceFile matching the given file path.
- alias_api.get_reference_by_uuid(uuid: list) alias_api.AlReferenceFile
Return the AlReferenceFile matching the given uuid.
- alias_api.get_references() List[alias_api.AlReferenceFile]
Return all the AlReferenceFiles imported into the current file.
- alias_api.get_shader_by_name(shader_name: str) alias_api.AlShader
Return the Shader found by the given name.
- alias_api.get_shaders() List[alias_api.AlShader]
Return a list of all the shaders in the Alias universe.
- alias_api.get_shaders_by_node(node_name: str) List[alias_api.AlShader]
Return a list of all the shaders assigned to the node corresponding to the given name.
- alias_api.get_stages() List[alias_api.Stage]
Return all the existing stages of the current Alias session.
- alias_api.get_top_dag_nodes() List[alias_api.AlDagNode]
Returns a list of the top level dag nodes in the Alias Universe.
- alias_api.get_variants() List[alias_api.Variant]
Return all the variants of the current file.
- alias_api.has_annotation_locator() bool
Return True if there are any annotation locators in the Alias Universe.
- alias_api.has_history(node: alias_api.AlDagNode) bool
Return True if the dag node has history, else False.
- Parameters
node (AlDagNode) – The dag node to check history.
- Returns
True if the node has history, else False.
- Return type
bool
- alias_api.has_reference() bool
Return True if any AlReferenceFiles found in the current Alias Universe.
- alias_api.has_variants() bool
Check if the current file contains variants.
- alias_api.import_file(arg0: str) None
Import a file into the current file.
- alias_api.import_reference(filename: str) alias_api.AlReferenceFile
Import the file and create an AlReferenceFile object from it.
- alias_api.initialize_universe(up: alias_api.AlCoordinateSystem = <AlCoordinateSystem.???: 1>, init_project_env: int = False) int
Initialize the Alias Universe.
- alias_api.is_copy_of_vred_shader(shader: alias_api.AlShader) bool
Returns True if the shader was created from a VRED shader.
- alias_api.is_empty_file() bool
Deprecated - use ‘is_stage_empty’ instead.
- alias_api.is_stage_empty() bool
Check if the current file is empty or not.
- alias_api.log_message(outputType: AlOutputType, msg: str) None
A function which logs a message to the given output.
- alias_api.log_to_errlog(msg: str) None
A function which logs a message to the Alias error log.
- alias_api.log_to_prompt(msg: str) None
A function which logs a message to the Alias prompt.
- alias_api.log_to_prompt_no_history(msg: str) None
A function which logs a message to the Alias prompt without history.
- alias_api.log_to_stderr(msg: str) None
A function which logs a message to the standard error stream.
- alias_api.log_to_stdout(msg: str) None
A function which logs a message to the standard output stream.
- alias_api.next_construction_entity(entity: alias_api.AlConstructionEntity) alias_api.AlConstructionEntity
Return the next AlConstructionPlane object found, after the given entity, in the Alias Universe.
- alias_api.next_layer(cur_layer: alias_api.AlLayer) alias_api.AlLayer
Return the leaf layer following cur_layer in the graph of Alias AlLayer objects in a pre-order traversal.
Note: This function does not return layer folders (only leaf layers).
None is returned if cur_layer has no next layer.
- alias_api.next_pick_item() int
Set the pick list to reference the next object in the list.
- alias_api.next_shader(cur_shader: alias_api.AlShader) alias_api.AlShader
Return the AlShader following cur_shader in the list of Alias AlShader objects. None is returned if cur_shader has no next shader.
- alias_api.node_first_shader(node: alias_api.AlDagNode) AlShader
Return the first shader used by the given dag node. Return None if no shader is used.
- alias_api.open_file(path: str, new_stage: bool = False, delete_current: bool = False) int
Open a file in Alias.
- alias_api.pick_by_name(name: str) int
Add all objects that match the given string pattern to the pick list.
- alias_api.pop_pick_list() int
Pops the pushed pick list.
- alias_api.prev_pick_item() int
Set the pick list to reference the previous object in the list.
- alias_api.push_pick_list(copy: int) int
Push a new pick list onto the stack.
- alias_api.redraw_screen(redraw_flag: int = 3) int
- alias_api.remove_message_handler(message_type: alias_api.AlMessageType, callback_id: int) int
Remove the specific message handler for the message type and callback.
- alias_api.remove_message_handlers(message_type: alias_api.AlMessageType) int
Remove all message handlers for the message type.
- alias_api.remove_reference(reference_file: alias_api.AlReferenceFile) int
Remove the AlReferenceFile from the Alias Universe.
- alias_api.reset() None
Deprecated - use ‘reset_stages’ instaed.
- alias_api.reset_stages() None
Reset the current session by deleting all the stages. OpenAlias will create default windows.
- alias_api.save_file() int
Save the current file.
- alias_api.save_file_as(path: str) int
Save the current file to the given path.
- alias_api.update_reference(old_path: str, new_path: str) alias_api.AlReferenceFile
Update an AlReferenceFile path with the new path provided.
- alias_api.zero_transform(*args, **kwargs)
Overloaded function.
zero_transform() -> int
Apply zero transform to all dag nodes currently in the pick list.
zero_transform(node_name: str, clear_pick_list: bool = False) -> int
Apply zero transform to all nodes that match the given name.
zero_transform(node: alias_api.AlDagNode) -> int
Apply the zero transform to the given dag node.
zero_transform(nodes: List[alias_api.AlDagNode]) -> int
Apply the zero transform to the given list of dag nodes.
- alias_api.zero_transform_top_level() int
Apply zero transform to all top-level dag nodes in the universe.