Reference
Python bindings to Alias C++ API
- class alias_api.AlAction
Basic interface to Alias actions
AlAction is the base class for an Alias action. An action is an entity that will map time to a value. In Alias, there are two types of actions: parameter curve actions, represented by the derived class AlParamAction, and motion path actions, represented by the derived class AlMotionAction.
You can create new AlActions by creating an AlParamAction or an AlMotionAction. Existing actions can be accessed either through the global list of actions (first_action(), next_action()) or through the list of actions which a channel uses to animate a field of an item (AlChannel.applied_action()). Note that if you delete an action, it may cause other classes to be deleted (for example, AlKeyframe, and AlChannel if the action was the base action of a channel).
- channel_reference(self: alias_api.AlAction, arg0: int) alias_api.AlChannel
This method returns the ‘n’th AlChannel that references this AlAction. If ‘n’ is less than 1, or greater than the number of channels that reference this action (as returned by AlAction::numChannelReferences()), then NULL is returned. The list of channels is not in any particular order.
- Parameters
n (int) – the index between 1 and numChannelReferences() of the channel reference to return.
- Returns
The ‘n’th AlChannel that references this AlAction.
- Return type
- comment(self: alias_api.AlAction) str
This method returns the comment on the action.
- copy(self: alias_api.AlAction) alias_api.AlAction
This method makes a copy of this action and returns the copy. If the copy fails, NULL is returned. Note that this method copies the action NOT the wrapper object.
- eval(self: alias_api.AlAction, time: float, compo: alias_api.AlTripleComponent = <AlTripleComponent.X_Component: 1>) float
This method evaluates this action at the given time, and returns the value of the action at that time. If the action is an AlMotionAction, then you must specify which component of the resulting (x,y,z) value to retrieve using the optional second argument.
If the action is not valid, 0.0 is returned.
Evaluation of an AlParamAction is as follows:
An animation parameter curve is a “Poon-Ross” spline (developed by Angus Poon and Dave Ross). This spline is basically a Hermite-linear spline. That is, it is a Hermite in y (the vertical axis) and a linear in x (the horizontal axis). If we call this spline C(t) = (x(t), y(t)), then we see that it is fairly straightforward to compute for the case when x = T since x(t) = t. So we would get C(t) for x = T is (T, y(T)).
To compute a point on a curve segment C(t) (which is bounded by the cvs (t1, y1), (t2, y2) and has tangents m1 and m2 at the start & end of the segment) at t = T, we first make the mapping
T’ = (T - t1) / (t2 - t1)
so that t is in the range [0, 1]. We then get the y value off of the curve segment using the standard computation
C(T) = [T’^3 T’^2 T’ 1] * H *%@ | y1 |
where H is the hermite basis matrix.
- Parameters
time (float) – the time at which to evaluate the action
compo (AlTripleComponent) – which component to get, for motion actions.
- Returns
The value of the action at the given time.
- Return type
float
- extrap_type_post(self: alias_api.AlAction) alias_api.AlActionExtrapType
This method returns the out-of-range, or extrapolation to infinite type of the action after its defined range. If the type can not be retrieved, kEXTRAP_INVALID is returned.
- Return type
- extrap_type_pre(self: alias_api.AlAction) alias_api.AlActionExtrapType
This method gets the out-of-range, or extrapolation to infinite type of the action before its defined range. If the type could not be retrieved, Invalid is returned.
- Return type
- property name
Get or set the AlAction name.
- num_channel_references(self: alias_api.AlAction) int
This method returns the number of channels that use this action. If 0 is returned, this action is considered non-referenced. Note that if one channel uses this action 2 times, this is counted as 2 references. Also note that if the action is not valid -1 will be returned.
- set_comment(self: alias_api.AlAction, new_comment: str) int
This method makes a copy of ‘newComment’ and replaces the existing comment on the action with this new comment.
- Parameters
new_comment (str) – the new comment to assign to the action
- Returns
The status code result of the operation: Success - action’s comment was changed to newComment InvalidArgument - newComment was NULL InvalidObject - this action is not valid
- Return type
- set_extrap_type_post(self: alias_api.AlAction, extrap_type: alias_api.AlActionExtrapType) int
This method sets the out-of-range, or extrapolation to infinite type of the action after its defined range to the given extrapolation type.
- Parameters
extrap_type (AlActionExtrapType) – extrapolation type to set for action after defined range
- Returns
The status code result of the operation: Success - the extrapolation type was successfully determined InvalidObject - the action was not valid InvalidArgument - the given extrapolation type was not valid.
- Return type
- set_extrap_type_pre(self: alias_api.AlAction, extrap_type: alias_api.AlActionExtrapType) int
This method sets the out-of-range, or extrapolation to infinite type of the action before its defined range to the given extrapolation type.
- Parameters
extrap_type (AlActionExtrapType) – extrapolation type to set for action before defined range
- Returns
The status code result of the operation: Success - the extrapolation type was successfully determined InvalidObject - the action was not valid InvalidArgument - the given extrapolation type was not valid.
- Return type
- type(self: alias_api.AlAction) alias_api.AlObjectType
Returns the class identifier ‘ActionType’.
- class alias_api.AlActionExtrapType
Pre- and Post- extrapolation (infinite) types for actions (These types define the behaviour of the action before and after its defined range).
Members:
Invalid
Constant
Cycle
Oscillate
Linear
Identity
- property name
- class alias_api.AlAngleLocator
Displays the included angle between three locators.
An angle locator is used to find the included angle between any three point locators (AlPointLocator). If any of the three point locators on which this locator depends is deleted, this locator is automatically deleted. This class contains methods to create the locator, query the distance, and set the display attributes of the locator in the Alias windows.
- angle(self: alias_api.AlAngleLocator) Tuple[int, float]
Find the angle of the locator.
- Returns
A tuple containing: (1) the status code result of the operation:
Success - the angle was found InvalidObject - the locator is not valid
The angle of the locator.
- Return type
tuple<AlStatusCode, float>
- copy_wrapper(self: alias_api.AlAngleLocator) alias_api.AlObject
Return an exact duplicate of this AlAngleLocator wrapper.
- create(self: alias_api.AlAngleLocator, start_point: AlPoint, mid_point: AlPoint, end_point: AlPoint, true_display: int = True) int
Creates an Angle locator to measure the included angle between three point locators. The measured angle is between the lines formed by start_point and mid_point, and mid_point and end_point.
- Parameters
- Returns
The status code result of the operation: sSuccess - the angle locator was successfully created sAlreadyCreated - object has already been created sFailure - the angle locator could not be created sInvalidArgument - either one or all the given points are not valid.
- Return type
- end_point(self: alias_api.AlAngleLocator) AlPoint
Returns the ending Point of this Angle locator. However, if the angle locator is not valid, None is returned.
- mid_point(self: alias_api.AlAngleLocator) AlPoint
Returns the middle Point of this Angle locator. However, if the angle locator is not valid, None is returned.
- offset(self: alias_api.AlAngleLocator) Tuple[int, float]
Get the offset of the locator display.
- Parameters
value (float) – The display offset.
- Returns
The status code result of the operation: Success - the offset was found InvalidObject - the object is not valid
- set_offset(self: alias_api.AlAngleLocator, offset: float) int
Set the offset in the locator display.
- Parameters
offset (float) – The value of the offset.
- Returns
The status code result of the operation: Success - the offset was set InvalidObject - the object is not valid
- set_true_display(self: alias_api.AlAngleLocator, value: int) int
Set the display type of this Angle locator. If the angle locator is not valid, None is returned.
- set_world_space_offset(self: alias_api.AlAngleLocator, offset: float) int
Set the offset of the locator in worldspace.
- Parameters
offset (float) – The value of the offset.
- Returns
The status code result of the operation: Success - the offset was set InvalidObject - the object is not valid
- start_point(self: alias_api.AlAngleLocator) AlPoint
Returns the starting Point of this Angle locator. However, if the angle locator is not valid, None is returned.
- true_display(self: alias_api.AlAngleLocator) Tuple[int, int]
Returns 1 if true display is set, else 0.
- type(self: alias_api.AlAngleLocator) alias_api.AlObjectType
Return the AlAngleLocator type identifier.
- world_space_offset(self: alias_api.AlAngleLocator) Tuple[int, float]
Find the offset in the locator in worldspace.
- Returns
A tuple containing: (1) the status code result of the operation:
Success - the offset was found InvalidObject - the object is not valid
the offset of the locator in worldspace.
- Return type
tuple<AlStatusCode, float>
- class alias_api.AlAnimatable
Basic Interface to Alias objects which support animation.
This class encapsulates the functionality of Alias objects which have the capacity to be animated. It provides access to channels.
- apply_iterator_to_channels(self: alias_api.AlAnimatable, iter: AlIterator) Tuple[int, int]
Apply the given iterator to each of the channels in this object. See the documentation for AlIterator.
- Parameters
iter (AlIterator) – The iterator to apply to each channel
- Returns
The status code resulting from the operation. Success - the iterator was successfully applied. InvalidObject - the object was not valid Failure - the application of the iterator failed or the object had no channels. InvalidArgument - the iterator was NULL.
- Return type
- delete_animation(self: alias_api.AlAnimatable) int
This method deletes all the channels that currently animate this object.
- Returns
The status code resulting from the operation. Success - the animation was successfully deleted. InvalidObject - the object was not valid.
- Return type
int(AlStatusCode)
- find_channel(self: alias_api.AlAnimatable, parameter: int) AlChannel
This is a fast way to obtain a particular AlChannel on an object from the parameter of that channel. This method returns the AlChannel which animates the passed in parameter of the given AlAnimatable. If the object is not valid, or the parameter is not currently animated, NULL is returned.
- Parameters
parameter (int) – The parameter of the AlAnimatable corresponding to the desired channel.
- Returns
The channel animating the parameter.
- Return type
- first_channel(self: alias_api.AlAnimatable) AlChannel
Get the first channel animating this object. If this object is not animated, this method will return NULL.
- global_param(self: alias_api.AlAnimatable, param_name: str) Tuple[int, int]
This method returns the parameter control.
- Parameters
param_name (str) – The name of the parameter in question
- Returns
A tuple containg: (1) The status code resulting from the operation
Success - the parameter was read ObjectNotFound - the paramName could not be found InvalidArgument - paramName was NULL InvalidObject - the object was not valid.
The returned state of the parameter
- Return type
tuple<AlStatusCode, bool>
- global_param_list(self: alias_api.AlAnimatable) AlList
This method returns a list of the parameter controls.
- Returns
A list of the parameter control names.
- Return type
- local_param(self: alias_api.AlAnimatable, param_name: str) Tuple[int, int]
This method returns the parameter control. If there are no local params set, then the default local params are returned.
- Parameters
param_name (str) – The name of the parameter in question
- Returns
A tuple containing: (1) The status code resulting from the operation
Success - the parameter was read ObjectNotFound - the paramName could not be found InvalidArgument - paramName was NULL InvalidObject - the object was not valid.
The returned state of the parameter
- Return type
tuple<AlStatusCode, bool>
- local_param_list(self: alias_api.AlAnimatable) AlList
This method returns a list of the parameter control names. The list contains a list of ‘AlParamItem’s.
- Returns
A list of the parameter control names.
- Return type
- next_channel(self: alias_api.AlAnimatable, channel: AlChannel) AlChannel
This method gets the next channel in this object’s list of channels following the given ‘channel’. If ‘channel’ is not part of the object’s channel list, or it is the last channel in the list, then NULL is returned.
- prev_channel(self: alias_api.AlAnimatable, channel: AlChannel) AlChannel
This method gets the previous channel in this object’s list of channels following the given ‘channel’. If ‘channel’ is not part of the object’s channel list, or it is the last channel in the list, then NULL is returned.
- sample_channel(self: alias_api.AlAnimatable, parameter: int) float
This method samples the parameter of the AlAnimatable without actually evaluating it. It reads the current value of the parameter and returns it as a double. Note that the parameter does not need to currently be animated to sample it.
If this method succeeds, it returns the value of the parameter at the current frame. If it fails, 0.0 is returned.
- Parameters
parameter (int) – The parameter of the AlAnimatable to be sampled.
- Returns
The value of the parameter at the current frame.
- Return type
double
- set_global_param(self: alias_api.AlAnimatable, param_name: str) Tuple[int, int]
This method sets the parameter control for objects of this type.
- Parameters
param_name (str) – The name of the parameter in question
- Returns
The status code resulting from the operation Success - the parameter was read ObjectNotFound - the paramName could not be found InvalidArgument - paramName was NULL InvalidObject - the object was not valid.
- Return type
int(AlStatusCode)
- set_local_param(self: alias_api.AlAnimatable, param_name: str) Tuple[int, int]
This method sets the parameter control.
- Parameters
param_name (str) – The name of the parameter in question
- Returns
A tuple containing: (1) The status code resulting from the operation
Success - the parameter was read ObjectNotFound - the paramName could not be found Failure - there were no local params set InvalidArgument - paramName was NULL InvalidObject - the object was not valid.
The state of the parameter
- class alias_api.AlAnnotationLocator
Displays a text string for existing locators
This class creates an annotation to the existing point locators such as a space locator, curve locator, curve on surface locator, and surface locator. An annotation is a line of text and a leader (line with arrow) that is drawn relative to another locator (point type).
To use this locator, create any point locator and attach the annotation string through this locator using the create method. There are also methods to manipulate the position and starting point of the leader line for the annotation.
- copy_wrapper(self: alias_api.AlAnnotationLocator) alias_api.AlObject
Return an exact duplicate of this AlAnnotationLocator wrapper.
- create(self: alias_api.AlAnnotationLocator, start_x: float, start_y: float, start_z: float, string: str, end_x: float, end_y: float, end_z: float) int
Create a new AlAnnotationLocator in the Alias Universe.
- left_justify(self: alias_api.AlAnnotationLocator) Tuple[int, int]
Return the left justify for the annotation locator.
- length(self: alias_api.AlAnnotationLocator) Tuple[int, float]
Return the length for the annotation locator.
- local_leader_position(self: alias_api.AlAnnotationLocator) Tuple[int, float, float, float]
Return the local leader position for the annotation locator.
- offset(self: alias_api.AlAnnotationLocator) Tuple[int, float, float, float]
Return the offset for the annotation locator.
- point(self: alias_api.AlAnnotationLocator) Tuple[int, float, float, float]
Return the point for the annotation locator.
- set_left_justify(self: alias_api.AlAnnotationLocator, left_justify: int) int
Set the left justify for the annotation locator.
- set_length(self: alias_api.AlAnnotationLocator, length: float) int
Set the length for the annotation locator.
- set_local_leader_position(self: alias_api.AlAnnotationLocator, x: float = 0.0, y: float = 0.0, z: float = 0.0) int
Set the local leader position for the annotation locator.
- set_offset(self: alias_api.AlAnnotationLocator, x: float, y: float, z: float) int
Set the offset for the annotation locator.
- set_show_arrow(self: alias_api.AlAnnotationLocator, show: int) int
Set the show arrow for the annotation locator.
- set_world_leader_position(self: alias_api.AlAnnotationLocator, x: float = 0.0, y: float = 0.0, z: float = 0.0) int
Set the world leader position for the annotation locator.
- show_arrow(self: alias_api.AlAnnotationLocator) Tuple[int, int]
Return the show arrow for the annotation locator.
- property string
Return the AlAnnotationLocator type identifier.
- type(self: alias_api.AlAnnotationLocator) alias_api.AlObjectType
Return the AlAnnotationLocator type identifier.
- world_leader_position(self: alias_api.AlAnnotationLocator) Tuple[int, float, float, float]
Return the world leader position for the annotation locator.
- class alias_api.AlArcAttributes
Interface to Alias arc curve attributes.
AlArcAttributes is a class derived from the AlAttributes class. This class allows access to the attributes for an arc.
The attributes which define an arc are its radius, sweep angle, center point, start point, and end point. Coordinates are given in object space, and not world space.
- calculate_start_and_end_andles(self: alias_api.AlArcAttributes, x_axis: std::array<double, 3>, y_axis: std::array<double, 3>, z_axis: std::array<double, 3>) Tuple[int, float, float]
This function will convert the attribute information to start and end angle format. The start and end angles are rotated by the axis into their correct position.
- Parameters
x_axis (List[float[3]]) – the x axis
y_axis (List[float[3]]) – the y axis
z_axis (List[float[3]]) – the z axis
- Returns
a tuple containing: (1) the status code result:
Success - Converting the data succeded InvalidObject - the attribute was invalid Failure - Conversion failed
the start angle
the end angle
- Return type
Tuple[int(AlStatusCode), float, float]
- center_point(self: alias_api.AlArcAttributes) Tuple[int, float, float, float]
Returns the center point for the arc. Note that there is for the arc. Note that there is no “set” method for the center point. The center point is moved by changing the arc’s radius.
- Returns
a tuple containing: (1) the status code result:
Success - the center point was successfully returned. InvalidObject - the attr
the center point x coordinate
the center point y coordinate
the center point z coordinate
- Return type
Tuple[int(AlStatusCode), float, float, float]
- copy_wrapper(self: alias_api.AlArcAttributes) alias_api.AlObject
Return an exact duplicate of this AlArcAttributes wrapper.
- end_point(self: alias_api.AlArcAttributes) Tuple[int, float, float, float]
Returns the point where the arc ends.
- Returns
a tuple containing: (1) the status code result:
Success - the start point was successfully returned. InvalidObject - the attribute was invalid.
the end point x coordinate
the end point y coordinate
the end point z coordinate
- Return type
Tuple[int(AlStatusCode), float, float, float]
- radius(self: alias_api.AlArcAttributes) float
Returns the radius of the arc. Zero is returned if the attribute is not valid.
- set_end_point(self: alias_api.AlArcAttributes, x: float, y: float, z: float) int
This method moves the end point of the arc. Changing the end point changes the size of the sweep, and if the new end point is not on the circle about the arc’s center point, the center point will be moved.
- Parameters
x (float) – end point x coordinate
y (float) – end point y coordinate
z (float) – end point z coordinate
- Returns
the status code result of the operation: Success - Setting the end point succeeded. InvalidObject - the attribute was invalid Failure - Setting the end point failed.
- Return type
int(AlStatusCode)
- set_radius(self: alias_api.AlArcAttributes, arg0: float) int
Change the radius for the arc. This operation will move the center point for the arc.
- Parameters
radius (float) – the radius of the arc
- Returns
the status code result of the operation: Success - Setting the sweep succeeded. InvalidObject - the attribute was invalid Failure - Setting the sweep failed.
- Return type
int(AlStatusCode)
- set_start_point(self: alias_api.AlArcAttributes, x: float, y: float, z: float) int
This method moves the start point of the arc. Changing the start point changes the size of the sweep, and if the new start point is not on the circle about the arc’s center point, the center point will be moved.
- Parameters
x (float) – start point x coordinate
y (float) – start point y coordinate
z (float) – start point z coordinate
- Returns
the status code result of the operation: Success - Setting the start point succeeded. InvalidObject - the attribute was not valid Failure - Setting the start point failed.
- Return type
int(AlStatusCode)
- set_sweep_from_end_point(self: alias_api.AlArcAttributes, arg0: float) int
Change the sweep of the arc from the end point. This operation will move the start point. The sweep is given in degrees.
- Parameters
sweep (float) – the sweep from the end point (in degrees)
- Returns
the status code result of the operation: Success - Setting the sweep succeeded. InvalidObject - the attribute was invalid Failure - Setting the sweep failed.
- Return type
int(AlStatusCode)
- set_sweep_from_start_point(self: alias_api.AlArcAttributes, arg0: float) int
Change the sweep of the arc from the start point. This operation will move the end point. The sweep is given in degrees.
- Parameters
sweep (float) – the sweep from the start point (in degrees)
- Returns
the status code result of the operation: Success - Setting the sweep succeeded. InvalidObject - the attribute was invalid Failure - Setting the sweep failed.
- Return type
int(AlStatusCode)
- start_point(self: alias_api.AlArcAttributes) Tuple[int, float, float, float]
Returns the point where the arc starts.
- Returns
a tuple containing: (1) the status code result:
Success - the start point was successfully returned. InvalidObject - the attribute was invalid.
the start point x coordinate
the start point y coordinate
the start point z coordinate
- Return type
Tuple[int(AlStatusCode), float, float, float]
- sweep(self: alias_api.AlArcAttributes) float
Returns the number of degrees in the arc. Zero is returned if the attribute is not valid.
- type(self: alias_api.AlArcAttributes) alias_api.AlObjectType
Return the AlArcAttributes type identifier.
- class alias_api.AlAttributes
Interface to Alias curve and surface attributes.
AlAttributes is the base class for a set of classes which allow access to curve and surface attributes. It is not possible to create AlAttributes directly, instead they are created when you use the AlCurve::create*() methods.
An attribute is an alternate way to specify an object. For example, in Alias normally a circle would be represented by a NURBS curve which approximates a circle. With attributes instead, a circle is represented by an origin, a radius, etc. Several types of attributes are derived from this class which are used for particular types of objects.
- copy_wrapper(self: alias_api.AlAttributes) alias_api.AlObject
Return an exact duplicate of this AlAttributes wrapper.
- next_attribute(self: alias_api.AlAttributes) alias_api.AlAttributes
Return the next AlAttributes object.
- type(self: alias_api.AlAttributes) alias_api.AlObjectType
Return the AlAttributes type identifier.
- class alias_api.AlCamera
A base class that encapsulates behavior of perspective and orthographic cameras.
This class used to represent all the functionality of Alias perspective cameras. When the AlWindow class was born and it became possible to get and set the window associated with a camera, it became necessary not only to provide an interface to orthographic cameras as well, but also to separate the differences in functionality into two child classes. The AlCamera class remains as a base class, providing access to the behavior that all cameras share. In places where AlCameras were formerly used, it is possible to easily convert old code simply by substituting AlPerspectiveCamera for AlCamera almost everywhere. (A few other small modifications may be necessary).
Any camera can have image planes attached to it. To create an image plane on a camera, use the addImagePlane command.
If a window is associated with this camera (which will always be the case for orthographic cameras, but not so for perspective cameras) the first_window() function will return it.
- copy_wrapper(self: alias_api.AlCamera) alias_api.AlObject
Return an exact duplicate of this AlCamera wrapper.
- delete_object(self: alias_api.AlCamera) int
Delete the AlCamera from the Alias Universe and return the status of the performed operation.
- property name
Get or set the AlCamera name.
- type(self: alias_api.AlCamera) alias_api.AlObjectType
Return the AlCamera type identifier.
- class alias_api.AlCameraNode
Dag node class for cameras.
This class is a dag node class used specifically for cameras. Each AlCamera object has three camera nodes. One for each of eye, view and up positions. (For more information on how AlCamera’s and AlCameraNode’s work together, see the Class Description for the AlCamera object.)
To create a camera node, the user must create a camera, which will automatically create the necessary camera nodes. The user cannot directly instantiate an AlCameraNode.
To figure out which position a camera node represents, the user can use:
the is_eye_node(), is_view_node(), is_up_node() methods, or
2) the type() method to compare types with CameraEyeType, CameraUpType, or CameraViewType.
A camera node can be deleted in two ways. When a camera node is deleted, its associated camera (and other camera nodes) are deleted. When a camera is deleted, its camera nodes are also deleted.
- camera(*args, **kwargs)
Overloaded function.
camera(self: alias_api.AlCameraNode) -> alias_api.AlCamera
Return the attached AlCamera object.
- return
The attached AlCamera object.
- rtype
AlCamera
camera(self: alias_api.AlCameraNode, arg0: alias_api.AlTM) -> alias_api.AlCamera
Return the attached AlCamera object.
The AlTM will be updated with the camera node’s transformation amtrix, if a camera exists.
- param tm
The transform matrix.
- type tm
AlTM
- return
The attached AlCamera object.
- rtype
AlCamera
- copy_wrapper(self: alias_api.AlCameraNode) alias_api.AlObject
Return an exact duplicate of this AlCameraNode wrapper.
- delete_object(self: alias_api.AlCameraNode) int
Delete the AlCameraNode from the Alias Universe and return the status of the performed operation.
- is_eye_node(self: alias_api.AlCameraNode) int
Return True if this camera node represents the eye position of a camera.
- is_instanceable(self: alias_api.AlCameraNode) int
Return False. An AlCameraNode is not an instanceable dag node.
- is_up_node(self: alias_api.AlCameraNode) int
Return True if this camera node represents the up position of a camera.
- is_view_node(self: alias_api.AlCameraNode) int
Return True if this camera node represents the view position of a camera.
- type(self: alias_api.AlCameraNode) alias_api.AlObjectType
Return the AlCameraNode type identifier.
- class alias_api.AlChannel
Basic interface to Alias channels
A channel controls how a field of an animatable item should change over time. It contains one or more actions which are evaluated at a given time and combined to produce an overall value of the channel at that time.
A channel belongs solely to one field or parameter, of an animatable item. A parameter of an item is animated by at most one channel. Thus, the create() methods will fail if an attempt is made to create a channel of a field that already has a channel (i.e. is already animated). Under similar conditions, the copy() method will fail.
Currently a channel must contain at least one action (the base action of the channel), and thus the create() method requires you to supply this base action. You can modify this base action using the link() method. The apply_warp() and remove_warp() methods modify the timewarp actions applied to the base action of the channel. They cannot affect the base action of the channel.
The num_applied_actions() method will tell you how many actions are currently used by channel. This number will always be at least 1, since a channel must be animated by at least a base action. The applied_actions() will tell you which actions animate the channel. applied_actions(1) is the base action, and applied_actions(2 to n) are the timewarp actions, where n is num_applied_actions().
- animated_item(self: alias_api.AlChannel) alias_api.AlObject
This method returns the item that is being animated by this AlChannel. The item can be any of the possible animatable items, namely: AlDagNode, AlCurveCV, AlSurfaceCV, AlCamera, AlLight, AlShader, AlTexture or AlEnvironment.
- applied_action(self: alias_api.AlChannel, n: int) AlAction
This method returns the ‘n’th action that is applied to this channel. For example, if this channel is animated by action A as a base action, and then three timewarps, T, A and T (note the reuse of the same actions), then appliedAction(1) and appliedAction(3) will return action A, and appliedAction(2) and appliedAction(4) will return action T.
If ‘n’ is less than 1, or greater than the number of actions used by this channel (as returned by AlChannel::numAppliedActions()), then NULL will be returned.
- Parameters
n (int) – which action of the channel to return, where 1 refers to the base action of the channel, and 2 to numAppliedActions() refers to the channel’s timewarp actions.
- Returns
The ‘n’th action of the channel.
- Return type
- applied_action_component(self: alias_api.AlChannel, n: int) alias_api.AlTripleComponent
This method returns the extract component that the channel applies to the ‘n’th action. This method only makes sense if the n’th action of the channel is an AlMotionAction. If the action is an AlParamAction, or the channel does not have a ‘n’ action, then kINVALID_COMPONENT is returned.
For example, if the channel is animated by the following actions,
AlMotionAction: A, kY_COMPONENT AlParamAction: T1 AlParamAction: T2
then this method will return kY_COMPONENT if ‘n’ is 1, kINVALID_COMPONENT if ‘n’ is 2 or 3 (since these actions are AlParamActions, and this method doesn’t make sense for those values of ‘n’), and kINVALID_COMPONENT if ‘n’ is less than 1, or greater than numAppliedActions().
- Parameters
n (int) – which action of the channel the extract component should be determined for.
- Returns
The extract component of the ‘n’th action of the channel.
- Return type
- apply_warp(self: alias_api.AlChannel) int
This method creates a new action and applies it as a timewarp to this channel. The new action will be an AlParamAction, and will have two keyframes, one at each of the min and max time of the range of animation of the channel. The timewarp will be initially created to have no effect on the channel (i.e. y = x, with kEXTRAP_IDENTITY extrapolation types).
- Returns
The status code result of the operation Success - the application of the warp was successful. InvalidObject - the channel was not valid Failure - applying the warp failed. InsufficientMemory - the new warp was not created.
- Return type
- apply_warp_o(self: alias_api.AlChannel) AlParamAction
This method creates a new action and applies it as a timewarp to this channel. The new action will be an AlParamAction, and will have two keyframes, one at each of the min and max time of the range of animation of the channel. The timewarp will be initially created to have no effect on the channel (i.e. y = x, with kEXTRAP_IDENTITY extrapolation types). The newly created action will be returned.
- channel_type(self: alias_api.AlChannel) alias_api.AlChannelDataType
This method returns a the type of channel (kAnimChannel or kExprChannel). kUnknownChannel is returned if there is an error.
- copy(self: alias_api.AlChannel, anima: alias_api.AlAnimatable, field: int) alias_api.AlChannel
This method copies this channel, and applies the copied channel to animating the given field of the given object. If the given object is already animated by that field, this method will fail.
When the channel is copied, each action in the original channel will be reused by the copy of the channel. This means that each of the actions will now be referenced by at least two channels.
The new copy of the channel will be returned. If any error occurred (for example object is already animated by the given field, or animating this object would animate a motion path) then NULL will be returned.
- Parameters
anima (AlAnimatable) – the item to receive the new copy of the channel
field (int) – the field of the dag node that will be animated by the new copy of the channel
- Returns
The copied channel
- Return type
- copy_wrapper(self: alias_api.AlChannel) alias_api.AlObject
This method makes a copy of the AlChannel. The returned AlChannel will reference the same data as the original.
- Returns
The copied AlChannel
- Return type
- create(*args, **kwargs)
Overloaded function.
create(self: alias_api.AlChannel, arg0: alias_api.AlAnimatable, arg1: int, arg2: AlAction, arg3: alias_api.AlTripleComponent) -> int
This method creates a new channel that will animate the given field of the given object. The channel will be animated using the given action as a base action. If the field of the object is already animated (i.e. already has a channel), then this method will fail, and a new channel will not be created. The channel will also not be created if there is a motion path curve somewhere below this dag node.
- param anima
object that will be animated
- type anima
AlAnimatable
- param field
Field of animtable object to animate
- type field
int
- param action
Base action which the channel should use
- type action
AlAction
- param component
If the action is an AlMotionAction, this specifies which component of the evaluation of the curve should be used when evaluating the channel; if the action is not an AlMotionAction, this argument is ignored.
- type component
AlTripleComponent
- return
The status code result of the operation Success - channel was successfully created InvalidArgument - either ‘dag_node’ or ‘action’ was NULL. InvalidObject - channel was not created AlreadyCreated - channel is already created
- rtype
AlStatusCode
create(self: alias_api.AlChannel, anima: alias_api.AlAnimatable, field: int, sz_expr_text: str) -> int
This method creates a new channel that will attach an expression to the given field of the given object. If the field of the object is already animated or has an expression attached to it (i.e. already has a channel), then this method will fail, and a new channel will not be created.
Note: This method sends out an update message in order to have the expression evaluated properly. As a result, creating a lot of expressions could be a slow process.
- param anima
object that will be animated
- type anima
AlAnimatable
- param field
field of dag node to attach the expression
- type field
AlAction
- parm sz_expr_text
expression to be attached to the field
- type sz_expr_text
AlTripleComponent
- return
The status code result of the operation: Success - channel was successfully created sInvalidArgument - either ‘szExprText’ or ‘anima’ was NULL. InvalidObject - channel was not created AlreadyCreated - channel is already created Expr{Errors} - errors from parsing the expression (see statusCodes.h)
- rype
AlStatusCode
- delete_object(self: alias_api.AlChannel) int
This method deletes a channel. The actions that are used by the channel will not be deleted.
- Returns
The status code result of the operation Success - the data for the AlChannel was successfully deleted InvalidObject - the channel was not valid
- Return type
- eval(self: alias_api.AlChannel, time: float) float
This method evaluates this channel at the given time, and returns the value of the channel at that time. If the call can not be completed, 0.0 is returned.
- Parameters
time (float) – the time at which to evaluate the channel
- expression_string(self: alias_api.AlChannel) str
If this channel is represented by an expression, this method returns a string representing the expression.
- link(self: alias_api.AlChannel, action: AlAction, component: alias_api.AlTripleComponent) int
This method replaces the base action of this channel with the given action.
For example, if this channel is currently animated by action A, then this method will remove action A from the channel, and replace it by the given action ‘action’. This channel will now only be animated by ‘action’.
If this channel is currently animated by three actions, a base action A, and two timewarp actions T1 and T2, then this method will replace the base action A with the given ‘action’ so that the channel will now be animated by the base action ‘action’ and the two timewarp actions T1 and T2.
- Parameters
action (AlAction) – the action with which the channel should replace its current base action
component (AlTripleComponent) – if the action is an AlMotionAction, this specifies which component of the evaluation of the motion action curve should be used when evaluating the channel; if the action is not an AlMotionAction, this argument is ignored.
- Returns
The status code result of the operation Success - the link was successfully completed. InvalidObject - the channel was not valid Failure - an error occurred InvalidArgument - the action was invalid
- Return type
- num_applied_actions(self: alias_api.AlChannel) int
This method returns the number of actions that this channel references and uses for its evaluation. The return value will always be >= 1 (except in the case of failure in which the return value is 0), since the channel must be animated by at least one base action.
For example, if this channel is animated using base action A, and two timewarp actions, T1 and T2, then this method will return 3.
- parameter(self: alias_api.AlChannel) int
This method returns the field of the item that is being animated by this channel. The return value is cast from whatever enum type corresponds to the animatable item, to an integer.
For example: If this channel is animating an AlDagNode, then this method will return an AlDagNodeFields cast to an integer. If this channel is animating an AlCamera, then this method will return an AlCameraFields cast to an integer. If this channel is animating an AlShader, AlTexture or an AlEnvironment, then this method will return an AlShadingFields cast to an integer.
If the call could not be completed, -1 is returned.
- parameter_name(self: alias_api.AlChannel) str
This method returns a string that is a lexical name for the parameter/field which this channel animates.
- remove_warp(self: alias_api.AlChannel, action: AlAction) int
This method removes the given ‘action’ from the channel as a timewarp. For example, if the channel is currently animated by action A, followed by ‘action’ as a first timewarp, and action T as a second timewarp, then after this method has been invoked, the channel will be animated by action A followed by action T.
If this channel is currently animated by action ‘action’ as a base action, followed by four timewarps in the following order: T1, ‘action’, ‘action’, T2.
After this method has been invoked, the channel will be animated by action ‘action’ as a base action, and three timewarps as follows: T1, ‘action’, T2.
Note that the base action cannot be removed from the channel by using this method. Removing the base action (for example, by deleting the action), will also cause the channel to be deleted. :param action: the action to be removed from the channel’s list of timewarps. :type action: AlAction
- Returns
The status code result of the operation: Success - the ‘action’ was successfully removed from the channel’s timewarp actions. InvalidArgument - ‘action’ was invalid InvalidObject - the channel was not valid Failure - the ‘action’ was not being used as a timewarp by this channel
- Return type
- sample(self: alias_api.AlChannel) float
This method samples the channel without actually evaluating it. The value of the current parameter is read without any updates being done. The channel is sampled at the current time. This method is faster than eval(), and is useful in cases where eval() has already been called, either explicitly or through a viewFrame operation.
If this method succeeds, it returns the value of the channel at the current frame. If it fails, 0.0 is returned.
- type(self: alias_api.AlChannel) alias_api.AlObjectType
Returns the class identifier ‘ChannelType’.
- class alias_api.AlChannelDataType
The type of channel.
Members:
UnknownChannel
AnimChannel
ExprChannel
- property name
- class alias_api.AlCloud
Interface to Alias clouds.
AlCloud is the interface to clouds and their data in Alias. This class allows a developer to perform operations such as creating, naming, controlling visibility, setting transformations, picking, merging, tesselating and subsetting a cloud of points. In addition, points can be added to a cloud that was created with the API. Data access methods to most of the settings are also provided. For example you can find the current translation, scale or pick state etc.
The number of points in a cloud and the actual points can be retrieved with the class. Please see the points() routine for a description of the data structure used to retrieve points. The same data structure is used in the add_points() method.
Importing a cloud of points is performed by the method AlUniverse::importCloudFile(). Walking the cloud list is performed with AlUniverse.first_cloud() in conjunction with AlCloud:next_cloud(). Also apply_iterator_to_clouds() can be used to walk all cloud elements.
Notes:
1. Tesselation of clouds will only work with CyberWare files. As a result, clouds created with the API cannot be tesselated.
Clouds are not in the Alias dag tree.
3. A cloud will not be an item on the Alias pick list. Therefore, AlCloud pick methods must be used instead of AlPickList methods.
4. To add arbitrary points to a cloud, you must create a cloud with the new points and merge it into the existing cloud that you wish to grow. The cloud that is merged in will be delete automatically in the merge process. The new extended cloud will have the outer bounding box of the two clouds.
5. import_cloud_file() has a parameter which controls the sampling factor when the cloud file is imported.
- copy_wrapper(self: alias_api.AlCloud) alias_api.AlObject
Return an exact duplicate of this AlCloud wrapper.
- delete_object(self: alias_api.AlCloud) int
Delete the AlCloud from the Alias Universe and return the status of the performed operation.
- property name
Get or set the AlCloud name.
- type(self: alias_api.AlCloud) alias_api.AlObjectType
Return the AlCloud type identifier.
- class alias_api.AlCluster
Encapsulates creation, deletion and manipulation of clusters.
This class encapsulates the functionality for creating, manipulating and deleting a cluster. A cluster is a group of dag nodes and/or curve and surface control points, which are grouped as such for deformation purposes. Every cluster has a cluster dag node which is in the universe’s dag. Adding and removing nodes and control points to and from a cluster does not affect the topology of the universe’s dag. Transforming the cluster dag node affects the transformations of the objects in the cluster.
Empty clusters are allowed. An object can be in more than one cluster at a time, provided that those clusters are of type kMultiCluster. When an object is added to a cluster, it is given a weight that indicates how much of the cluster’s leaf transformation is applied to the object. The default weight is 100%. If a dag node is added to a cluster the percentages of each individual CV may be manipulated separately without actually adding the CVs themselves to the cluster.
To create a cluster, the user must instantiate and call create on an AlCluster object. This also creates an AlClusterNode which gets attached to the AlCluster and which is inserted into the universe’s dag. The user may not instantiate an AlClusterNode or an AlClusterMember directly.
There are two ways to delete a cluster object. When a cluster is deleted, its attached cluster node is deleted. Alternatively, when AlClusterNode.delete_object() is used, its cluster is deleted. The dag nodes and control points in a cluster are not deleted, however the AlClusterMember objects that represented the “in a cluster” relation are invalidated.
Clusters don’t have names. Any attempts to query for a name will return None.
- apply_iterator_to_members(self: alias_api.AlCluster, iterator: AlIterator, return_code: int) int
Apply the given iterator to each member o this cluster.
- cluster_node(self: alias_api.AlCluster) AlClusterNode
Return a pointer to the attached (parent) cluster node. The cluster node must exist.
- copy_wrapper(self: alias_api.AlCluster) alias_api.AlObject
Return an exact duplicate of this AlCluster wrapper.
- create(self: alias_api.AlCluster) int
Create a cluster and a cluster dag node. The cluster dag node is automatically added to the current universe.
- delete_object(self: alias_api.AlCluster) int
Delete the AlCluster from the Alias Universe and return the status of the performed operation.
- is_empty(self: alias_api.AlCluster) int
Return True if this cluster is empty (does not have any memebrs).
- next_cluster(self: alias_api.AlCluster) alias_api.AlCluster
Return a pointer to the cluster following this onei n the global cluster list.
- number_of_members(self: alias_api.AlCluster) int
Return the number of members in this cluster.
- prev_cluster(self: alias_api.AlCluster) alias_api.AlCluster
Return a pointer to the cluster preceding this onei n the global cluster list.
- type(self: alias_api.AlCluster) alias_api.AlObjectType
Return the AlCluster type identifier.
- class alias_api.AlClusterMember
Basic Interface to the object representing the relationship between an item and a cluster that it belongs to.
This class encapsulates the relationship that is cluster membership. Whenever an object is placed into a cluster an AlClusterMember object is created to represent the relationship.
Each AlClusterMember object knows the associated cluster object as well as the geometry object which represents the item in the cluster. Presently, this object can be an AlDagNode, AlSurfaceCV, AlCurveCV, or AlPolysetVertex.
If an AlDagNode is a member of an AlCluster then every AlSurfaceCV, AlCurveCV, or AlPolysetVertex that appears in the DAG hierarchy underneath the AlDagNode is affected by the AlCluster.
For example, if you wanted to set the percentage effects of all CVs that were affected by an AlCluster, you would use the first_member() method from the AlCluster object, then walk along the AlClusterMember list using the method next_cluster_member() in the AlClusterMember object. Whenever you encountered an AlDagNode member (as determined by the code fragment above) you would recursively walk down the dag node to find all AlSurfaceCVs and AlCurveCVs below it in the dag.
The AlClusterMember object may not be created or destroyed directly. The AlCluster object creates or destroys the AlClusterMember object when the memberships of the AlCluster object change.
The print() method is an aid to debugging code. It prints the current contents of the cluster member object.
- cluster(self: alias_api.AlClusterMember) alias_api.AlCluster
This method returns the cluster that this cluster member belongs to.
- copy_wrapper(self: alias_api.AlClusterMember) alias_api.AlObject
Return an exact duplicate of this AlClusterMember wrapper.
- next_cluster_member(self: alias_api.AlClusterMember) alias_api.AlClusterMember
This function returns a pointer to the cluster member following this one in the cluster. If this is the last one then NULL is returned.
- next_cluster_member_d(self: alias_api.AlClusterMember) int
Destructively points the current wrapper to the cluster member following this one in the cluster.
- Returns
The status code result of the operation Success - the wrapper now points to the next cluster member InvalidObject - the cluster member was invalid Failure - there was no next cluster member
- Return type
- object(self: alias_api.AlClusterMember) alias_api.AlObject
This method returns the object that this cluster member references.
- prev_cluster_member(self: alias_api.AlClusterMember) alias_api.AlClusterMember
This function returns a pointer to the cluster member preceding this one in the cluster. If this is the first one then NULL is returned.
- prev_cluster_member_d(self: alias_api.AlClusterMember) int
Destructively points the current wrapper to the cluster member preceding this one in the cluster.
- Returns
The status code result of the operation Success - the wrapper now points to the preceding cluster member InvalidObject - the cluster member was invalid Failure - there was no preceding cluster member
- Return type
- remove_from_cluster(self: alias_api.AlClusterMember, cluster: alias_api.AlCluster) int
Removes this cluster member from the cluster.
- Parameters
cluster (AlCluster) – Is the cluster to be removed from
- Returns
The status code result of the operation Success - if everything successful InvalidObject - if cluster is not valid InvalidArgument - clusterMember was not valid
- Return type
- type(self: alias_api.AlClusterMember) alias_api.AlObjectType
Return the AlClusterMember type identifier.
- class alias_api.AlClusterNode
The dag node class for clusters.
This class is a dag node class used specifically for clusters. Every AlClusterNode object has an AlCluster attached to it. (For more information on how AlCluster’s and AlClusterNode’s work together, see the Class Description for the AlCluster object.)
To create a cluster node, the user must instantiate and call the create method on an AlCluster object, which will automatically create an AlClusterNode. The user cannot directly instantiate an AlClusterNode.
A cluster node can be deleted in two ways. When a cluster node is deleted, its associated cluster is deleted. When a
cluster is deleted, its cluster node is also deleted.
- cluster(*args, **kwargs)
Overloaded function.
cluster(self: alias_api.AlClusterNode) -> alias_api.AlCluster
Return a pointer to the attached AlCluster object.
cluster(self: alias_api.AlClusterNode, arg0: alias_api.AlTM) -> alias_api.AlCluster
Return the attached AlCluster object.
The AlTM will be updated with the cluster node’s transformation amtrix, if a cluster exists.
- param tm
The transform matrix.
- type tm
AlTM
- return
The attached AlCluster object.
- rtype
AlCluster
- copy_wrapper(self: alias_api.AlClusterNode) alias_api.AlObject
Return an exact duplicate of this AlClusterNode wrapper.
- is_instanceable(self: alias_api.AlClusterNode) int
Return False. An AlClusterNode is not instanceable.
- type(self: alias_api.AlClusterNode) alias_api.AlObjectType
Return the AlClusterNode type identifier.
- class alias_api.AlClusterable
Encapsulates methods common to Alias objects which can belong to clusters.
This class is a base class for all objects which can be contained in a cluster. It provides the methods necessary to access the cluster methods of these objects.
- add_to_cluster(self: alias_api.AlClusterable, cluster: AlCluster, percentage: float) int
Adds this clusterable object to a cluster. This means that all CV’s under this dag are affected by the cluster. The percentage defines how much of the cluster’s transformation is applied to the CVs under the dag node. A value of 1.0 means that the object’s CVs are affected 100% by the cluster leaf transformations.
The method may fail if unable to create a cluster member object, or if the addition of the object would create a cycle of clusters, or if the object to be added is already in the cluster, or if the object to be added already has an ancestor in the same target cluster.
- Parameters
cluster (AlCluster) – is the cluster to add this object to
percentage (float) – The extent of the effect of the cluster on the object’s CVs. A value of 1.0 means 100%.
- Returns
The status code result of the operation Success - if everything was successful InvalidArgument - cluster was None. Failure - failed for one of the reasons outlined above InvalidObject - the cluster was invalid InsufficientMemory - if not enough memory
- Return type
- apply_iterator_to_clusters(self: alias_api.AlClusterable, iter: AlIterator) Tuple[int, int]
Apply the given iterator to all the clusters in this object. See the documentation for AlIterator.
Warning: be careful when using this iterator. If you modify the actual cluster during an iteration, it is possible that this routine will end up pointing to invalid data and send you garbage. This should not happen when simply applying transformations to a cluster. But deleting a cluster using this method is considered unsafe. If you do it, return immediately.
- Parameters
iter (AlIterator) – the iterator to apply to each cluster
- Returns
A tuple containing: (1) The status code result of the operation
Success - the application of the iterator terminated normally Failure - the application of the iterator terminated abnormally InvalidArgument - the iterator was None.
The return code of the last application of the iterator.
- Rype
AlStatusCode
- first_cluster(self: alias_api.AlClusterable) AlCluster
Finds and returns the first cluster of which this object is a member. If no such cluster can be found, None is returned.
- is_cluster_member(self: alias_api.AlClusterable, cluster: AlCluster) AlClusterMember
Finds the AlClusterMember that corresponds to the relationship between this object and the cluster object. None is returned if the object is not a member of the cluster or the cluster is not valid.
- Parameters
cluster (AlCluster) – Is the cluster object to be checked.
- Returns
The cluster member object that corresponds to the relationship between this object and the cluster object.
- Return type
- next_cluster(self: alias_api.AlClusterable, last_custer: AlCluster) AlCluster
Finds and returns the cluster following the given one of which this object is a member. If no such cluster can be found, None is returned.
- next_cluster_d(self: alias_api.AlClusterable, last_custer: AlCluster) int
Destructively sets the passed in cluster to the next cluster for the given object. If this can not be accomplished, the passed in cluster is unaffected.
- Parameters
last_cluster (AlCluster) – Cluster to walk forward from
- Returns
The status code result of the operation Success - the cluster now points to the next cluster InvalidArgument - ‘lastCluster’ was invalid or None Failure - there was no next cluster
- Return type
- percent_effect(self: alias_api.AlClusterable, cluster: AlCluster) float
Returns the percentage effect the given cluster has on this object. If the call fails, 0.0 is returned.
- Parameters
cluster (AlCluster) – Is the cluster whose percentage effect is to be found
- Returns
The percentage effect of the cluster on this object
- Return type
float
- prev_cluster(self: alias_api.AlClusterable, last_custer: AlCluster) AlCluster
Finds and returns the cluster preceding the given one of which this object is a member. If no such cluster can be found, None is returned.
- prev_cluster_d(self: alias_api.AlClusterable, last_custer: AlCluster) int
Finds and returns the cluster preceeding the given one of which this object is a member. If no such cluster can be found, None is returned.
- Parameters
last_cluster (AlCluster) – Cluster to walk forward from
- Returns
The status code result of the operation Success - the cluster now points to the previous cluster InvalidArgument - ‘lastCluster’ was invalid or None Failure - there was no previous cluster
- Return type
- remove_from_all_clusters(self: alias_api.AlClusterable) int
Removes this object from all clusters in the universe that it may be in.
- Returns
The status code result of the operation Success - the object was successfully removed from all clusters. InvalidArgument - the object was not valid.
- Return type
- remove_from_cluster(self: alias_api.AlClusterable, cluster: AlCluster) int
Removes this object from the cluster.
- Parameters
cluster (AlCluster) – The cluster to remove this object from.
- Returns
The status code result of the operation Success - if everything successful InvalidObject - if the cluster is not valid InvalidArgument - clustobj was not valid
- Return type
- set_percent_effect(self: alias_api.AlClusterable, cluster: AlCluster, percentage: float) int
Sets the percentage effect the given cluster has on all things below this object.
- Parameters
cluster (AlCluster) – is the cluster whose percentage effect is to be set
percentage (float) – the extent of the effect of the cluster
- Returns
The status code result of the operation Success - if everything successful InvalidArgument - ‘clustobj’ was None. Failure - if the percentage effect setting failed InvalidObject - the cluster was not valid
- class alias_api.AlConicAttributes
Interface to Alias conic curve attributes.
AlConicAttributes is a class derived from the AlAttributes class. This class allows access to the attributes for a conic section.
Conics may not be created. They may be brought into Alias through the IGES interface though.
A conic is one of ellipse, hyperbola, parabola, circle, or line. Conics exist in the XY plane and are defined by the equation: A * X^2 + B * X * Y + C * Y^2 + D * X + E * Y + F = 0.
- center_point(self: alias_api.AlConicAttributes) Tuple[int, float, float]
Returns the center point for a conic.
- Returns
a tuple containing: (1) the status code result:
Success - the center point was successfully returned. InvalidObject - the attr
the center point x coordinate
the center point y coordinate
- Return type
Tuple[int(AlStatusCode), float, float]
- coefficients(self: alias_api.AlConicAttributes) Tuple[int, float, float, float, float, float, float]
Determine the coefficients for the Conic, where the Conic is defined by the equation
A * X^2 + B * X * Y + C * Y^2 + D * X + E * Y + F = 0
- Returns
A tuple containg: (1) the status code result:
Success - coefficients were successfully returned. InvalidObject - the attribute was invalid Failure - an error occurred
c_a - the coefficient A
c_b - the coefficient B
c_c - the coefficient C
c_d - the coefficient D
c_e - the coefficient E
c_f - the coefficient F
- Return type
Tuple[int(AlStatusCode), float, float, float, float, float, float]
- copy_wrapper(self: alias_api.AlConicAttributes) alias_api.AlObject
This method makes a copy of the AlConicAttributes. The returned AlConicAttributes will reference the same data as the original.
- end_point(self: alias_api.AlConicAttributes) Tuple[int, float, float]
This method determines the end point for a conic. Note that for an ellipse the direction of the desired elliptical arc is counterclockwise.
- Returns
a tuple containing: (1) the status code result:
Success - the start point was successfully returned. InvalidObject - the attribute was invalid. Failure - an eror occured
the end point x coordinate
the end point y coordinate
- Return type
Tuple[int(AlStatusCode), float, float]
- form(self: alias_api.AlConicAttributes) alias_api.AlConicType
Returns the type of the conic (AlConicType).
One of Ellipse, Hyperbola, Parabola, Circle, or Line may be returned. NoConic may be returned if the attribute is no longer active or there is an error.
- start_point(self: alias_api.AlConicAttributes) Tuple[int, float, float]
This method determines the start point for a conic. Note that for an ellipse the direction of the desired elliptical arc is counterclockwise.
- Returns
a tuple containing: (1) the status code result:
Success - the start point was successfully returned. InvalidObject - the attribute was invalid. Failure - an eror occured
the start point x coordinate
the start point y coordinate
- Return type
Tuple[int(AlStatusCode), float, float]
- transform(self: alias_api.AlConicAttributes) Tuple[int, alias_api.AlTM]
This method returns the transformation matrix which transforms the 2D conic into 3D.
- Returns
a tuple containing: (1) the status code result:
Success - the transform was successfully returned. InvalidObject - the attribute was invalid. Failure - an eror occured
the resulting transformation matrix
- Return type
Tuple[int(AlStatusCode), AlTM]
- type(self: alias_api.AlConicAttributes) alias_api.AlObjectType
Returns the class identifier ‘ConicAttributeType’.
- z_displacement(self: alias_api.AlConicAttributes) float
This method returns the displacement for the conic along the Z axis.
- class alias_api.AlConicType
The type of conic curve.
Members:
NoConic
Ellipse
Hyperbola
Parabola
Circle
Line
- property name
- class alias_api.AlConstructionEntity
Base class for Alias construction entities.
This base class encapsulates methods common to Alias construction entities. These entities include space points, curve points, surface points, curve on surface points, construction planes and construction vectors. Construction points have similiarities to locator objects. A major difference between construction points and locators is that construction points will be on the Alias pick list. The AlPickList class can be used to retrieve picked construction entity objects. As you will see below, the AlConstructionEntity class multiply inherits from the AlPickable class.
This class contains methods for deleting, and naming locators. In addition, methods are available for working with layers and for changing invisibility and templated modes.
As in the locator objects, if a construction entity is dependent on an object that is deleted, it will also be removed.
The construction entity hierarchy is the following:
- AlConstructionEntity
| |- AlPoint AlConstructionVector AlConstructionPlane
| | |Space Curve Surface Curve On Surface
The AlPoint class cannot be instantiated.
- copy_wrapper(self: alias_api.AlConstructionEntity) alias_api.AlObject
Return an exact duplicate of this AlConstructionEntity wrapper.
- delete_object(self: alias_api.AlConstructionEntity) int
Delete the AlConstructionEntity from the Alias Universe and return the status of the performed operation.
- property invisible
Get or set the AlConstructionEntity invisibility.
- property layer
Get or set the AlConstructionEntity layer.
- property name
Get or set the AlConstructionEntity name.
- templated(self: alias_api.AlConstructionEntity) int
On successfully checking the entity, return 1 if the AlConstructionEntity depends on anoather object which is templated, else return 0. On failure to check, return -1.
- type(self: alias_api.AlConstructionEntity) alias_api.AlObjectType
Return the AlConstructionEntity type identifier.
- class alias_api.AlConstructionPlane
Interface to Alias construction planes.
This class provides functionality for creating, manipulating and querying Alias construction planes. Construction planes can be specified several ways.
3 Points - The first 2 points specify the X axis. The first and last points specifiy a line that is used in the cross product with the x axis to provide the Z axis. Once the Z is known, the Y axis is calculated internally.
2 points and a normal - The first 2 points specify the X axis. The normal is the Z axis to the plane.
This class provides access to the points used to create the construction plane( end may be NULL depending on the specification), transformation and axes information.
- copy_wrapper(self: alias_api.AlConstructionPlane) alias_api.AlObject
Return an exact duplicate of this AlConstructionPlane wrapper.
- create(*args, **kwargs)
Overloaded function.
create(self: alias_api.AlConstructionPlane, first: AlPoint, second: AlPoint, third: AlPoint) -> int
Create a construction plane specified by 3 points. The first 2 points specific the X axis. The first and last point specify a line that is used in the cross product with the X axis to calculate the Z axis.
- return
The status code result of the operation: Success - the construction plane was created Failure - the method failed InvalidArgument - first, second, or third are either NULL
or invalid or at least 2 point to the same Alias object
AlreadyCreated - object is already created
- rtype
AlStatusCode
create(self: alias_api.AlConstructionPlane, first: AlPoint, second: AlPoint, normal_x: float, normal_y: float, normal_z: float) -> int
- return
The status code result of the operation: Success - the construction plane was created Failure - the method failed InvalidArgument - first, second, or third are either NULL
or invalid or at least 2 point to the same Alias object
AlreadyCreated - object is already created
- rtype
AlStatusCode
create(self: alias_api.AlConstructionPlane, first_x: float, first_y: float, first_z: float, second_x: float, second_y: float, second_z: float, normal_x: float, normal_y: float, normal_z: float) -> int
- return
The status code result of the operation: Success - the construction plane was created Failure - the method failed InvalidArgument - first, second, or third are either NULL
or invalid or at least 2 point to the same Alias object
AlreadyCreated - object is already created
- rtype
AlStatusCode
- first(self: alias_api.AlConstructionPlane) AlPoint
Returns the first point of the construction plane.
None is returned if the method failed.
- second(self: alias_api.AlConstructionPlane) AlPoint
Returns the second point of the construction plane.
None is returned if the method failed.
- third(self: alias_api.AlConstructionPlane) AlPoint
Returns the third point of the construction plane.
None is returned if the method failed.
- type(self: alias_api.AlConstructionPlane) alias_api.AlObjectType
Return the AlConstructionPlane type identifier.
- class alias_api.AlCopyOptions
Copy options for AlDagNode.
- copy_animation(self: alias_api.AlCopyOptions) int
Return True if copying of an AlDagNode’s animation is enabled.
- copy_clusters(self: alias_api.AlCopyOptions) int
Return True if the new copies of clusters should be made of clusters which reference geometry below the AlDagNode.
- instance_copy(self: alias_api.AlCopyOptions) int
Return True if the copies are to be instances of the AlDagNode rather than new objects.
- num_copies(self: alias_api.AlCopyOptions) int
Return the number of copies to be created. Zero will be returned if the AlCopyOptions object was not properly created.
- rotation(self: alias_api.AlCopyOptions) Tuple[int, float, float, float]
Return the rotation which will be applied to copies of the AlDagNode.
- scale(self: alias_api.AlCopyOptions) Tuple[int, float, float, float]
Return the scale which will be applied to copies of the AlDagNode.
- set_copy_animation(self: alias_api.AlCopyOptions, animation: int) int
If ‘animation’ is True, animation on the AlDagNode will be copied.
- set_copy_clusters(self: alias_api.AlCopyOptions, clusters: int) int
If ‘clusters’ is True, new copies of clusters will be created for clusters which reference geometry below the AlDagNode.
- set_instance_copy(self: alias_api.AlCopyOptions, instance: int) int
If ‘instance’ is True, instances of the AlDagNode will be created rather than new objects.
- set_num_copies(self: alias_api.AlCopyOptions, arg0: int) int
Sets the number of copies to create.
- set_rotation(self: alias_api.AlCopyOptions, x: float, y: float, z: float) int
Set the rotation which will be applied to copies of the AlDagNode.
- set_scale(self: alias_api.AlCopyOptions, x: float, y: float, z: float) int
Set the scale which will be applied to copies of the AlDagNode.
- set_time_offset(self: alias_api.AlCopyOptions, arg0: float) int
Sets the time offset for copies when copying animation.
- set_translation(self: alias_api.AlCopyOptions, x: float, y: float, z: float) int
Set the translation which will be applied to copies of the AlDagNode.
- time_offset(self: alias_api.AlCopyOptions) float
Return the time offset for the copies if animation is being copied.
- translation(self: alias_api.AlCopyOptions) Tuple[int, float, float, float]
Return the translation which will be applied to copies of the AlDagNode.
- class alias_api.AlCurve
Interface to Alias nurbs curves geometry.
AlCurve is the interface to the geometric data of Alias’ NURBS curve objects. To create a curve, first instantiate and create an AlCurve and then instantiate and create an AlCurveNode. You can’t do much with an AlCurve that doesn’t have an AlCurveNode.
For more information on how to create the curve geometry, see the description for the create() method.
A curve form can be one of three types: periodic, closed or open. If a curve is “Periodic”, is t itangent continuous at all points on the curve and its endpoints are coincident. If a curve is “Closed”, it is not periodic but its endpoints are coincident. If the curve is neither closed nor periodic, it is considered to be “Open”.
There are two ways to delete an AlCurve. If the AlCurve destructor is called, the attached AlCurveNode is deleted. If the AlCurveNode destructor is called, the attached AlCurve is deleted.
You should always create a curve node for a curve. If you create a curve with no curve node, the curve is not added to the universe. If you should lose the pointer to the curve, it will become lost memory.
There is one limitation to this class: you cannot add or remove individual curve control points (except by changing multiplicity).
Curves are made of curve control points (or CV’s) which you can traverse as a list by using AlCurve.first_cv() plus the AlCurveCV methods. You can also pack the curve information into an array using methods in this class.
What is multiplicity?
An AlCurveCV object can actually represent multiple CV’s, depending on the AlCurveCV’s multiplicity and periodicity. Notice that in this class there are two sets of methods - some “incl_multiples” and some not (namely “number_of_cvs”, “cvs_world_position”, “cvs_unaffected_position”, etc). The set of methods without multiplicity lets you get all curve CV’s where a curve CV can have multiplicity of 1, 2 or 3. The set of methods “incl_multiples” lets you get ALL curve CV’s including multiples due to a multiplicity > 1 and due to periodicity.
Example 1:
If you create a curve in the interactive Alias package with 4 CV’s and change the multiplicity of the second CV to 2 (using the “multiplicity” menu item in the Curve Tools menu), then:
number_of_cvs() will return 4.
cvs_world_position must be passed a 4x4 CVs matrix, and a multiplicity vector of length 4.
cvs_unaffected_position() must be passed the same as item 2.
set_cvs_unaffected_position() must be passed the same as item 2.
number_of_cvs_incl_multiples() will return 5.
cvs_world_position_incl_multiples() must be passed a 5x4 CVs matrix. You will notice that the 2nd and 3rd points in this matrix are the same.
cvs_unaffected_position_incl_multiples() must be passed the same as item 6. You will notice that the 2nd and 3rd points in this matrix are the same.
set_cvs_unaffected_position_incl_multiples() must be passed the same as item 6. The matrix you pass in should have the 2nd and 3rd points the same. What really happens in this method is that the 3rd point is given the same value as the 2nd point. (What you give as the 3rd point is ignored).
Example 2:
If you create a curve in the interactive Alias package with 4 CV’s and “close” the curve (using the “close” menu item in the Object Tools menu), you create a periodic curve. Then:
number_of_cvs() will return 4.
cvs_world_position must be passed a 4x4 CVs matrix, and a multiplicity vector of length 4.
cvs_unaffected_position() must be passed the same as item 2.
set_cvs_unaffected_position() must be passed the same as item 2.
number_of_cvs_incl_multiples() will return 7.
cvs_world_position_incl_multiples() must be passed a 7x4 CVs matrix. You will notice that in this matrix the 5th, 6th and 7th points are the same as the 1st, 2nd and 3rd points respectively.
cvs_unaffected_position_incl_multiples() must be passed the same as item 6. You will notice that in this matrix the 5th, 6th and 7th points are the same as the 1st, 2nd and 3rd points respectively.
set_cvs_unaffected_position_incl_multiples() must be passed the same as item 6. The matrix you pass in should have the 5th, 6th and 7th points the same as the 1st, 2nd and 3rd points respectively. What really happens in this method is that the 5th, 6th and 7th points are assigned the same values as the 1st, 2nd and 3rd points respectively. (What you give for the 5th, 6th and 7th points are ignored).
- adjust_end_span(self: alias_api.AlCurve, new_knot_span: float) int
Change the knot spacing of the last span of the curve leaving the remainder of the curve unchanged. The end point of the last span is preserved.
- Parameters
new_knot_span (float) – The knot spacing for the end span.
- Returns
The status code result of the operation: InvalidObject - the curve is an invalid object Success - the method worked Failure - the curve did not have at least one span, failed to adjust
the end span
- Return type
int(AlStatusCode)
- append(self: alias_api.AlCurve, pos: List[float[4]], type: alias_api.AlPointType) int
Append a CV or an edit point to the curve.
- Parameters
pos (List[float] (length 4)) – position in world space of new point
type (AlPointType (CV or EditPoint)) – The type of point to append.
- Returns
The status code result of the operation: Success - new point was successfully appended InvalidObject - the given object is not valid InvalidArgument - a None argument was supplied Failure - an error occurred
- Return type
int(AlStatusCode)
- apply_iterator_to_cvs(self: alias_api.AlCurve, iter: AlIterator) Tuple[int, int]
Apply the given iterator to all the CVs in this class. See the documentation for AlIterator.
- Parameters
iter (AlIterator) – the iterator to apply to each CV
- Returns
A tuple containing: (1) The status code result of the operation:
Success - the iterator exited normally Failure - the iterator exited abnormally sInvalidArgument - the iterator ‘iter’ was None InvalidObject - the curve was not valid
The last return code from the iterator
- Return type
int(AlStatusCode)
- copy_wrapper(self: alias_api.AlCurve) alias_api.AlObject
Return an exact duplicate of this AlCurve object.
- create(*args, **kwargs)
Overloaded function.
create(self: alias_api.AlCurve, deg: int, form: alias_api.AlCurveFormType, num_knots: int, knot_vector: List[float], num_control_pts: int, control_point: List[List[float[4]]], multiplicity: List[int]) -> int
This method is used to create the geometric data that represents this curve.
Alias curves are represented by an array of knots and an array of control points (for a detailed understanding of nurbs curves see “An Introduction to Splines for use in Computer Graphics and Geometric Modeling” by Bartels, Beatty and Barsky. aka The Killer B’s.). The number of spans in a curve is determined by the degree of the curve and the number of control points, namely there are ‘num_control_pts’ - ‘deg’ spans. Knot values are associated with the ends of each span. Therefore, ‘num_knots’ must be equal to ‘number of spans + 1’.
The expert will notice that ‘num_knots’ = ‘number of spans + 1’ does not give us enough knots to specify all the basis functions properly. (The correct number of knots required, according to the Killer B’s are numSpans + 2*degree + 1). However since Alias piles knots up at the extreme ends of an open nurbs curve (in order to force the curve to touch each end control point) this method does not require that the user specify the redundant knot values. For example, if the knot vector for a three span open curve contained the knot values [0 1 2 3], the real knot vector would be [0 0 0 0 1 2 3 3 3 3]. In the case of a periodic curve the values of the knots can be determined implicitly from the knots values provided and again don’t need to be provided explicitly. For example, if the knot vector for a four span periodic curve contained the knot values [-1 1 2 5 10], the real knot vector would be [-10 -9 -6 -1 1 2 5 10 12 13 16].
If this object was previously referencing some other curve, and this call succeeds, this object will reference the new curve.
For more information on multiplicity, see the Class Description.
When you create a curve, you must ensure the following
Open and closed curves must have at least one span.
Periodic curves require that there be at least 3 spans.
‘num_knots’ must be equal to ‘number of spans + 1’
The knot values must be a non-decreasing sequence of values.
- The first and last span must not be vacuous. That is
knot_vector[0] < knot_vector[1] and knot_vector[num_knots-2] < knot_vector[num_knots-1]
Any knot multiplicity must not exceed the degree of the curve.
- Periodic curves also require that the number of spans be greater than
or equal to the degree of the curve.
- For open/closed curves the number of control points is
the number of spans + degree. (ex. one span requires four control points)
- For periodic curves the number of control points is the same as
the number of spans. It isn’t necessary to specify any of the overlapping control points.
- All multiplictiy values must be 1, 2 or 3. The first and last
multiplicity values must be 1.
- param deg
The degree of the curve.
- type deg
int
- param form
Open, Closed or Periodic.
- type form
curveFormType (Open, Closed or Periodic).
- param num_knots
The number of knots in the knot_vector.
- type num_knots
int
- param knot_vector
The sequence of knot values. Must be of length num_knots.
- type knot_vector
List
- param num_control_pts
The number of points in control_point.
- type num_control_pts
int
- param control_point
The array of control points. Must have size of num_control_pts * 4.
- type control_point
List[List[float]]
- param multiplicity
The multiplicity values. Must be of length num_control_pts. Assumed to be an array of 1’s if None.
- type multiplicity
int
- return
The status code result of the operation: Success - All ok. InsufficientMemory - Ran out of memory. InvalidArgument - a None argument was supplied. Failure - did not work.
- rtype
int
create(self: alias_api.AlCurve, deg: int, form: alias_api.AlCurveFormType, knot_vector: List[float], num_control_pts: int, control_points: List[List[float[4]]]) -> int
This method is used to create the geometric data that represents this curve according to the standard Killer B’re representation.
This method shall be documented by noting its differences from the other create method.
This method assumes that the size of the number of knots passed in the knot vector is always num_control_pts - deg + 1 (or numSpans + 2*deg + 1, if you prefer, where numSpans = num_control_pts - deg). That is, the redundant end knots must be specified.
This method assumes that: If this object was previously referencing some other curve, and this call succeeds, this object will reference the new curve.
For more information on multiplicity, see the Class Description.
- When you create a curve, you must ensure the following
Open and closed curves must have at least one span.
Periodic curves require that there be at least 3 spans.
the number of knot values must be equal to ‘num_control_pts - deg + 1’
The knot values must be a non-decreasing sequence of values.
Any knot multiplicity must not exceed the degree of the curve.
- Periodic curves also require that the number of spans be greater than
or equal to the degree of the curve.
- For open/closed/periodic curves the number of control points is
the number of spans + degree. (ex. one span requires four control points).
- For periodic curves it is necessary to specify the overlapping
control points.
:param deg - The degree of the curve. :type deg: int :param form: The curve form type. :type form: curveFormType (Open, Closed or Periodic) :param knot_vector: The sequence of knot values. Must be of length
num_control_pts + deg + 1.
- type knot_vector
List[float] (len=num_control_pts - deg + 1)
- param num_control_pts
The number of points in control_point.
- type num_control_pts
int
- param control_point
The array of control points. Must have size of num_control_pts * 4.
- type control_point
List[List[float]]
- return
The status code result of the operation: Success - All ok. sInsufficientMemory - Ran out of memory. sInvalidArgument - a None argument was supplied. Failure - did not work.
- rtype
int(AlStatusCode)
- create_arc(*args, **kwargs)
Overloaded function.
create_arc(self: alias_api.AlCurve, start: List[float[3]], end: List[float[3]], other: List[float[3]], circle: int) -> int
This method is used to create a circular arc using attributes.
This method is simpler than the previous create method, requiring only to specify three points on the curve and whether the curve should be closed to form a circle. To modify the curve you should retrieve its attributes with the firstAttribute() method and use the appropriate AlAttribute methods to modify it. Modifying the CVs directly will cause the attributes to be deleted.
- param start
the coordinates for the start of the curve.
- type start
List[float] (len=3)
- param end
the coordinates for the end of the curve.
- type end
List[float] (len=3)
- param other
an additional point defining the arc.
- type other
List[float] (len=3)
- param circle
if True then a circle will be generated.
- type circle
bool
- return
The status code result of the operation: Success - All ok. Failure - Failed to create the curve. sInsufficientMemory - Ran out of memory. sAlreadyCreated - the AlCurve has already been created sInvalidArgument - a None argument was supplied
- rtype
int(AlStatusCode)
create_arc(self: alias_api.AlCurve, C: List[float[3]], N: List[float[3]], P: List[float[3]], r: float, a0: float, a1: float, dim: int, make_cubic: int) -> int
Create a circular arc between two angles.
If dim = 2, N is ignored. Point P with zero angle must not be at C. Returns None if arc has no length 3D:
a0 < a1 and a1-a0 <= 2*PI. Returns a full circle if a1-a0 > 2*PI. To build a carc in the other direction, reverse N.
- 2D:
|a1-a0| <= 2*PI. If a0 < a1 arc is counter clockwise else arc is clockwise. Returns a full circle if |a1-a0| > 2*PI.
- param C
center
- type C
List[float]
- param N
normal to plane of arc (if 3D)
- type N
List[float]
- param P
point with zero angle
- type P
List[float]
- param r
radius
- type r
float
- param a0
inital angles (in radians)
- type a0
float
- param a1
final angles (in radians)
- type a1
float
- param dim
dimension 2 or 3
- type dim
int
- param make_cubic
if true, raise degree to 3
- type make_cubic
bool
- return
The status code result of the operation: InvalidArgument - a bad argument was supplied Failure - Failed to create the curve. Success - All ok.
- rtype
int(AlStatusCode)
- create_conic(self: alias_api.AlCurve, c_a: float, c_b: float, c_c: float, c_d: float, c_e: float, c_f: float, start: List[float[3]], end: List[float[3]]) int
This method is used to create a conic arc using attributes. This method is simpler than the previous create method, requiring users only to specify the coefficients of the conic and the beginning and end of the curve. The start and end points must lie on the conic.
The conic is described by the equation
A * X^2 + B * X * Y + C * Y^2 + D * X + E * Y + F = 0
The conic will be created in the XY plane.
It is not possible to modify a conic curve through its attributes.
- Parameters
c_f (c_a through) – coefficient of the conic.
start (List[float] (len=3)) – the coordinates for the start of the curve.
end (List[float] (len=3)) – the coordinates for the end of the curve.
- Returns
The status code result of the operation: Success - All ok. Failure - Failed to create the curve. sInsufficientMemory - Ran out of memory. sInvalidArgument - a None argument was supplied sAlreadyCreated - the AlCurve has already been created
- Return type
int(AlStatusCode)
- create_ellipse(self: alias_api.AlCurve, center: List[float[3]], major_axis: List[float[3]], minor_axis: List[float[3]], start: List[float[3]], end: List[float[3]]) int
This method is used to create an elliptical arc using attributes. This method is simpler than the previous create method, requiring users only to specify the center, major axis, and minor axis of the ellipse and the beginning and end of the curve. The start and end points must lie on the ellipse and be specified in a counterclockwise order to indicate the arc. The axes must be perpendicular to each other.
When creating an elliptical arc, the axes MUST be specified in the XY plane.
It is not possible to modify an elliptical curve through its attributes.
It is not possible to create a closed curve with this method, hence it will always fail for AlFace’s.
- Parameters
center (List[float] (len=3)) – the center of the ellipse.
major_axis (List[float] (len=3)) – the focus of the ellipse.
minor_axis (List[float] (len=3)) – the focus of the ellipse.
start (List[float] (len=3)) – the coordinates for the start of the curve.
end (List[float] (len=3)) – the coordinates for the end of the curve.
- Returns
The status code result of the operation: Success - All ok. Failure - Failed to create the curve. sInsufficientMemory - Ran out of memory. sInvalidArgument - a None argument was supplied. sAlreadyCreated - the AlCurve has already been created
- Return type
int(AlStatusCode)
- create_hyperbola(self: alias_api.AlCurve, center: List[float[3]], major_axis: List[float[3]], minor_axis: List[float[3]], start: List[float[3]], end: List[float[3]]) int
This method is used to create a hyperbolic arc using attributes. This method is simpler than the previous create method, requiring users only to specify the center, major axis, and minor axis of the hyperbola and the beginning and end of the curve. The start and end points must lie on the ellipse and be specified in a counterclockwise order to indicate the arc. The axes must be perpendicular to each other.
The hyperbola will be created in the XY plane.
It is not possible to modify a hyperbolic curve through its attributes.
- Parameters
center (List[float] (len=3)) – the center of the hyperbola.
major_axis (List[float] (len=3)) – the focus of the hyperbola.
minor_axis (List[float] (len=3)) – the focus of the hyperbola.
start (List[float] (len=3)) – the coordinates for the start of the curve.
end (List[float] (len=3)) – the coordinates for the end of the curve.
Return code: :return: The status code result of the operation:
Success - All ok. Failure - Failed to create the curve. sInsufficientMemory - Ran out of memory. sInvalidArgument - a None argument was supplied. sAlreadyCreated - the AlCurve has already been created
- Return type
int(AlStatusCode)
- create_line(self: alias_api.AlCurve, start: List[float[3]], end: List[float[3]]) int
This method is used to create straight lines using attributes.
This method is simpler than the previous create method, requiring only to specify the beginning and end of the curve. To modify the curve you should retrieve its attributes with the firstAttribute() method and use the appropriate AlAttribute methods to modify it. Modifying the CVs directly will cause the attributes to be deleted.
- Parameters
start (List[float] (len=3)) – the coordinates for the start of the curve.
end (List[float] (len=3)) – the coordinates for the end of the curve.
- Returns
The status code result of the operation: Success - All ok. Failure - Failed to create the curve. sInvalidArgument - start or end was None sInsufficientMemory - Ran out of memory.
- Return type
int(AlStatusCode)
- create_parabola(self: alias_api.AlCurve, vertex: List[float[3]], focus: List[float[3]], start: List[float[3]], end: List[float[3]]) int
This method is used to create a parabolic arc using attributes. This method is simpler than the previous create method, requiring users only to specify the vertex and focus of the parabola and the beginning and end of the curve. The start and end points must lie on the parabola.
The parabola will be created in the XY plane.
It is not possible to modify a parabolic curve through its attributes.
- Parameters
vertex (List[float] (len=3)) – the vertex of the parabola.
focus (List[float] (len=3)) – the focus of the parabola.
start (List[float] (len=3)) – the coordinates for the start of the curve.
end (List[float] (len=3)) – the coordinates for the end of the curve.
Return code: :return: The status code result of the operation:
Success - All ok. Failure - Failed to create the curve. sInsufficientMemory - Ran out of memory. sInvalidArgument - a None argument was supplied sAlreadyCreated - the AlCurve has already been created
- Return type
int(AlStatusCode)
- create_point(self: alias_api.AlCurve, pt: List[float[3]]) int
Create a “degenerate curve” with a single CV. The coordinates for this CV are provided by the argument pt[]. The created “curve” will be:
rational open degree 1 span 0 dimension 3 knots {0.0} cvs {pt[0], pt[1], pt[2], 1.0}
- Parameters
pt (List[float] (len=3)) – position of the point
- Returns
The status code result of the operation: Success - the method succeeded Failure - Failed to create the point. sInvalidArgument - a None argument was supplied. sAlreadyCreated - the AlCurve has already been created
- Return type
int(AlStatusCode)
- curve_node(self: alias_api.AlCurve) AlCurveNode
Returns the curve node associated with this curve.
Returns None if there is not attached curve node.
- cvs_affected_position(self: alias_api.AlCurve, tm: alias_api.AlTM) Tuple[int, list, List[int]]
Returns the CV’s in the given CV array and the multiplicity of each CV in the multiplicity vector. The first dimension of the CV array must be number_of_cvs(). The length of the multiplicity vector must also be number_of_cvs(). The multiplicity vector returned by this function is the same as the one returned by CVsUnaffectedPosition().
- Parameters
tm (ALTM) – the transformation matrix built by tranversing the dag.
- Returns
A tuple containing: (1) The status code result of the operation:
Success - the curve CVs positions were returned InvalidObject - the curve was not valid Failure - an error occurred sInvalidArgument - a None argument was supplied
The CV positions
The multiplicity of each CV
- Return type
int(AlStatusCode)
- cvs_affected_position_incl_multiples(self: alias_api.AlCurve, cv_list: List[List[float[4]]]) Tuple[int, List[List[float[4]]], alias_api.AlTM]
Returns the world positions of all CV’s in this curve, including multiples. The first dimension of the given CVList must be of length number_of_cvs_incl_multiples().
Note that the positions returned are [ x y z w ] and not [ w*x w*y w*z w ].
- Parameters
cv_list (List[List[float]]) – the world positions of all CV’s
- Returns
A tuple containing: (1) The status code result of the operation:
Success - the CVs positions were returned InvalidObject - the curve was not valid sInvalidArgument - a None argument was supplied
The world positions of all CV’s
The AlTM transformation matrix built by traversing the dag
- Return type
int(AlStatusCode)
- cvs_unaffected_position(self: alias_api.AlCurve) Tuple[int, list, List[int]]
Returns the CV’s in the given CV array and the multiplicity of each CV in the multiplicity vector. The first dimension of the CV array must be number_of_cvs(). The length of the multiplicity vector must also be number_of_cvs(). The multiplicity vector returned by this function is the same as the one returned by CVsWorldPosition().
- Parameters
cv_list (List[List[float]]) – returned CV positions
:param multiplicity - the multiplicity of each CV :type multiplicity: int
- Returns
A tuple containing: (1) The status code result of the operation:
Success - the curve CVs positions were returned InvalidObject - the curve was not valid sInvalidArgument - a None argument was supplied Failure - an error occurred
The CV positions
The multiplicity of each CV
- Return type
int(AlStatusCode)
- cvs_unaffected_position_incl_multiples(self: alias_api.AlCurve, cv_list: List[List[float[4]]]) Tuple[int, List[List[float[4]]]]
Returns the unaffected positions of all CVs in this curve, including multiples. The first dimension of the given CVList must be of length number_of_cvs_incl_multiples().
- Parameters
cv_list (List[List[float]]) – returned unaffected positions of all CVs
- Returns
A tuple containing: (1) The status code result of the operation:
Success - the CVs positions were returned InvalidObject - the curve was not valid sInvalidArgument - a None argument was supplied Failure - an error occurred
The unaffected positions of all CVs
- Return type
int(AlStatusCode)
- cvs_world_position(self: alias_api.AlCurve) Tuple[int, list, List[int]]
Returns the CV’s in the given CV array and the multiplicity of each CV in the multiplicity vector. The first dimension of the CV array must be number_of_cvs(). The length of the multiplicity vector must also be number_of_cvs(). The multiplicity vector returned by this function is the same as the one returned by CVsUnaffectedPosition().
- Returns
A tuple containing: (1) The status code result of the operation:
Success - the curve CVs positions were returned InvalidObject - the curve was not valid Failure - an error occurred sInvalidArgument - a None argument was supplied
The CV positions List[List[float[4]]]
The multiplicity of each CV List[int]
- Return type
int(AlStatusCode)
- cvs_world_position_incl_multiples(self: alias_api.AlCurve, cv_list: List[List[float[4]]]) Tuple[int, List[List[float[4]]]]
Returns the world positions of all CV’s in this curve, including multiples. The first dimension of the given CVList must be of length number_of_cvs_incl_multiples().
Note that the positions returned are [ x y z w ] and not [ w*x w*y w*z w ].
- Parameters
cv_list (List[List[float]]) – the world positions of all CV’s
- Returns
A tuple containing: (1) The status code result of the operation:
Success - the CVs positions were returned InvalidObject - the curve was not valid sInvalidArgument - a None argument was supplied Failure - an error occurred
The world positions of all CV’s
- Return type
int(AlStatusCode)
- degree(self: alias_api.AlCurve) int
Returns the degree of the curve.
-1 is returned if the curve is not valid.
- delete_object(self: alias_api.AlCurve) int
Delete the AlCurve from the Alias Universe and return the status of the performed operation.
- do_updates(self: alias_api.AlCurve, new_state: int) int
The do_upate flag is used to notify the system that you are finished performing. If this flag is true, then it is equivalent to sending out a ‘geometry modified’ message to the rest of the system. When the system receives the update message, then operations such as construction history etc are performed.
This feature is important when using construction history plugins. Construction history plugins should always set the do_upate flag to False when performing updates (otherwise an infinite update loop will result, usually ending in a core dump). The update can be explicitly forced using the AlDagNode.send_geometry_modified_message() method.
This flag DOES NOT UPDATE THE SCREEN. Use the AlUniverse::redrawScreen to perform the screen refresh.
If the previous state of the flag was False and the new state is True, then an update will be performed now and on each subsequent dag modification.
- Returns
The status code result of the operation: Success - the new state was set InvalidObject - this DagNode is invalid.
- Return type
int(AlStatusCode)
- eval(*args, **kwargs)
Overloaded function.
eval(self: alias_api.AlCurve, t: float, world_coordinates: int) -> Tuple[int, List[float[3]], List[float[3]]]
Determines the 3D coordinate and the derivative of the parameter value on the curve.
- param t
parameter position on the curve
- type t
float
- param worldCoordinates
the evaluation is performed in world coordinates
- type worldCoordinates
bool
- return
A tuple containing: (1) The status code result of the operation:
Success - the coordinate was successfully determined Failure - the evaluation failed InvalidObject - the curve was invalid
The 3D coordinate of the point at the given parameter - List[float]
The derivative of the parameter value on the curve - float
- rtype
int(AlStatusCode)
eval(self: alias_api.AlCurve, dist: float, world_coordinates: bool, tolerance: float) -> Tuple[int, List[float[3]], List[float[3]]]
Determines the 3D coordinate of the point at a given distance from start of the curve. Error tolerance must be greater than zero.
- param dist
arc length position on the curve
- type dist
float
:param worldCoordinates - the evaluation is performed in world coordinates :type worldCoordinates: bool :param tolerance - the error tolerance :type tolerance: float
- return
A tuple containing: (1) The status code result of the operation:
Success - the coordinate was successfully determined Failure - the evaluation failed InvalidObject - the curve was invalid sInvalidArgument - tolerance was non-positive
The 3D coordinate of the point at the given distance
The parameter value at the given distance
- rtype
int(AlStatusCode)
- extend_curve(self: alias_api.AlCurve, knot: float, new_pos: List[float[4]]) int
Extend the curve by one span. The existing spans remain unchanged. The new span has C(k-1) and interpolates the given point. This curve must have at least 1 span and at least 4 CVs.
- Parameters
knot (float) – the knot spacing for the new span.
new_pos (List[float] (length 4)) – the position of the new CV.
- Returns
The status code result of the operation: InvalidObject - the curve was an invalid object Success - extending the spline worked Failure - curve had less than 1 span, curve had less than 4 CVs,
or could not extend spline because of an internal error
- Return type
int(AlStatusCode)
- first_attribute(self: alias_api.AlCurve) alias_api.AlAttributes
Returns the first attribute on this curve if any, otherwise None is returned. Note that if CV positions are modified through any of the AlCurve, AlCurveCV, AlCluster, AlSet, etc. then the attributes are removed from the curve.
- first_cv(self: alias_api.AlCurve) AlCurveCV
Returns a pointer to the first CV in the curve.
- form(self: alias_api.AlCurve) alias_api.AlCurveFormType
When a curve is periodic it means that its endpoints are coincident and that the curve is tangent continuous at the point where its endpoints touch. “Periodic” is returned in this case. “Closed” is returned if the curve is not periodic, but if its endpoints are coincident. If a curve is neither “Periodic” nor “Closed” then “Open” is returned.
(Note: If you use the “close” menu item in the interactive Alias package, you actually make a curve periodic.)
- get_cv(self: alias_api.AlCurve, index: int) AlCurveCV
Returns a pointer to the CV of the given index. Returns None if the CV could not be found or the index was negative. The index of the first CV is 0.
- increment_degree(self: alias_api.AlCurve) int
Increment the degree of a curve without changing its shape. The curve must have at least 1 span.
- Returns
The status code result of the operation: InvalidObject - curve is not a valid object Success - raising the degree of the curve worked Failure - number of spans less than 1 or internal failure
- Return type
int(AlStatusCode)
- insert(self: alias_api.AlCurve, param: float) int
Insert an edit point into the curve.
- Parameters
param (float) – parametric value of the new edit point on the curve
- Returns
The status code result of the operation: Success - edit point was successfully inserted InvalidObject - the given object is not valid InvalidArgument - param is out of bounds Failure - an error occurred
- Return type
int(AlStatusCode)
- is_display_mode_set(self: alias_api.AlCurve, mode: alias_api.AlDisplayModeType) int
Returns True if the specified display mode is toggled on for the curve. Returns False otherwise.
- The only valid AlDisplayModeTypes for an AlCurve are
DisplayGeomHull DisplayGeomEditPoints DisplayGeomKeyPoints DisplayGeomCVs
- Parameters
mode (AlDisplayModeType) – display mode of interest.
- Returns
False is returned if the curve is not Valid.
- Return type
bool
- knot_vector(self: alias_api.AlCurve) List[float]
Returns the knot vector in the given vector. This vector must be of length numberOfKnots(). For more information as to what these values mean, see the description for the create() method.
:param knot_vector - returned knot vector :type knot_vector: List
- Returns
The status code result of the operation: Success - the knot vector was returned InvalidObject - the curve was not valid InvalidArgument - a None argument was supplied
- Return type
int(AlStatusCode)
- length(self: alias_api.AlCurve, world_coordinates: bool = 1, tolerance: float = 0.001) Tuple[int, float]
Determines the length of the curve in either local coordinates or world space coordinates.
- Parameters
worldCoordinates (bool) – if the calculation is to be done in world space
:param tolerance - the error tolerance :type tolerance: float
- Returns
A tuple containing: (1) The status code result of the operation:
Success - the length was successfully determined Failure - the evaluation failed InvalidObject - the curve was invalid sInvalidArgument - tolerance was zero or negative
The length of the curve
- Return type
int(AlStatusCode)
- normal(self: alias_api.AlCurve) Tuple[int, List[float[3]]]
Test if bspline is planar and return normal. Find the first three points that are not collinear, construct a normal and test if the bspline lies in the plane. If the bspline is planar and closed the normal is returned with a clockwise orientation looking down on the plane, and the normal pointing towards you. If the bspline is a line or all the points are collinear, a unique normal can not be defined.
- Returns
A tuple containing: (1) The status code result of the operation:
Success - found normal to curve Failure - normal could not be found, either
the spline is a point, linear or not planar
the normal vector
- Return type
int(AlStatusCode)
- number_of_cvs(self: alias_api.AlCurve) int
Returns the number of CVs.
-1 is returned if the curve is not valid.
- number_of_cvs_incl_multiples(self: alias_api.AlCurve) int
Returns the number of CV’s including multiples. For more information as to what this value means, see the class documentation. -1 is returned if the curve is not valid.
- number_of_knots(self: alias_api.AlCurve) int
Returns the number of knots in this curve. For more information as to what this number means, see the description for the create() method. -1 is returned if the curve is not valid.
- number_of_spans(self: alias_api.AlCurve) int
Returns the number of spans in the curve.
-1 is returned if the curve is not valid.
- periodic_to_non_periodic(self: alias_api.AlCurve) int
If a curve is periodic, convert it to non-periodic curve (closed curve) by making it have multiple end knots.
This method modifies the curve. It will not succeed for an AlCurve that exists in the AlUniverse; that is, it must not have a parent AlCurveNode.
- Returns
The status code result of the operation: InvalidObject - the curve was invalid. Failure - the method didn’t succeed Success - the curve was converted to non-periodic one.
- Return type
int(AlStatusCode)
- real_knot_vector(self: alias_api.AlCurve) List[float]
Returns real_number_of_knots() in ‘knot_vector’ for the curve.
- Parameters
knot_vector (List) – array to place the knot vector into
- Returns
The status code result of the operation: Success - successfully copied the curve’s knot vector into knot_vector sInvalidArgument - knot_vector was None InvalidObject - the curve was invalid Failure - an error occurred
- Return type
int(AlStatusCode)
- real_number_of_knots(self: alias_api.AlCurve) int
Returns the actual number of knots on the curve. That is number_of_spans() + 2*degree() - 1. (Note that two additional knots are required to define a NURBS curve, but they have no effect on the curve so are not included in this count.) This method returns -1 if the curve is not valid.
- replace(*args, **kwargs)
Overloaded function.
replace(self: alias_api.AlCurve, deg: int, form: alias_api.AlCurveFormType, num_knots: int, knot_vector: List[float], num_control_pts: int, control_point: List[List[float[4]]], multiplicity: List[int]) -> int
This method is used to replace the data that represents the curve.
It basically duplicates the ::create routine and recreates the curve and then replaces the current curve with the new one.
See create() for more details.
- param deg
The degree of the curve.
- type deg
int
- param form
The curve form type.
- type form
curveFormType (Open, Closed or Periodic)
- param num_knots
The number of knots in the knot_vector.
- param knot_vector
The sequence of knot values. Must be of length num_knots.
- type knot_vector
List
- param num_control_pts
The number of points in control_point.
- type num_control_pts
int
- :param control_point - The array of control points. Must have size
of num_control_pts * 4.
- type control_point
List[List[float]]
- :param multiplicity - The multiplicity values. Must be of length
num_control_pts. Assumed to be an array of 1’s if None.
- type multiplicity
int
- return
The status code result of the operation:
Success - All ok. sInsufficientMemory - Ran out of memory. sInvalidArgument - a None argument was supplied. Failure - did not work.
replace(self: alias_api.AlCurve, deg: int, form: alias_api.AlCurveFormType, knot_vector: List[float], num_control_pts: int, control_point: List[List[float[4]]]) -> int
This method is used to replace the data that represents the curve.
It basically duplicates the ::create routine and recreates the curve and then replaces the current curve with the new one.
See create() for more details.
- param deg
The degree of the curve.
- type deg
int
- param form
The curve form type.
- type form
curveFormType (Open, Closed or Periodic)
- param knot_vector
The sequence of knot values. Must be of length num_control_pts + deg + 1.
- type knot_vector
List
- param num_control_pts
The number of points in control_point.
- type num_control_pts
int
- :param control_point - The array of control points. Must have size
of num_control_pts * 4.
- type control_point
List[List[float]]
- return
The status code result of the operation: Success - All ok. sInsufficientMemory - Ran out of memory. sInvalidArgument - a None argument was supplied. Failure - did not work.
- rtype
int(AlStatusCode)
- reverse_curve(self: alias_api.AlCurve) int
Reverses the parameterization of the curve.
- Returns
The status code result of the operation: InvalidObject - curve was not a valid object Success - the curve reversal worked Failure - the curve reversal failed for internal reasons
- Return type
int(AlStatusCode)
- set_cvs_unaffected_position(self: alias_api.AlCurve, cv_list: List[List[float[4]]]) int
Sets the CV’s of this curve to the values in the given CV array. The first dimension of the CV array must be number_of_cvs().
- Parameters
cv_list (List[List[float[4]]]) – CV positions
- Returns
The status code result of the operation: Success - the curve CVs positions were set InvalidObject - the curve was not valid sInvalidArgument - a None argument was supplied Failure - an error occurred
- Return type
int(AlStatusCode)
- set_cvs_unaffected_position_incl_multiples(self: alias_api.AlCurve, cv_list: List[List[float[4]]]) int
Sets the unaffected positions of all CVs in this curve, including multiples. The first dimension of the given CVList must be of length number_of_cvs_incl_multiples().
You cannot give multiples different values. For example, if you have an open curve where numOfCVs() is 6 and and numOfCVsInclMultiples() is 7 because the 2nd point has a multiplicity of 2, then the 2nd and 3rd quadruple in your CVList should be the same. What really happens is that the 3rd point is given the same value as the 2nd point. (What you give as the 3rd point is ignored). For more information see the examples in the class description.
- Parameters
cv_list (List[List[float]]) – the unaffected positions of all CVs
- Returns
The status code result of the operation: Success - the CVs positions were set InvalidObject - the curve was not valid sInvalidArgument - a None argument was supplied Failure - an error occurred
- Return type
int(AlStatusCode)
- set_display_mode(self: alias_api.AlCurve, mode: alias_api.AlDisplayModeType, on: int) int
For the given display mode, if the flag on_or_off is True then the display mode for the surface is set, otherwise it is unset.
- The only valid AlDisplayModeTypes for an AlCurve are
DisplayGeomHull DisplayGeomEditPoints DisplayGeomKeyPoints DisplayGeomCVs
- Parameters
mode (AlDisplayMode) – display mode of interest.
on_or_off (bool) – True if this surface will have the display mode set, else False.
- Returns
The status code result of the operation: Return values: Success - if this operation was successful. InvalidObject - the curve was invalid sInvalidArgument - invalid display type.
- Return type
int(AlStatusCode)
- set_knot_vector(self: alias_api.AlCurve, knot_vector: List[float]) int
Sets the knot vector to be the given vector. This vector must be of length numberOfKnots(). For more information as to what these values mean, see the description for the create() method.
:param knot_vector - the knot vector to be the given vector :type knot_vector: List
- Returns
The status code result of the operation: Success - the knot vector was set InvalidObject - the curve was not valid sInvalidArgument - a None argument was supplied or the knots were
not in increasing order
- Return type
int(AlStatusCode)
- set_real_knot_vector(self: alias_api.AlCurve, knot_vector: List[float]) int
Sets the knots for this curve. The parameter ‘knot_vector’ must be of ‘real_number_of_knots()’.
- Parameters
knot_vector (List) – array of knots. The length of the array should be equal to ‘real_number_of_knots()’
- Returns
The status code result of the operation: Success - the knots were successfully set. sInvalidArgument - knot_vector was None InvalidObject - the curve is invalid Failure - an error occurred
- Return type
int(AlStatusCode)
- trim_curve(self: alias_api.AlCurve, min_point: float, max_point: float) int
Trim the curve at the parameters specified. param0 and param1 are the min and max points. This routine fails if param0 and param1 are the same or if param0 is greater than param1.
- Parameters
min_point (float) – the minimum position along the curve where the curve is to be trimmed
max_point (float) – the maxiumum position along the curve where the curve is to be trimmed
- Returns
The status code result of the operation InvalidObject - curve was not a valid object Success - method worked Failure - failed to trim spline, min_point equals max_point or
min_point > max_point or other internal failure
- Return type
int
- type(self: alias_api.AlCurve) alias_api.AlObjectType
Return the AlCurve type identifier.
- class alias_api.AlCurveAttributes
Interface to Alias curve attributes.
AlCurveAttributes is a class derived from the AlAttributes class. This class allows access to a curve.
This class provides information similar to that of the AlCurve class but without the ability to modify the curve or its CVs.
NOTE: When an AlCurve has just an AlCurveAttribute attribute the AlCurveAttribute provides no information that the AlCurve doesn’t. For this reason, in this case, no information is provided by the AlCurveAttribute, all methods return null values.
- copy_wrapper(self: alias_api.AlCurveAttributes) alias_api.AlObject
This method makes a copy of the AlCurveAttributes. The returned AlCurveAttributes will reference the same data as the original.
- cvs_unaffected_position(self: alias_api.AlCurveAttributes) Tuple[int, std::vector<std::array<double,4>,std::allocator<std::array<double,4> > >, std::vector<int,std::allocator<int> >]
Returns the CV’s in the given CV array and the multiplicity of each CV in the multiplicity vector. The first dimension of the CV array must be number_of_cvs(). The length of the multiplicity vector must also be number_of_cvs(). The multiplicity vector returned by this function is the same as the one returned by cvs_world_position().
- Returns
A tuple containing: (1) The status code result of the operation:
Success - the CVs positions were returned InvalidObject - the attribute was not valid sInvalidArgument - a None argument was supplied Failure - an error occurred
The CV positions
The multiplicity of each CV
- Return type
int(AlStatusCode)
- degree(self: alias_api.AlCurveAttributes) int
Returns the degree of the curve. Zero will be returned if the attribute is not valid.
- form(self: alias_api.AlCurveAttributes) alias_api.AlCurveFormType
When a curve is periodic it means that its endpoints are coincident and that the curve is tangent continuous at the point where its endpoints touch. “Periodic” is returned in this case. “Closed” is returned if the curve is not periodic, but if its endpoints are coincident. If a curve is neither “Periodic” nor “Closed” then “Open” is returned.
(Note: If you use the “close” menu item in the interactive Alias package, you actually make a curve periodic.)
- Returns
The curve form type.
- Return type
curveFormType Open - the curve is open. Closed - the curve is closed. Periodic - the curve is periodic. InvalidCurve - the attribute is not valid.
- knot_vector(self: alias_api.AlCurveAttributes) std::vector<double,std::allocator<double> >
Returns the knot vector in the given vector. This vector must be of length numberOfKnots(). For more information as to what these values mean, see the description for the create() method.
:param knot_vector - returned knot vector :type knot_vector: List
- Returns
The status code result of the operation: Success - the knot vector was returned InvalidObject - the curve was not valid InvalidArgument - a None argument was supplied Failure - the knot vector could not be returned
- Return type
int(AlStatusCode)
- number_of_cvs(self: alias_api.AlCurveAttributes) int
Returns the number of CVs. -1 is returned if the attribute is not valid.
- number_of_knots(self: alias_api.AlCurveAttributes) int
Returns the number of knots in this curve. For more information as to what this number means, see the description for the create() method. -1 is returned if the attribute is not valid.
- number_of_spans(self: alias_api.AlCurveAttributes) int
Returns the number of spans in the curve. -1 is returned if the attribute is not valid.
- type(self: alias_api.AlCurveAttributes) alias_api.AlObjectType
Returns the class identifier ‘ConicAttributeType’.
- class alias_api.AlCurveCV
Encapsulates methods common to curve CVs.
AlCurveCV is the class used to access and manipulate curve CV’s (also referred to as Control Points). There is one AlCurveCV object for each CV of an AlCurve as you see it in the interactive Alias package. You cannot create or delete an AlCurveCV. AlCurveCV’s are only created through AlCurve’s.
There are methods to query and set the multiplicity of a CV, and methods to query the world position and the “unaffected” position of a CV. The “unaffected” position of a CV is its position BEFORE any transformations (from its parent dag node or from affecting clusters) have been applied to it. There is also a method to access the clusters that affect a CV. Methods setWorldPosition(*) are used for setting either the unaffected or affected(clusters) position of a CV.
Multiplicity:
When an AlCurveCV has a multiplicity > 1, CV’s are internally piled up at that position. In this case, an AlCurveCV actually represents more than one CV internally. To access ALL CV’s, use the methods in the AlCurve class to query values “including multiplicity”, or use the example code below. By representing AlCurveCV’s this way, then if an AlCurveCV is moved, the corresponding multiple CV’s at that position are moved as well, acting exactly like the Alias interactive package.
Creation:
Note that certain routines require that the given CV be installed in the Dag (i.e., that the curve belongs to a AlCurveNode). If any of these are called on a CV that’s not part of the Dag, they will simply fail.
- Routines that require the CV to be in the Dag:
next world_position set_multiplicity set_unaffected_position set_world_position
- copy_wrapper(self: alias_api.AlCurveCV) alias_api.AlObject
Makes an exact copy of this AlCurveCV wrapper.
- curve(self: alias_api.AlCurveCV) alias_api.AlCurve
Returns a pointer to the AlCurve that this curve CV belongs to.
- do_updates(self: alias_api.AlCurveCV, arg0: int) int
The doUpdate flag is used to notify the system that you are finished performing. If this flag is true, then it is equivalent to sending out a ‘geometry modified’ message to the rest of the system. When the system receives the update message, then operations such as construction history etc are performed.
This feature is important when using construction history plugins. Construction history plugins should always set the doUpdate flag to FALSE when performing updates (otherwise an infinite update loop will result, usually ending in a core dump). The update can be explicitly forced using the AlDagNode.send_geometry_modified_message() method.
This flag DOES NOT UPDATE THE SCREEN. Use the AlUniverse::redrawScreen to perform the screen refresh.
If the previous state of the flag was FALSE and the new state is TRUE, then an update will be performed now and on each subsequent dag modification.
- Returns
The status code result of the operation: Success - the new state was set InvalidObject - this DagNode is invalid.
- Return type
- index(self: alias_api.AlCurveCV) int
Returns the index of this CV.
Returns -1 if the index could not be found. The index of the first CV is 0.
- multiplicity(self: alias_api.AlCurveCV) int
Returns the multiplicity of this curve CV.
The returned value is 1, 2 or 3, unless the call fails, in which case it is 0.
- next(self: alias_api.AlCurveCV) alias_api.AlCurveCV
Returns a pointer to the next AlCurveCV.
Otherwise, returns None if there is no next curve CV, or if this CV is not in the Dag.
The “not in the dag” restriction cannot be removed since the ‘face’ identifier lives in the dag, so we cannot differentiate faces from ordinary curves.
- prev(self: alias_api.AlCurveCV) alias_api.AlCurveCV
Returns a pointer to the previous AlCurveCV.
Otherwise, returns None if there is no previous curve CV.
- set_multiplicity(self: alias_api.AlCurveCV, new_multiplicity: int) int
Sets the multiplicity of this curve CV to the given multiplicity. The new multiplicity must be 1, 2, or 3.
- Parameters
new_multiplicity (int) – the multiplicity to set this AlCurveCV to.
- Returns
The status code result of the operation: Success - the multiplicity was set InvalidArgument - the multiplicity was not 1, 2 or 3 InvalidObject - the CV was invalid InsufficientMemory - not enough memory to allocate a new block Failure - the CV is not created or not in the world
- Return type
- set_unaffected_position(self: alias_api.AlCurveCV, x: float, y: float, z: float, w: float) int
Sets either the CVs PW directly or the cluster local Pw if the CV is affected by clusters. If many CVs are to be moved it is more efficient to use AlCurve.set_cvs_unaffected_position().
- Parameters
x (float) – the new unaffected position in the x direction
y (float) – the new unaffected position in the y direction
z (float) – the new unaffected position in the z direction
w (float) – homogeneous coordinate
- Returns
The status code result of the operation: Success - the position of this curve CV was set InvalidObject - the CV was not valid sFailure - the CV is not created or not in the world.
- Return type
- set_world_position(*args, **kwargs)
Overloaded function.
set_world_position(self: alias_api.AlCurveCV, x: float, y: float, z: float, w: float, include_world: int) -> int
Set the world position of the CV. The CV may also be in a cluster.
- param x
the new unaffected position in the x direction
- type x
float
- param y
the new unaffected position in the y direction
- type y
float
- param z
the new unaffected position in the z direction
- type z
float
- param w
homogeneous coordinate
- type w
float
- param include_world
include world transformation in move
- type include_world
bool
- return
The status code result of the operation: Success - the position of this curve CV was set InvalidObject - the CV was not valid sFailure - the CV is not created or not in the world. The move could not be performed
- rtype
AlStatusCode
set_world_position(self: alias_api.AlCurveCV, x: float, y: float, z: float, w: float, tm: alias_api.AlTM) -> int
Set the world position of the CV. The CV may also be in a cluster.
Note that this method uses the inverse of the transformation matrix that is passed in so that the calling routine does not need to generate it.
- param x
the new unaffected position in the x direction
- type x
float
- param y
the new unaffected position in the y direction
- type y
float
- param z
the new unaffected position in the z direction
- type z
float
- param w
homogeneous coordinate
- type w
float
- param tm
user’s transformation matrix
- type tm
AlTM
- return
The status code result of the operation: Success - the position of this curve CV was set InvalidObject - the CV was not valid sFailure - the CV is not created or not in the world. The move could not be performed
- rtype
AlStatusCode
- type(self: alias_api.AlCurveCV) alias_api.AlObjectType
Returns the class identifier ‘CurveCVType’
- unaffected_position(self: alias_api.AlCurveCV) Tuple[int, float, float, float, float]
Returns the position of this curve CV PRIOR TO ANY TRANSFORMATIONS (hence “unaffected”).
How are the unaffected position and world position related? The world position is the unaffected position with the inclusive transformation of all dag nodes above this curve applied to it AND the transformations of all affecting clusters applied to it (in appropriate proportions).
- Returns
A tuple containing: (1) the status code result of the operation:
Success - the position of this curve CV was returned InvalidObject - the CV was invalid Failure - the CV is not created or not in the world.
the unaffected position - the unaffected position in the x direction - the unaffected position in the y direction - the unaffected position in the z direction - homogeneous coordinate
- Return type
tuple<AlStatusCode, float, float, float, float>
- world_position(self: alias_api.AlCurveCV) Tuple[int, float, float, float, float]
Returns the position of this curve CV in world space. This position includes the transformations of all dag nodes above this curve and the effects of all clusters.
Note that the positions returned are [ x y z w ] and not [ w*x w*y w*z w ].
- Returns
A tuple containing: (1) the status code result of the operation:
Success - the position of this curve CV in world space was returned InvalidObject - the CV was invalid Failure - the CV is not created or not in the world.
The position of the CV in world space. - the world position in the x direction - the world position in the y direction - the world position in the z direction - the homogeneous coordinate
- Return type
tuple<AlStatusCode, float, float, float, float>
- class alias_api.AlCurveFormType
Curve form types.
Members:
Closed
Open
Periodic
InvalidCurve
- property name
- class alias_api.AlCurveNode
A dag node that refers to a nurbs curve’s geometry.
AlCurveNode is the class used to access and manipulate curves within the dag.
This class behaves like other dag nodes (see AlDagNode for a description of the usage and purpose of dag nodes). Users access the geometry of the curve via the ‘curve()’ method which returns a pointer to an AlCurve object which provides the user with the methods used to modify the geometry of the curve. Curves can be created from scratch by instantiating and creating an AlCurve, and then by instantiating and creating an AlCurveNode (using the AlCurve as a parameter).
There are two ways to delete an AlCurveNode. If the AlCurveNode delete_object() method is called, then the node’s AlCurve is also deleted. If the AlCurve.delete_object() method is called, then its associated AlCurveNode is also deleted.
- copy_wrapper(self: alias_api.AlCurveNode) alias_api.AlObject
Return an exact duplicate of this AlCurveNode wrapper.
- create(self: alias_api.AlCurveNode, curve: alias_api.AlCurve) int
Allocate the dag node for this object and attach it to the given AlCurve ‘curve’.
This method should only be called once for any AlCurve. It is an error to this method twice or if the object has been read in from a wire file.
- Parameters
curve (AlCurve) – The curve to create the curve node from.
- Returns
The status code from performing the operation AlStatusCode.Success - successful AlStatusCode.InvalidArgument - the new curve was invalid or None AlStatusCode.AlreadyCreated - the curve was already created elsewhere AlStatusCode.InsufficientMemory - if not enough memory available
- Return type
statusCode
- curve(*args, **kwargs)
Overloaded function.
curve(self: alias_api.AlCurveNode) -> alias_api.AlCurve
Return the curve data structure which can be used to acces the geometry of the curve.
curve(self: alias_api.AlCurveNode, tm: alias_api.AlTM) -> alias_api.AlCurve
Return the curve data structure which can be used to acces the geometry of the curve.
The AlTM ‘tm’ will be updated with the curve node’s transformation matrix, if a curve exists.
- delete_object(self: alias_api.AlCurveNode) int
Delete the AlCurveNode from the Alias Universe and return the status of the performed operation.
- join(self: alias_api.AlCurveNode, curve_node: alias_api.AlCurveNode) alias_api.AlCurveNodeJoinErrors
Join the passed in curve node’s curve to the end of this curve, if the end is coincident with the beginning of the curve node’s curve.
This is most useful when using curves with attributes.
Warning: this operator will remove this curve’s CVs from all clusters and sets but not the curve node that is passed in. This means that all AlClusterMembers’ and AlSetMembers’ of this curves CVs will no longer be valid after a join. Further all AlCurveCVs and attribteus on ‘this’ AlCurve will have been deleted and regenerated (the passed curve is unchanged).
If the return value is etiher AlCurveNodeJoinErrors.Success or AlCurveNodeJoinErrors.Failure then all pointers to this curve’s AlCurveCVs will be invalid.
If the return value is AlCurveNodeJoinErrors.DuplicateCurve, AlCurveNodeJoinErrors.BadData, AlCurveNodeJoinErrors.NoAttribute, or AlCurveNodeJoinErrors.InvalidKeyPoints the model will not have been modified.
If the return value is AlCurveNodeJoinErrors.BadCluster all AlCurveCVs below this AlCurveNode will have been removed from all sets and clusters and the cluster effects may have been applied to some CVs.
Finally if the return value is AlCurveNodeJoinErrors.Failure all AlCurveCVs below this AlCurveNode will have been removed from all sets and clusters, all AlCurveCVs have been deleted and recreated, existing AlAttributes have been moved to the garbage list and new ones created and a join was attempted but failed, perhaps because the ends of the two curves did not overlap.
- Parameters
curve_node (AlCurveNode) – A curve that will be added to the end of this curve.
- Returns
The status code from performing the operation AlCurveNodeJoinErrors.Success - all OK, the join successed. AlCurveNodeJoinErrors.Failure - the join failed, perhaps because the end points didn’t overlap. AlCurveNodeJoinErrors.BadCluster - failed to remove effect of all clusters. AlCurveNodeJoinErrors.InvalidKeyPoints - one curve may have been a circle. AlCurveNodeJoinErrors.NoAttributes - coudln’t find or create attribteus for a curve. AlCurveNodeJoinErrors.BadData - the model is in an incorrect state. AlCurveNodeJoinErrors.DuplicateCurve - tried joining a curve to itself.
- Return type
- type(self: alias_api.AlCurveNode) alias_api.AlObjectType
Return the AlCurveNode type identifier.
- class alias_api.AlCurveNodeJoinErrors
Curve node join errors.
Members:
BadData
Success
DuplicateCurve
Failure
BadCluster
NoAttributes
InvalidKeyPoint
CurveClosed
- property name
- class alias_api.AlCurveOnSurface
Interface to curves on surfaces geometry.
AlCurveOnSurface is the interface to Alias’ curve on surface data objects. Curves on surfaces are created and added to a surface by allocating an AlCurveOnSurface, then calling the create() method, and then calling AlSurfaceNode’s add_curve_on_surface() method to add it to a surface.
Curves on surfaces can also be read in from wire file and modified with this class. Curves on surfaces will be deleted when the surface they are attached to is deleted.
When constructing a curve on surface, you will notice that you need to specify a matrix that has dimensions [number_of_control_points][4]. Each point has 4 values, for u, v, zero and w. The “u” and “v” specify the point in U-V parametric space. The third component is zero because this component is not used. The “w” component is the homogeneous value, which is usually 1.0.
- control_point(self: alias_api.AlCurveOnSurface, index: int) Tuple[int, std::array<double,4>]
Given a valid index, return the value of the control point in ‘point’.
A valid index is one in the range 0 to numberOfControlPoints()-1.
Note the control point is represented by the quadruple [u v 0.0 w], where “u” and “v” represent the control point in U-V parameter space, the “0.0” is unused, and the “w” is the homogeneous coordinate.
- Parameters
index (int) – A valid index of the control point to return.
- Returns
- A tuple containing (1) the status code result of the operation:
Success - the control point was returned InvalidArgument - the index was not valid or ‘point’ was NULL InvalidObject - the curve was invalid Failure - an error occurred
and (2) the control point value.
- Return type
tuple
- copy_wrapper(self: alias_api.AlCurveOnSurface) alias_api.AlObject
Return an exact duplicate of this AlCurveOnSurface wrapper.
- degree(self: alias_api.AlCurveOnSurface) int
Return the degree of the curve. Return -1 if the curve is not valid.
- delete_object(self: alias_api.AlCurveOnSurface) int
Delete the AlCurveOnSurface from the Alias Universe and return the status of the performed operation.
- form(self: alias_api.AlCurveOnSurface) alias_api.AlCurveFormType
Return the form of the curve, which is kOpen, kClosed or kPeriodic.
If a curve on surface is periodic, it is tangent continuous at the point where it is closed. (If you use the “close” menu item in the interactive Alias pacakge, you actually make a curve periodic.) If a curve is periodic, it implies that it is closed. If a curve is kClosed, then it just means that its endpoints are coincident. Otherwise, the curve is kOpen.”
- in_trim(self: alias_api.AlCurveOnSurface) int
Returns True if this curve on surface is being used to trim the surface it is on, else False.
- insert(self: alias_api.AlCurveOnSurface, parametric_value: float) int
Insert an edit point into the curve.
- Parameters
parametric_value (float) – The parametric value of the new edit point on the curve.
- Returns
The status code result of the operation: Success - the operation was successful InvalidObject - the given object is not valid InvalidArgument - parametric_value is out of bounds Failre - an error occurred
- Return type
int(AlStatusCode)
- knot_value(self: alias_api.AlCurveOnSurface, index: int) float
Given a valid knot index, return the value of the knot in ‘knotValue’.
A valid knot index is one in the range of 0 - numberOfKnots()-1.
- Parameters
index (int) – A valid index of hte knot value to return.
- Returns
The value of the knot for the given index.
- Return type
float
- next_curve_on_surface(self: alias_api.AlCurveOnSurface) alias_api.AlCurveOnSurface
Return the next curve on surface in the list of curves on surfaces that are attached to a specific surface. Return None if there is no next curve on surface.
- number_of_control_points(self: alias_api.AlCurveOnSurface) int
Return the number of control points.
- number_of_knots(self: alias_api.AlCurveOnSurface) int
Return the number of knots (just number of spans + 1). Return -1 if the curve is not valid.
- number_of_spans(self: alias_api.AlCurveOnSurface) int
Return the number of spans in the curve. Return -1 if the curve is not valid.
- prev_curve_on_surface(self: alias_api.AlCurveOnSurface) alias_api.AlCurveOnSurface
Return the previous curve on surface in the list of curves on surfaces that are attached to a specific surface. Return None if there is no next curve on surface.
- real_number_of_knots(self: alias_api.AlCurveOnSurface) int
Return the actual number of knots on the curve. That is number_of_spans + 2*degree -1. Return -1 if the operation failed.
- reverse(self: alias_api.AlCurveOnSurface) int
Reverse the direction of this curve on surface.
- set_control_point(self: alias_api.AlCurveOnSurface, index: int, point: std::array<double, 4>) int
Given a valid index, set the value of the control point in ‘point’.
A valid index is one in the range 0 to numberOfControlPoints()-1.
Note the control point is represented by the quadruple [u v 0.0 w], where “u” and “v” represent the control point in U-V parameter space, the “0.0” is unused, and the “w” is the homogeneous coordinate.
- Parameters
index (int) – A valid index of the control point to set.
- Returns
The status code result of the operation: Success - the control point was returned InvalidArgument - the index was not valid or ‘point’ was NULL InvalidObject - the curve was invalid Failure - an error occurred
- Return type
int(AlStatusCode)
- set_knot_value(self: alias_api.AlCurveOnSurface, index: int, knot_value: float) int
Given a valid knot index, set the value of hte knot to be ‘knotValue’.
A valid knot index is one in the range of 0 - numberOfKnots()-1.
- Parameters
index (int) – A valid index of hte knot value to set.
knot_value (float) – The knot value to set.
- Returns
The status code result of the operation Success - the knot value was set InvalidArgument - the ‘index’ was not in the range 0…#knots-1 InvalidObject - the curve was invalid AlreadyCreated - the curve was already in a trim Failure - an internal error occured
- Return type
int(AlStatusCode)
- set_visible(self: alias_api.AlCurveOnSurface, visible: int) int
Set the visibility of the curve on surface.
- surface(self: alias_api.AlCurveOnSurface) AlSurface
Return the surface that this curve is on.
- type(self: alias_api.AlCurveOnSurface) alias_api.AlObjectType
Return the AlCurveOnSurface type identifier.
- visible(self: alias_api.AlCurveOnSurface) int
Return True if this curve is visible, else False if it is invisible.
- class alias_api.AlCurveOnSurfacePoint
Interface to Alias curve on surface points
A point can be created in the parametric space of a AlCurveOnSurface. This point can be queried for the curve normals, tangent, and position in world coordinate system. This class contains methods for creating, and moving the point in the parametric space of the curve on surface.
If the AlCurveOnSurface or its AlSurface is deleted, the curve on surface point created on it is automatically deleted.
- arc_length(self: alias_api.AlCurveOnSurfacePoint) Tuple[int, float]
Find the length of the curve on surface on which the point is present.
- Returns
A tuple (status, arg_len), where status [AlStatusCode] - the status code result
Success - the arc length was found InvalidObject - the point is not valid
arc_len [float] - the length of the curve
- Return type
tuple
- attached_to(self: alias_api.AlCurveOnSurfacePoint) alias_api.AlCurveOnSurface
Return the AlCurveOnSurface this AlCurveOnSurfacePoint is associated with.
- copy_wrapper(self: alias_api.AlCurveOnSurfacePoint) alias_api.AlObject
Return an exact duplicate of this AlCurveOnSurfacePoint wrapper.
- create(self: alias_api.AlCurveOnSurfacePoint, curve_on_surface: alias_api.AlCurveOnSurface, u: float) int
Create an AlCurveOnSurfacePoint on the given AlCurveOnSurface.
- Parameters
curve_on_surface (AlCurveOnSurface) – The curve on surface on which the point is to be created.
u (float) – The parameter at which point is to be created.
- Returns
The status code Success - the point was successfully created. AlreadyCreated - object has already been created. Failure - the point could not be created on the curve on surface. InvalidArgument - the curve is not a valid object.
- Return type
- normal1(self: alias_api.AlCurveOnSurfacePoint) Tuple[int, float, float, float]
Find the normal vector to the curve on surface at the point.
- Returns
A tuple (status, x, y, z), where status [AlStatusCode] - the status code result
Success - the normal was found InvalidObject - the point is not valid
x [float] - the x coordinate of the normal y [float] - the y coordinate of the normal z [float] - the z coordinate of the normal
- Return type
tuple
- normal2(self: alias_api.AlCurveOnSurfacePoint) Tuple[int, float, float, float]
Find the second normal vector to the curve on surface at the point.
- Returns
A tuple (status, x, y, z), where status [AlStatusCode] - the status code result
Success - the normal was found InvalidObject - the point is not valid
x [float] - the x coordinate of the second normal y [float] - the y coordinate of the second normal z [float] - the z coordinate of the second normal
- Return type
tuple
- parameter(self: alias_api.AlCurveOnSurfacePoint) Tuple[int, float]
Find the parameter value at which the point is present.
- Returns
A tuple (status, u), where status [AlStatusCode] - the status code result
Success - the parameter was found InvalidObject - the point is not valid
u [float] - the curve parameter where point is present
- Return type
tuple
- set_parameter(self: alias_api.AlCurveOnSurfacePoint, u: float) int
Move the position of a point created on a curve on surface.
- Parameters
u (float) – The parameter on the curve on surface where the point has to be moved.
- Returns
The status code result Success - the point was moved InvalidObject - the point is not valid
- Return type
AlStatuscode
- tangent(self: alias_api.AlCurveOnSurfacePoint) Tuple[int, float, float, float]
Find the tangent vector to the curve on surface at the point.
- Returns
A tuple (status, x, y, z), where status [AlStatusCode] - the status code result
Success - the tangent was found InvalidObject - the point is not valid
x [float] - the x coordinate of the tangent y [float] - the y coordinate of the tangent z [float] - the z coordinate of the tangent
- Return type
tuple
- type(self: alias_api.AlCurveOnSurfacePoint) alias_api.AlObjectType
Return the AlCurveOnSurfacePoint type identifier.
- world_position(self: alias_api.AlCurveOnSurfacePoint) Tuple[int, float, float, float]
Find the world coordinates of the point.
- Returns
A tuple (status, x, y, z), where status [AlStatusCode] - the status code result
Success - the coordinates was found InvalidObject - the point is not valid
x [float] - the x world coordinate of the point y [float] - the y world coordinate of the point z [float] - the z world coordinate of the point
- Return type
tuple
- class alias_api.AlCurvePoint
Interface to Alias curve points.
A point can be created in the parametric space of any AlCurve. This point can be queried for the curve normals, tangent, position in world coordinate system, arc length, and curvature information. This class contains methods for creating, and moving the curve point.
If the AlCurve is deleted, the curve point created on it is automatically deleted.
- arc_length(self: alias_api.AlCurvePoint) Tuple[int, float]
Find the length of the curve on which the point is present.
- Returns
A tuple (status, arg_len), where status [AlStatusCode] - the status code result
Success - the arc length was found InvalidObject - the point is not valid
arc_len [float] - the length of the curve
- Return type
tuple
- attached_to(self: alias_api.AlCurvePoint) alias_api.AlCurveNode
Return the AlCurveNode this AlCurvePoint is associated with.
- copy_wrapper(self: alias_api.AlCurvePoint) alias_api.AlObject
Return an exact duplicate of this AlCurvePoint wrapper.
- create(self: alias_api.AlCurvePoint, curve: alias_api.AlCurve, u: float) int
Create a point on the given curve.
- Parameters
curve (AlCurve) – The curve on which the point is to be created.
u (float) – The curve parameter at which point is to be created.
- Returns
The status code Success - the point was successfully created. AlreadyCreated - object has already been created. Failure - the point could not be created on the curve. InvalidArgument - the curve is not a valid object.
- Return type
- normal1(self: alias_api.AlCurvePoint) Tuple[int, float, float, float]
Find the normal vector to the curve at the point.
- Returns
A tuple (status, x, y, z), where status [AlStatusCode] - the status code result
Success - the normal was found InvalidObject - the point is not valid
x [float] - the x coordinate of the normal y [float] - the y coordinate of the normal z [float] - the z coordinate of the normal
- Return type
tuple
- normal2(self: alias_api.AlCurvePoint) Tuple[int, float, float, float]
Find the second normal vector to the curve at the point.
- Returns
A tuple (status, x, y, z), where status [AlStatusCode] - the status code result
Success - the normal was found InvalidObject - the point is not valid
x [float] - the x coordinate of the second normal y [float] - the y coordinate of the second normal z [float] - the z coordinate of the second normal
- Return type
tuple
- parameter(self: alias_api.AlCurvePoint) Tuple[int, float]
Find the parameter value at which the point is present.
- Returns
A tuple (status, u), where status [AlStatusCode] - the status code result
Success - the parameter was found InvalidObject - the point is not valid
u [float] - the curve parameter where point is present
- Return type
tuple
- radius(self: alias_api.AlCurvePoint) Tuple[int, float]
Find the radius of the curve at the point.
- Returns
A tuple (status, radius), where status [AlStatusCode] - the status code result
Success - the radius was found InvalidObject - the point is not valid
radius [float] - the radius of the curve at the point
- Return type
tuple
- set_parameter(self: alias_api.AlCurvePoint, u: float) int
Move the position of a point created on a curve.
- Parameters
u (float) – The parameter on the curve where the point has to be moved.
- Returns
The status code result Success - the point was moved InvalidObject - the point is not valid
- Return type
AlStatuscode
- tangent(self: alias_api.AlCurvePoint) Tuple[int, float, float, float]
Find the tangent vector to the curve at the point.
- Returns
A tuple (status, x, y, z), where status [AlStatusCode] - the status code result
Success - the tangent was found InvalidObject - the point is not valid
x [float] - the x coordinate of the tangent y [float] - the y coordinate of the tangent z [float] - the z coordinate of the tangent
- Return type
tuple
- type(self: alias_api.AlCurvePoint) alias_api.AlObjectType
Return the AlCurvePoint type identifier.
- world_position(self: alias_api.AlCurvePoint) Tuple[int, float, float, float]
Find the world coordinates of the point.
- Returns
A tuple (status, x, y, z), where status [AlStatusCode] - the status code result
Success - the coordinates was found InvalidObject - the point is not valid
x [float] - the x world coordinate of the point y [float] - the y world coordinate of the point z [float] - the z world coordinate of the point
- Return type
tuple
- class alias_api.AlDagNode
- // py::class_<AlDagNode, AlObject, AlPickable, std::unique_ptr<AlDagNode>>( m, “AlDagNode”, R”doc(
Basic Interface to Alias Dag Node objects.
This class encapsulates the basic functionality for creating, manipulating and deleting a dag node. A dag node is part of a tree-like hierarchical structure known as a directed acyclic graph or DAG. All dag nodes belong to a single DAG which is contained in the current universe. The head of the DAG is accessible by calling the AlUniverse::firstDagNode() static method.
Each dag node can be mutually attached to a previous and next dag node to form a list of dag nodes. This list can belong to a group (or parent) dag node. This list of dag nodes that belong to a group node are called “children” of the group node.
The purpose of a dag node is to contain information which defines particular affine transformations such as scale, rotation and translation. There is a specific fixed order in which the transformations are combined. There are methods for accessing each particular transformation and a method exists for obtaining the local tranformation matrix built from these transformations. For more information, see the description for the method local_transormation_matrix().
Classes derived from this class will refer to a particular type of object. For example, the AlCameraNode class is derived from AlDagNode and refers to AlCamera objects only. The shape, position and/or orientation of the object referred to is defined by combining the transformations for the dag node with all the transformations inherited from the dag nodes above it in the DAG. There is a method for obtaining the global tranformation matrix, which is built from the local transformations and all inherited transformations. For example, if dag node A is a parent of dag node B which is a parent of dag node C, then the global transformation of C is the matrix product [C]*[B]*[A], where [C], [B], and [A] are local transformations of each dag node.
A dag node can have some user-defined text associated with it and so there are methods for getting and setting the text.
Users cannot instantiate an AlDagNode directly. A derived class of an AlDagNode must be instantiated and then if required the create method of the class must be called. This will automatically insert the dag node into the DAG as a parent-less node. A dag node can be moved so that it is a sibling of any dag node in the DAG. Deleting a dag node removes the node from its list of siblings. For derived classes, deletion of a dag node will cause the deletion of the object that it refers to.
Since an AlDagNode simply contains transformations but does not refer to any transformable object, this class is of little practical use on its own. It is primarily an abstract base class from which other dag node classes are derived. NOTE that NULL dag nodes created in the Alias Interactive package are retrieved by this library as group nodes without children.
What does a transformation matrix mean? This matrix is the product of matrices for scale, rotate and translate. One useful piece of information from this matrix is the POSITION of an object. The first three values in the bottom row of the matrix (indices (3,0), (3,1), and (3,2)) represent the translation of the origin (0,0,0) in the x, y, and z directions. For instance, if you placed a sphere at (20, 30, 16) in the Alias interactive package, then moved it to (-30, 16, 28), you would notice that its global transformation matrix would have (-30, 16, 28) in the bottom row.
Additionally AlDagNode includes AlCopyOptions as a nested class. This class allows for the querying and setting of options for AlDagNode.copy_object(). When first instantiated an instance of AlCopyOptions will have it’s values set according to the values in Edit->Duplicate Object option box. It is not possible to set the values in this option box through this class.
- add_joint(self: alias_api.AlDagNode) int
Add an AlJoint to this dag node to maintain IK information.
- add_sibling_node(self: alias_api.AlDagNode, sibling: alias_api.AlDagNode) int
Insert an AlDagNode as the next sibling of this AlDagNode object.
- affected_transformation_matrix(*args, **kwargs)
Overloaded function.
affected_transformation_matrix(self: alias_api.AlDagNode, tm: alias_api.AlTM, matrix: alias_api.AlTM) -> int
Compute the transformation matrix for the object which is obtained by multiplying the local transformation matrix with the given AlTM ‘tm’.
affected_transformation_matrix(self: alias_api.AlDagNode, tm: alias_api.AlTM) -> Tuple[int, List[List[float[4]][4]]]
Compute the transformation matrix for the object which is obtained by multiplying the local transformation matrix with the given AlTM ‘tm’.
- bounding_box(self: alias_api.AlDagNode) Tuple[int, List[List[float[4]][8]]]
Returns the eight corners of the bounding box in world space.
- comment(self: alias_api.AlDagNode) Tuple[int, int, str]
Obtain the size and address of a block of textual data associated with the object.
- copy_object(*args, **kwargs)
Overloaded function.
copy_object(self: alias_api.AlDagNode, options: AlDagNode::AlCopyOptions = None) -> alias_api.AlDagNode
Copy this AlDagNode returning a pointer to the new copy.
copy_object(self: alias_api.AlDagNode, options: AlDagNode::AlCopyOptions, num_of_blind_data_ids_to_copy: int, blind_data_ids_to_copy: int) -> alias_api.AlDagNode
Return an exact duplicate of this AlDagNode wrapper.
- copy_transform(self: alias_api.AlDagNode, node: alias_api.AlDagNode) int
Copy the local transformation from the given node on to this node.
- copy_wrapper(self: alias_api.AlDagNode) alias_api.AlObject
Return an exact duplicate of this AlDagNode wrapper.
- create_symmetric_geometry(self: alias_api.AlDagNode) int
Create the symmetric geometry for this node if it is on a symmetric plane.
- delete_object(self: alias_api.AlDagNode) int
Delete the AlDagNode from the Alias Universe and return the status of the performed operation.
- do_updates(self: alias_api.AlDagNode, new_state: int = 1) int
The doUpdate flag is used to notify the system that you are finished performing. If this flag is True, then it is equivalent to sending out a ‘geometry modified’ message to the rest of the system.
- get_surface_orientation(self: alias_api.AlDagNode) Tuple[int, int]
Set the ‘opposite’ flag of the surface or mesh in ‘node’.
- global_transformation_matrix(*args, **kwargs)
Overloaded function.
global_transformation_matrix(self: alias_api.AlDagNode, matrix: alias_api.AlTM) -> int
Compute the global transformation matrix for the object.
global_transformation_matrix(self: alias_api.AlDagNode) -> Tuple[int, List[List[float[4]][4]]]
Compute the global transformation matrix for the object.
- inverse_global_transformation_matrix(*args, **kwargs)
Overloaded function.
inverse_global_transformation_matrix(self: alias_api.AlDagNode, matrix: alias_api.AlTM) -> int
Compute the inverse global transformation matrix for the object.
inverse_global_transformation_matrix(self: alias_api.AlDagNode) -> Tuple[int, List[List[float[4]][4]]]
Compute the inverse global transformation matrix for the object.
- is_a_construction_plane(self: alias_api.AlDagNode) int
Return True if the dag node is a construction plane.
- is_ancestor_an_instance(self: alias_api.AlDagNode) int
Returns True if this AlDagNode or one of its ancestors is an instance node, else False.
- is_display_mode_set(self: alias_api.AlDagNode, mode: alias_api.AlDisplayModeType) int
Return true if the specified display mode is set (on), else false.
- is_instanceable(self: alias_api.AlDagNode) int
Return True. An AlDagNode is instanceable by default, unless overridden by derived class.
- is_instanced(self: alias_api.AlDagNode) int
Return True if this is an instance node.
- layer(self: alias_api.AlDagNode) alias_api.AlLayer
Returns layer the node is assigned.
- local_rotate_by(self: alias_api.AlDagNode, x: float, y: float, z: float) int
Perform a dag node rotation based on the setting of the local axes.
- local_rotation_angles(self: alias_api.AlDagNode) Tuple[int, float, float, float]
These angles allow you to determine how the local rotation axis have been rotated from their initial position.
- local_rotation_axes(self: alias_api.AlDagNode) Tuple[int, List[float[3]], List[float[3]], List[float[3]]]
Return the vectors representing the local rotation axes for this node. These axes are the three axes vectors in the world space co-ordinates.
- local_transformation_matrix(*args, **kwargs)
Overloaded function.
local_transformation_matrix(self: alias_api.AlDagNode, matrix: alias_api.AlTM) -> int
Compute the local transformation matrix for the object.
local_transformation_matrix(self: alias_api.AlDagNode) -> Tuple[int, List[List[float[4]][4]]]
Compute the local transformation matrix for the object.
- local_translate_by(self: alias_api.AlDagNode, x: float, y: float, z: float) int
Perform a dag node translation based on the setting of the local axes.
- property name
Get or set the AlDagNode name.
- next_node(self: alias_api.AlDagNode) alias_api.AlDagNode
Return a pointer to the object’s next sibling AlDagNode or None if there is no next sibling.
- parent_node(self: alias_api.AlDagNode) AlGroupNode
Returns the parent group node.
- prev_node(self: alias_api.AlDagNode) alias_api.AlDagNode
Return a pointer to the object’s previous sibling AlDagNode or None if there is no next sibling.
- remove_blind_data(self: alias_api.AlDagNode, user_type: int) int
Remove the block of data of the given type from the object.
- remove_comment(self: alias_api.AlDagNode) int
Remove the block of text associated with this object from the object itself.
- remove_joint(self: alias_api.AlDagNode) int
Remove the AlJoint to this dag node to maintain IK information.
- rotate_pivot(self: alias_api.AlDagNode) Tuple[int, alPyMath::Vec3]
Returns a vector that represents the rotation pivot position in world space.
- rotation(self: alias_api.AlDagNode) Tuple[int, float, float, float]
Return the amount of rotation (in degrees) about the x, y, and z axes.
- scale(self: alias_api.AlDagNode) Tuple[int, float, float, float]
Return the amount of scale in the x, y, and z direction.
- scale_pivot(self: alias_api.AlDagNode) Tuple[int, alPyMath::Vec3]
Returns a vector that represents the scale pivot position in world space.
- search_across(self: alias_api.AlDagNode, name: str) alias_api.AlDagNode
Search across the DAG tree (starting at the current node), for a dag node with a specific ‘name’.
- search_below(self: alias_api.AlDagNode, name: str) alias_api.AlDagNode
Search the DAG tree (rooted at the child of the current node), for a dag node with a specific ‘name’.
- send_geometry_modified_message(self: alias_api.AlDagNode) int
Send out an update message notifying that the geometry of this dag node has been modified.
- set_blind_data(self: alias_api.AlDagNode, user_type: int, size: int, data: str) int
Associates a block of ‘data’ with the object.
- set_comment(self: alias_api.AlDagNode, size: int, data: str) int
Associates a block of textual ‘data’ with the object.
- set_display_mode(self: alias_api.AlDagNode, mode: alias_api.AlDisplayModeType, on: int) int
Set the display mode (by name) for this dag node.
- set_layer(*args, **kwargs)
Overloaded function.
set_layer(self: alias_api.AlDagNode, layer: alias_api.AlLayer) -> int
Set the layer on the dag node.
When a layer is set to an AlDagNode, the following settings are done:
All the child nodes of the current node are automatically assigned to the layer object.
All the parent nodes are automatically assigned to the default layer.
All the sibling nodes are unaffected.
- param layer
The layer object to be assigned to the AlDagNode
- type layer
AlLayer
- return
The status code result Success - the layer was assigned successfully InvalidArgument - the layer is invalid InvalidObject - the dag node was invalid
- rtype
int(AlStatusCode)
set_layer(self: alias_api.AlDagNode, layer_number: int) -> int
Set the layer ID on the dag node.
When a layer is set to an AlDagNode, the following settings are done:
All the child nodes of the current node are automatically assigned to the layer object.
All the parent nodes are automatically assigned to the default layer.
All the sibling nodes are unaffected.
- param layer_number
The layer number to be assigned to the AlDagNode
- type layer_number
int
- return
The status code result Success - the layer was assigned successfully InvalidArgument - the layer number is invalid InvalidObject - the dag node was invalid
- rtype
int(AlStatusCode)
- set_local_rotation_angles(self: alias_api.AlDagNode, x: float, y: float, z: float) int
Setting the local rotation angles is the only means by which the local rotations axes can be modified.
- set_local_rotation_axes(self: alias_api.AlDagNode, arg0: List[float[3]], arg1: List[float[3]], arg2: List[float[3]]) int
Set the local rotation axes of this dag node to the given world space vectors.
- set_rotate_pivot(*args, **kwargs)
Overloaded function.
set_rotate_pivot(self: alias_api.AlDagNode, p: alPyMath::Vec3) -> int
Set the rotate pivot.
- param p
The rotate pivot position in world space.
- type p
Vec3
- return
The status code result of the operation.
- rtype
int(AlStatusCode)
set_rotate_pivot(self: alias_api.AlDagNode, x: float, y: float, z: float) -> int
Set the rotate pivot.
- param x
The x component of the rotate pivot position in world space.
- type x
float
- param y
The y component of the rotate pivot position in world space.
- type y
float
- param z
The z component of the rotate pivot position in world space.
- type z
float
- return
The status code result of the operation.
- rtype
int(AlStatusCode)
- set_rotation(self: alias_api.AlDagNode, x: float, y: float, z: float) int
Set the amount of rotation (in degress) about the x, y, z axes. The rotation will be done after the scale transformation and before the final local translation.
- set_scale(self: alias_api.AlDagNode, x: float, y: float, z: float) int
Set the local scale vector. The scale transformation will be done before the local rotations. There is no restriction on the values of the components of the scale vector.
- set_scale_pivot(*args, **kwargs)
Overloaded function.
set_scale_pivot(self: alias_api.AlDagNode, p: alPyMath::Vec3) -> int
Set the scale pivot.
- param p
The scale pivot position in world space.
- type p
Vec3
- return
The status code result of the operation.
- rtype
int(AlStatusCode)
set_scale_pivot(self: alias_api.AlDagNode, x: float, y: float, z: float) -> int
Set the scale pivot.
- param x
The x component of the scale pivot position in world space.
- type x
float
- param y
The y component of the scale pivot position in world space.
- type y
float
- param z
The z component of the scale pivot position in world space.
- type z
float
- return
The status code result of the operation.
- rtype
int(AlStatusCode)
- set_surface_orientation(self: alias_api.AlDagNode, flag: int) int
Set the ‘opposite’ flag of the surface or mesh in ‘node’.
- set_translation(self: alias_api.AlDagNode, x: float, y: float, z: float) int
Set the final local translation vector. The translation transformation will be done after rotations.
- set_world_translation(self: alias_api.AlDagNode, x: float, y: float, z: float) int
Set the final world translation vector.
- translation(self: alias_api.AlDagNode) Tuple[int, float, float, float]
Return the final local translation vector.
- type(self: alias_api.AlDagNode) alias_api.AlObjectType
Return the AlDagNode type identifier.
- update_draw_info(self: alias_api.AlDagNode) int
Force the internal draw information to be updated to match the dag node’s geometry.
- version(self: alias_api.AlDagNode) int
Return the version of the dag node.
- class alias_api.AlDeviationLocator
Interface to Alias deviation locator.
A deviation locator finds and displays the shortest distance between two curves, from a given point on the first curve to the second curve. The two curves can be any of the AlCurve or AlCurveOnSurface. This class contains methods to create the locator, query the minimum distance, and set the display attributes in the Alias windows. If any two curves on which this locator depends is deleted, this locator is automatically deleted.
- attached_to(self: alias_api.AlDeviationLocator) Tuple[int, alias_api.AlObject, alias_api.AlObject]
Returns the two objects that are used to create the deviation locator. This locator can be attached to curves on surfaces or curve nodes.
- Returns
A tuple containing: (1) the status code result of the operation:
Success - the attached to objects were found InvalidObject - the object is not valid Failure - the method failed
the first object
the second object
- copy_wrapper(self: alias_api.AlDeviationLocator) alias_api.AlObject
Return an exact duplicate of this AlDeviationLocator wrapper.
- create(*args, **kwargs)
Overloaded function.
create(self: alias_api.AlDeviationLocator, base_curve: alias_api.AlCurve, target_curve: alias_api.AlCurve, base_param: float = 0.0) -> int
Create a Deviation locator between two curves.
- param base_curve
The curve from which the deviation is calculated
- type base_curve
AlCurve
- param target_curve
The curve to which the minimum deviation is calculated
- type target_curve
AlCurve
- param base_param
The parameter on baseCurve from which the minimum deviation to the target curve is calculated.
- type base_paramu
float
- return
The status code result of the operation: Success - the deviation locator was successfully created. Failure - the locator was not created AlreadyCreated - object has already been created InvalidArgument - the baseCurve or targetCurve is not valid.
- rtype
AlStatusCode
create(self: alias_api.AlDeviationLocator, base_curve: alias_api.AlCurveOnSurface, target_curve: alias_api.AlCurve, base_param: float = 0.0) -> int
Create a Deviation locator between a curve on surface an a curve.
- param base_curve
The curve on surface from which the deviation is calculated
- type base_curve
AlCurveOnSurface
- param target_curve
The curve to which the minimum deviation is calculated
- type target_curve
AlCurve
- param base_param
The parameter on baseCurve from which the minimum deviation to the target curve is calculated.
- type base_paramu
float
- return
The status code result of the operation: Success - the deviation locator was successfully created. Failure - the locator was not created AlreadyCreated - object has already been created InvalidArgument - the baseCurve or targetCurve is not valid.
- rtype
AlStatusCode
create(self: alias_api.AlDeviationLocator, base_curve: alias_api.AlCurveOnSurface, target_curve: alias_api.AlCurveOnSurface, base_param: float = 0.0) -> int
Create a Deviation locator between two curves on surface.
- param base_curve
The curve on surface from which the deviation is calculated
- type base_curve
AlCurveOnSurface
- param target_curve
The curve on surfaceto which the minimum deviation is calculated
- type target_curve
AlCurveOnSurface
- param base_param
The parameter on baseCurve from which the minimum deviation to the target curve is calculated.
- type base_paramu
float
- return
The status code result of the operation: Success - the deviation locator was successfully created. Failure - the locator was not created AlreadyCreated - object has already been created InvalidArgument - the baseCurve or targetCurve is not valid.
- rtype
AlStatusCode
- deviation(self: alias_api.AlDeviationLocator) Tuple[int, float]
Finds the minimum deviation as calculated by the deviation locator
- Returns
The status code result of the operation: Success - the deviation was found InvalidObject - the object is not valid
- Return type
- deviation_components(self: alias_api.AlDeviationLocator) Tuple[int, float, float, float]
Finds the components of minimum deviation as calculated by the deviation locator
- Returns
The status code result of the operation: Success - the deviation components were found InvalidObject - the object is not valid
- Return type
- left_justify(self: alias_api.AlDeviationLocator) Tuple[int, int]
Find whether the text of deviation locator is left justified or right justified.
- Returns
A tuple containing: (1) the status code result of the operation:
Success - the justification was found InvalidObject - the object is not valid
a boolean value indicating whether the text is left justified
- Return type
tuple<AlStatusCode, bool>
- length(self: alias_api.AlDeviationLocator) Tuple[int, float]
Find the length of the leader line in the deviation locator.
- Returns
The status code result of the operation: Success - the length was found successfully InvalidObject - the object is not valid
- Return type
- offset(self: alias_api.AlDeviationLocator) Tuple[int, float, float, float]
Find the components of display offset in the deviation locator
- Returns
A tuple containing: (1) the status code result of the operation:
Success - the offset was found successfully InvalidObject - the object is not valid
the offset x z value
the offset y value
the offset z value
- parameter(self: alias_api.AlDeviationLocator) Tuple[int, float]
Get the curve parameter where deviation locator is located.
- Returns
A tuple containing: (1) the status code result of the operation:
Success - the parameter was found
the curve parameter at the locator
- Return type
tuple<AlStatusCode, float>
- parameter_target_curve(self: alias_api.AlDeviationLocator) Tuple[int, float]
Finds the parameter on the targetCurve which is at the minimum deviation. to the baseCurve
- param
value: The value of the parameter on targetCurve.
- Returns
The status code result of the operation: Success - the parameter was found InvalidObject - the object is not valid
- Return type
- set_left_justify(self: alias_api.AlDeviationLocator, left_justify: int) int
Set the justification of the text for the Deviation locator.
The text can be right justified or left justified.
- Parameters
left_justify (bool) – A value of true makes the text left justified and a value false makes it right justified.
- Returns
The status code result of the operation: Success - setting was successful InvalidObject - the object is not valid
- Return type
- set_length(self: alias_api.AlDeviationLocator, len: float) int
Set the length of the leader line in the deviation display in the modeling windows
- Parameters
len (float) – The length of the leader line
- Returns
The status code result of the operation: Success - the length was set successfully InvalidObject - the object is not valid
- Return type
- set_offset(self: alias_api.AlDeviationLocator, x: float, y: float, z: float) int
Set the components of display offset in the deviation locator.
The display offset is the relative vector between the deviation locator and start of the leader line which displays the deviation value
- Parameters
x (float) – The offset x component
y (float) – The offset y component
z – The offset z component
- set_parameter(self: alias_api.AlDeviationLocator, u: float) int
Set the curve parameter at which the deviation locator is located.
- Parameters
u (float) – The curve parameter
- Returns
The status code result of the operation: Success - the parameter was set InvalidObject - the object is not valid
- Return type
- type(self: alias_api.AlDeviationLocator) alias_api.AlObjectType
Return the AlDeviationLocator type identifier.
- class alias_api.AlDisplayModeType
Display mode types.
Members:
GeomEditPoints
BoundingBox
Invisible
GeomKeyPoints
Template
Dashed
ConstructionPlane
GeomHull
GeomCVs
CompressedSbd
- property name
- class alias_api.AlDistanceLocator
Displays the distance between two locators.
This locator is used to display and find the distance between any two point locators (AlPointLocator). If any of the two point locators on which this locator depends is deleted, this locator is automatically deleted. This class contains methods to create the locator, query the distance, and set the display attributes of the locator.
- copy_wrapper(self: alias_api.AlDistanceLocator) alias_api.AlObject
Return an exact duplicate of this AlDistanceLocator wrapper.
- create(self: alias_api.AlDistanceLocator, start_point: AlPoint, end_point: AlPoint, true_display: int = True) int
Create a new AlDistanceLocator in the Alias Universe.
- distance(self: alias_api.AlDistanceLocator) Tuple[int, float, float, float]
- end_point(self: alias_api.AlDistanceLocator) AlPoint
Returns the ending Point of this Distance locator. However, if the distance locator is not valid, None is returned.
- length(self: alias_api.AlDistanceLocator) Tuple[int, float]
Calculate the length (in centimeters) of the distance vector.
- offset(self: alias_api.AlDistanceLocator) Tuple[int, float]
Get the offset of the locator display.
- Parameters
value (float) – The display offset.
- Returns
The status code result of the operation: Success - the offset was found InvalidObject - the object is not valid
- set_offset(self: alias_api.AlDistanceLocator, offset: float) int
Set the offset in the locator display.
- Parameters
offset (float) – The value of the offset.
- Returns
The status code result of the operation: Success - the offset was set InvalidObject - the object is not valid
- set_true_display(self: alias_api.AlDistanceLocator, value: int) int
Set the display type of this Distance locator. If the distance locator is not valid, None is returned.
- start_point(self: alias_api.AlDistanceLocator) AlPoint
Returns the starting Point of this Distance locator. However, if the distance locator is not valid, None is returned.
- true_display(self: alias_api.AlDistanceLocator) Tuple[int, int]
Returns 1 if true display is set, else 0.
- type(self: alias_api.AlDistanceLocator) alias_api.AlObjectType
Return the AlDistanceLocator type identifier.
- class alias_api.AlEnvironment
Base object for representing shader environment data
This class encapsulates the basic functionality for checking and setting the name of an environment. It also encapsulates accessing the textures that a particular environment refers to, and the animation on the environment. When the wire file is read, the environment contained therein are created as an AlEnvironment class object. This environment object is accessible through the AlUniverse class.
An environment object may reference textures. The first_texture and next_texture methods are used to access these textures.
first_texture() returns the first texture that the environment object references. next_texture() moves from a given referenced texture to the next texture in order, as related to the environment object. (See the similar methods for the AlTexture/AlShader classes.)
The animation on the environment can be accessed through the first_channel() and next_channel() methods. All the channels on the environment can be deleted by calling deleteAnimation().
The environment parameters can be accessed through the parameter() and setParameter() methods. Each shader has a specific set of parameters that are valid for it that depend on its type. The full list of environment parameters can be seen in the file AlAnim.h. For example, all parameters specific to the Blinn shader have names of the form kFLD_SHADING_BLINN_*. Parameters common to all shaders have the form kFLD_SHADING_COMMON_*. All parameters are treated as doubles even though this may not necessarily be what they are. This is done to make the interface as simple and consistent as possible.
The user can neither create nor destroy an AlEnvironment class object at this time.
- add_texture(self: alias_api.AlEnvironment, field_name: str, texture_type: str) Tuple[int, alias_api.AlTexture]
Add a texture to the field of the AlEnvironment.
- apply_iterator_to_textures(self: alias_api.AlEnvironment, iter: AlIterator, retcode: int) int
Applies the given AlIterator to all textures of this environment. The second argument will be set to the return value of the last application of the iterator’s function.
- copy_wrapper(self: alias_api.AlEnvironment) alias_api.AlObject
Return an exact duplicate of this AlEnvironment wrapper.
- delete_object(self: alias_api.AlEnvironment) int
Delete the Alias shader object and return the status code of the delete operation.
- fields(self: alias_api.AlEnvironment) List[alias_api.AlShadingFields]
Returns a list of ShadingFieldItems, each of which contains an ShadingFields value valid for this environment.
- first_texture(self: alias_api.AlEnvironment) alias_api.AlTexture
Return the first texture.
- mapped_fields(self: alias_api.AlEnvironment) List[str]
Return a list of all the mapped fields used by the environment.
- property name
Get or set the AlEnvironment name.
- next_texture(self: alias_api.AlEnvironment, cur_texture: alias_api.AlTexture) alias_api.AlTexture
Return the next texture. WARNING: this function may be broken and only returns the first texture.
- parameter(self: alias_api.AlEnvironment, parameter_name: alias_api.AlShadingFields) Tuple[int, float]
Finds the value of a given texture field.
- remove_texture(self: alias_api.AlEnvironment, field_name: str) int
Remove the texture from the field of the AlEnvironment.
- set_parameter(self: alias_api.AlEnvironment, parameter_name: alias_api.AlShadingFields, value: float) int
Changes the value of the texture field.
- type(self: alias_api.AlEnvironment) alias_api.AlObjectType
Return the AlEnvironment type identifier.
- class alias_api.AlFace
Interface to Alias face curves.
An AlFace is derived from AlCurve and inherits AlCurve’s public methods.
AlFace objects are created independently from the AlFaceNode, and then added to the AlFaceNode afterwards. An AlFaceNode requires one valid AlFace object in order for it to be created. Other faces can be added to the list of faces under the AlFaceNode afterwards using AlFaceNode.add_face().
Deleting a face can cause one of two things to happen. If the AlFace is not under an AlFaceNode, or it is one of several faces under an AlFaceNode, then only the face will be deleted. If the AlFace is the only face under the AlFaceNode, then the AlFaceNode will also be deleted.
Each face curve must be planar and each face curve must lie in the same plane as all the others. In addition to the parent class (AlCurve) methods this class allows you to walk through the list of the face curves that make up the face.
All AlFace objects will have at least one shader attached to them. These can be accessed through the firstShader and nextShader methods.
- copy_wrapper(self: alias_api.AlFace) alias_api.AlObject
Return an exact duplicate of this AlFace wrapper.
- delete_object(self: alias_api.AlFace) int
Delete the AlFace from the Alias Universe and return the status of the performed operation.
- face_node(self: alias_api.AlFace) AlFaceNode
Return the face node associated with this face.
- first_shader(self: alias_api.AlFace) AlShader
Return the first shader that this face object references.
- get_layered_shader(self: alias_api.AlFace) AlLayeredShader
Return the layered shader that this face object references.
- get_switch_shader(self: alias_api.AlFace) AlSwitchShader
Return the switch shader that this face object references.
- next_face(self: alias_api.AlFace) alias_api.AlFace
Return a pointer to the next face in the list of faces.
- next_shader(self: alias_api.AlFace, shader: AlShader) AlShader
Return the shader after the given shader in the shader list. Specify None as the shader parameter will return the first shader.
- prev_face(self: alias_api.AlFace) alias_api.AlFace
Return a pointer to the previous face in the list of faces.
- type(self: alias_api.AlFace) alias_api.AlObjectType
Return the AlFace type identifier.
- class alias_api.AlFaceNode
Interface to the dag node that gives access to faces.
AlFaceNode is the class used to access faces in the dag. Faces can be created from scratch or read in from a wire file and accessed via the first_face() method. Faces are a collection of curves that all lie in the same plane. An AlFaceNode points to an AlFace, which points to the next face in the collection etc…
Add faces to the collection with the add_face() method and remove them with the removeFace() method. In order to access the list of faces, you walk through the face list with AlFace methods next_face() and prev_face().
There are two ways to delete an AlFaceNode. If the AlFaceNode.delete_object() method is called, then this node’s AlFace objects are all deleted. If this node only has one face and its delete_object() method is called, then this node is deleted as well.
- add_face(self: alias_api.AlFaceNode, face: alias_api.AlFace) int
Add a face to the end of the list of faces. The face must not already belong to another face node.
- convert_to_trimmed_surface(self: alias_api.AlFaceNode, world_space: int = False) alias_api.AlSurface
Return an AlSurface that represents the AlFace geometry converted to a trimmed surface. Return None if the AlFace geometry is invalid for any reason. A trimmed surface will not be created if the AlFace curves are non-planar or intersecting.
- copy_wrapper(self: alias_api.AlFaceNode) alias_api.AlObject
Return an exact duplicate of this AlFaceNode wrapper.
- create(self: alias_api.AlFaceNode, face: alias_api.AlFace) int
This method allocates teh dag node for the AlFaceNode. It adds the given face as the first face of the face node.
- first_face(*args, **kwargs)
Overloaded function.
first_face(self: alias_api.AlFaceNode) -> alias_api.AlFace
Return the first face in the list of faces.
first_face(self: alias_api.AlFaceNode, tm: alias_api.AlTM) -> alias_api.AlFace
Return the first face in the list of faces and update the ‘tm’ with the face node’s transformation matrix.
- normal(self: alias_api.AlFaceNode) Tuple[int, float, float, float]
Attempts to calculate the overall normal of all teh face curves in this face.
- remove_face(self: alias_api.AlFaceNode, face: alias_api.AlFace) int
Remove a face from the list of faces. This must not be the last face under the face node. When the face is removed from under the face node, it is no longer part of the universe taht would be stored.
- type(self: alias_api.AlFaceNode) alias_api.AlObjectType
Return the AlFaceNode type identifier.
- class alias_api.AlFileType
File types
Members:
Dwg
Unknown
ProRender
Wire
Dxf
Vdafs
Iges
Edf
Tri
C4x
Vdais
Jamais
Quad
Inventor
Stl
Obj
Fbx
Unused
Epsf
Illustrator
JT
Slc
Acis
CatiaV5
Nx
- property name
- class alias_api.AlGroupNode
A dag node which can contain a list of dag nodes.
This class encapsulates the functionality for creating, manipulating and deleting a group node. A group node is a dag node which refers to a list of child dag nodes. It is this type of dag node which allows the hierarchical grouping of dag nodes.
The transformations which can be defined for a group node are inherited by each child dag node. This means that a group node’s transformations are combined with a child node’s transformations to define a global transformation for the object that the child node refers to.
A group node’s list of child dag nodes can be shared by more than one group node. If a group node’s list of child nodes is shared by another group node, both group nodes are considered “instanced”. This can be achieved by using the createInstance() method to create an instanced group node from another group node. The instanced group node is created as a sibling of the group node. There are methods for finding the next and previous instanced group node among its siblings and for determining whether a group node is an instanced node.
To create a group node, the user must call the constructor and then the create method for an AlGroupNode object. If a group node is not an instanced group node, deleting it will cause the deletion of all the child dag nodes and the deletion of any objects the child dag nodes refer to. Deleting an instanced group node will not cause all of its child nodes to be deleted since the list of child nodes is shared by another instanced group node.
Note on AlGroupNode.delete_object():
If a group node is an instanced group node, then only the group node is removed from its list of siblings and is deleted. The list of child dag nodes an instanced dag node refers to is not deleted. If this group node is not an instanced group node (i.e. none of its siblings share its list of child dag nodes), then the group node is removed from list of siblings it belongs to and the group node and every child node of the group node is deleted.
- add_child_node(self: alias_api.AlGroupNode, child_node: alias_api.AlDagNode) int
Adds an AlDagNode to the end of the list of child AlDagNodes. If the AlDagNode is already a child of this object, then nothing is done. Otherwise, the AlDagNode is removed from the list of siblings it belongs to and added to the end of this object’s list of children. If the AlDagNode is an AlGroupNode and it has siblings which are instanced AlGroupNodes, those instanced siblings are also made children of this object. It is illegal for the AlDagNode argument to be NULL or for it to not have had its create() method called.
- Parameters
child (AlDagNode) – the AlDagNode to be made a child of this object
- Returns
The status code result sSuccess - the argument is now a child of this object sInvalidArgument - ‘child’ was not valid sFailure - the AlDagNode could not be made a child of this object sInvalidObject - the groupnode was invalid
- Return type
int(AlStatusCode)
- add_children(self: alias_api.AlGroupNode, children: List[alias_api.AlDagNode]) int
Adds an AlDagNode to the end of the list of child AlDagNodes. If the AlDagNode is already a child of this object, then nothing is done. Otherwise, the AlDagNode is removed from the list of siblings it belongs to and added to the end of this object’s list of children. If the AlDagNode is an AlGroupNode and it has siblings which are instanced AlGroupNodes, those instanced siblings are also made children of this object. It is illegal for the AlDagNode argument to be NULL or for it to not have had its create() method called.
- Parameters
children (List[AlDagNode]) – the children to add to this object.
- Returns
The status code result sSuccess - the argument is now a child of this object sInvalidArgument - ‘child’ was not valid sFailure - the AlDagNode could not be made a child of this object sInvalidObject - the groupnode was invalid
- Return type
int(AlStatusCode)
- apply_iterator_to_children(self: alias_api.AlGroupNode, arg0: AlIterator, arg1: int) int
Apply the iterator to each of the children in this AlGroupNode.
- child_node(*args, **kwargs)
Overloaded function.
child_node(self: alias_api.AlGroupNode) -> alias_api.AlDagNode
Return the first AlDagNode in the list of child AlDagNodes.
child_node(self: alias_api.AlGroupNode, arg0: alias_api.AlTM) -> alias_api.AlDagNode
Return the first AlDagNode in the list of child AlDagNodes. The AlTM will be updated with the group node’s transform matrix.
- copy_wrapper(self: alias_api.AlGroupNode) alias_api.AlObject
Return an exact duplicate of this AlGroupNode wrapper.
- create(self: alias_api.AlGroupNode) int
Initialize the AlGroupNode in the Alias Universe.
- is_instance_node(self: alias_api.AlGroupNode) int
Return True if this object shares its list of children with another sibling AlGroupNode.
- is_instanceable(self: alias_api.AlGroupNode) int
Return False if this group node contains a non-instanceable dag node, else True.
- next_instance(self: alias_api.AlGroupNode) alias_api.AlGroupNode
Return a pointer to the object’s next sibling node in the list which is an instanced group node.
- prev_instance(self: alias_api.AlGroupNode) alias_api.AlGroupNode
Return a pointer to the object’s previous sibling node in the list which is an instanced group node.
- type(self: alias_api.AlGroupNode) alias_api.AlObjectType
Return the AlGroupNode type identifier.
- class alias_api.AlHashable
Base class for objects which can be inserted into an AlDictionary.
AlHashable provides a contract for any class which wishes to be stored in an AlDictionary, namely the necessity of providing a hash key and the ability to be stored in a list.
- class alias_api.AlIKHandle
Interface to Inverse Kinematics Handles.
A skeleton is just a collection of joint dag nodes that have no particular special behaviour until IK handles are applied to them. In order to use inverse kinematics in Alias, you have to create IK handles that define paths along skeletons to be constrained by IK.
An IK handle is defined by two joints. The end effector is the point on the skeleton that is free to move, and the root is the anchor point on the skeleton. When the end effector is moved, the rotations on all joints leading up to the root are constrained to provide an appropriate IK solution.
The IK handle also specifies the solver that will be used. There are two kinds of IK solvers in Alias. The single-chain solver is analytic and always produces a unique solution. The multi-chain solver is iterative, and the solution depends on the starting state.
Furthermore, single-chain handles are never allowed to overlap other IK handles, except for the root of one handle meeting the end effector of another. Multi-chain handles, on the other hand, are allowed to interfere with one another, the result being a best-possible IK solution.
Single-chain IK handles are always position handles - the rotations of the joints above the end-effector, and below or at the root, are transformed to meet the position of the end-effector.
Multi-solver IK handles can be position or orientation goals or both. An orientation goal will try to match the orientation of the bone immediately above the end-effector to the orientation of the IK handle.
Also, multi-solver IK handles have weights. When several multi-solver IK handles overlap, the weights on these handles are used to determine the relative effect each solution has on the overall rotation of the joints in the affected skeleton.
- copy_wrapper(self: alias_api.AlIKHandle) alias_api.AlObject
Return an exact duplicate of this AlIKHandle wrapper.
- type(self: alias_api.AlIKHandle) alias_api.AlObjectType
Return the AlIKHandle type identifier.
- class alias_api.AlIKHandleNode
Interface to dag nodes of IK handles.
All AlIKHandles have an associated AlDagNode which define their position and orientation. This class provides an interface to the AlDagNode above an AlIKHandle.
The position of this AlDagNode defines the goal position for solving the inverse kinematics. The rotation of this AlDagNode has a special function depending on the solver type of the IK handle below.
Single-chain: the three rotational axes get mapped to a single plane rotation and two pole rotations, depending on the rotation order defined for this IK handle. In particular, the first axis in the handle’s rotation order controls the rotation of the plane passing through the root and end-effector nodes, which is used to orient the single-chain solution. The second and third axes in the rotation order reorient the up vector of the IK handle. The IK handle up vector defines the axis around which the single-chain IK solution will flip when the end-effector crosses over the line passing through the root and the end-effector. The IK handle rotation order can be accessed through the AlIKHandle class.
Multi-solver: if the IK handle has an orientation goal, rotating the IK handle controls the orientation of the bone directly above the end-effector. A solution will be found such that the local axes of the end-effector joint attempt to match the local axes of the IK handle.
- copy_wrapper(self: alias_api.AlIKHandleNode) alias_api.AlObject
Return an exact duplicate of this AlIKHandleNode wrapper.
- ik_handle(*args, **kwargs)
Overloaded function.
ik_handle(self: alias_api.AlIKHandleNode) -> alias_api.AlIKHandle
ik_handle(self: alias_api.AlIKHandleNode, arg0: alias_api.AlTM) -> alias_api.AlIKHandle
- type(self: alias_api.AlIKHandleNode) alias_api.AlObjectType
Return the AlIKHandleNode type identifier.
- class alias_api.AlIterator
A base class used to derive iterators for performing tasks on elements of a list.
Many classes return the first element of a list, which is then traversed with some operation performed on each element of the list. This class encapsulates this functionality making it very easy to write code which performs operations on members of a list.
To use this class the method “func” should be overloaded. On success func() should return zero which will cause the iteration to continue with the next element in the list. A non-zero return value will cause the iteration to stop. The returned value will be returned through the second reference argument in the applyIterator() method. In general the applyIterator() methods return sSuccess even when func() returns non-zero. A return other than sSuccess indicates that the applyIterator() method failed to function properly.
Two types of iterators are defined. The first passes in an AlObject* to the func(). The second iterator AlIteratorWithParent passes in the AlObject* and the AlDagNode* parent of the object. Note that if an AlIteratorWithParent is used and the AlObject is a shader then the AlDagNode pointer will be null.
Iterators should be used to examine or set data in the visited objects, but should not be used to delete the objects.
- func(self: alias_api.AlIterator, obj: alias_api.AlObject) int
Pure virtual function that subclass must override to provide functionality to apply to iterator.
- class alias_api.AlKeyframe
Basic interface to Alias keyframes on parameter curve actions.
AlKeyframe represents a keyframe belonging to an AlParamAction. The keyframe class does not have a create method. New keyframes are created using the AlParamAction.add_key_frame() methods. (this is faster than creating the keyframes, then adding them to the paramaction).
A keyframe cannot belong to more than one action. Thus attempting to add a keyframe that has already been added to an AlParamAction will fail.
If an AlKeyframe is deleted and if the AlKeyframe belongs to an AlParamAction and it is the last keyframe of that parameter curve action, then the AlParamAction will also be deleted. This ensures that no AlParamAction parameter curves will exist with no keyframes.
If a keyframe is added to an AlParamAction, and another keyframe already exists in that AlParamAction with the same location as the keyframe to be added, then the existing keyframe in the AlParamAction will be deleted.
The method that applies tangent types to a keyframe (i.e. setTangentTypes()) does not make much sense if the keyframe is not part of an AlParamAction. It is best to add all the desired keyframes to an AlParamAction, and then walk the list of keyframes, and calling the tangent methods.
You can lock a keyframe by calling the method AlKeyframe::setLock(TRUE). If an AlKeyframe is locked, then none of the AlKeyframe methods that change its location, value or tangents will succeed. The keyframe is non-modifiable. You can unlock the keyframe again by calling AlKeyframe::setLock(FALSE).
- copy_wrapper(self: alias_api.AlKeyframe) alias_api.AlObject
Return an exact duplicate of this AlKeyframe wrapper.
- delete_object(self: alias_api.AlKeyframe) int
This method deletes a keyframe. If the keyframe is part of an action, then the keyframe will be removed from the action’s list of keyframes. If the keyframe is the last keyframe in an action, the action will also be deleted.
- Returns
The status code result of the operation: Success - the object was deleted Failure - the object could not be deleted InvalidObject - the object was invalid
- Return type
- in_tangent(self: alias_api.AlKeyframe) float
This method returns the value of the in-tangent of the keyframe. The value will be between 90.0 and -90.0, where 0.0 represents a flat (horizontal) tangent pointing to the left, 90.0 means the tangent points straight up, and -90.0 means the tangent points straight down. 0.0 is returned in the case of an error.
- is_locked(self: alias_api.AlKeyframe) int
This method returns TRUE if the keyframe is locked, FALSE if it is not. A locked keyframe means that you cannot change its time, value or tangents. FALSE is returned in the case of an error.
- location(self: alias_api.AlKeyframe) float
This method returns the time value for this keyframe, or 0.0 if the keyframe is invalid.
- next(self: alias_api.AlKeyframe) alias_api.AlKeyframe
If this keyframe belongs to a parameter curve action (AlParamAction), then this method will return the next AlKeyframe in the action (or NULL if this keyframe is the last keyframe in the action). If this keyframe does not belong to an action, NULL is returned.
- out_tangent(self: alias_api.AlKeyframe) float
This method returns the value of the out-tangent of the keyframe. The value will be between 90.0 and -90.0, where 0.0 represents a flat (horizontal) tangent pointing to the right, 90.0 means the tangent points straight up, and -90.0 means the tangent points straight down. This method returns 0.0 if the keyframe is invalid.
- prev(self: alias_api.AlKeyframe) alias_api.AlKeyframe
If this keyframe belongs to a parameter curve action (AlParamAction), then this method will return the previous AlKeyframe in the action (or NULL if this keyframe is the first keyframe in the action). If this keyframe does not belong to an action, NULL is returned.
- set_in_tangent(self: alias_api.AlKeyframe, in_tangent: float) int
This method sets the in-tangent of the keyframe to the given value. The tangent value must be in the range -90.0 < inTangent < 90.0 If the given tangent value is outside this range, it is clamped to within this range.
This method requires the AlKeyframe to have been attached to an AlParamAction, otherwise an assertion will fail.
- Parameters
in_tangent (float) – the angle in degrees to which the keyframe’s in tangent should be set.
- Returns
The status code result of the operation: Success - keyframe’s inTangent was successfully changed Failure - keyframe is locked, thus cannot be changed or failed to make tangent FIXED InvalidObject - the keyframe was invalid
- Return type
- set_location(self: alias_api.AlKeyframe, new_time: float, recompute: int = True) int
This method sets the time of the keyframe to be the value given by newTime.
If this keyframe is part of a parameter curve action, the list of keyframes may be reordered to reflect the new position of the keyframe. If the given newTime has the same value as the time of an existing keyframe, then this keyframe will not be moved.
- Parameters
new_time (float) – the new value for the time of the keyframe
recompute (bool) – whether or not to remcompute tangents now
- Returns
The status code result of the operation: Success - keyframe’s time was successfully changed Failure - keyframe is locked, thus cannot be changed InvalidObject - the keyframe was invalid
- Return type
- set_lock(self: alias_api.AlKeyframe, flag: int) int
This method sets the lock flag of a keyframe. If the keyframe is locked, its time, value and tangents will not be modifiable.
- Parameters
flag (bool) – TRUE (if the keyframe should be locked) or FALSE (if not)
- Returns
The status code result of the operation: Success - normal completion. InvalidObject - object is invalid
- Return type
- set_out_tangent(self: alias_api.AlKeyframe, arg0: float) int
This method sets the out-tangent of the keyframe to the given value. The tangent value must be in the range -90.0 < outTangent < 90.0 If the given tangent value is outside this range, it is clamped to within this range.
This method requires the AlKeyframe to have been attached to an AlParamAction, otherwise an assertion will fail.
- Parameters
out_tangent (float) – the angle in degrees to which the keyframe’s out tangent should be set.
- Returns
The status code result of the operation: Success - keyframe’s outTangent was successfully changed Failure - keyframe is locked, thus cannot be changed or failed to make tangent FIXED InvalidObject - the keyframe was invalid
- Return type
- set_tangent_types(self: alias_api.AlKeyframe, in_tangent_type: alias_api.AlTangentType, out_tangent_type: alias_api.AlTangentType, recompute: int = True) int
This method sets the in and out tangents of this keyframe to a specific type. Use kTangentUnchanged if you want either to remain unchanged.
This method requires the AlKeyframe to have been attached to an AlParamAction, otherwise an assertion will fail.
Note that this function sets the tangents on a segment. So depending on your choice of tangents, the tangents of the keyframe’s neighbors may be changed.
- Parameters
in_tangent_type (AlTangentType) – the type of the in tangent
out_tangent_type (AlTangentType) – the type of the out tangent
recompute (bool) – recompute the spline
- Returns
The status code result of the operation: Success - keyframe’s tangents were successfully changed Failure - keyframe is locked, thus cannot be changed InvalidObject - the keyframe was invalid
- Return type
- set_value(self: alias_api.AlKeyframe, new_val: float, recompute: int = True) int
This method sets the value of the keyframe to be the value given by newVal.
- Parameters
new_val (float) – the new value for the value of the keyframe
recompute (bool) – whether to recompute the tangents or not.
- Returns
The status code result of the operation: Success - keyframe’s value was successfully changed Failure - keyframe is locked, thus cannot be changed InvalidObject - the keyframe was invalid
- Return type
- tangent_types(self: alias_api.AlKeyframe) Tuple[int, alias_api.AlTangentType, alias_api.AlTangentType]
This method gets the in and out tangent types of this keyframe. If this method fails to determine the type of either the in or out tangent, sFailure is returned, and either or both of the arguments are set to kTangentUnchanged.
- Returns
A tuple containing: (1) The status code result of the operation:
Success - successfully determined keyframe’s tangents. Failure - failed to determine one of the keyframe’s tangents. InvalidObject - the keyframe was invalid
The in tangent type of the keyframe
The out tangent type of the keyframe
- Return type
tuple<AlStatusCode, AlTangentType, AlTangentType>
- type(self: alias_api.AlKeyframe) alias_api.AlObjectType
Returns the class identifier ‘KeyframeType’.
- value(self: alias_api.AlKeyframe) float
This method returns the value of this keyframe, or 0.0 if the keyframe is not valid.
- class alias_api.AlLayer
Interface to Alias layer objects.
Layers provide a way of organizing the models to improve the workflow. The layers have attributes such as visibility, pickability etc, which apply to all the dag nodes which refer to them. The AlDagNode has methods to get AlLayer and set to a new AlLayer.
Each AlLayer has a unique identifying number and a name. By default, the layer gets a unique name based on its number, however, the user is free to change it any name. The user given layer names do not have to be unique.
Default Layer:
There is always a default layer in the AlUniverse with a number 0. The attributes of this default layer can never be changed. Any object of a class derived from AlDagNode class can be assigned to an AlLayer.
Creation Layer:
Any new AlDagNode is automatically assigned to the layer which is made a creation layer. Any existing layer can be made a creation layer, including the default layer, to put the new nodes in that layer automatically. When a layer is made a creation layer, its attributes such as invisibility, temporarily become ineffective and it gets the same attributes as the default layer. These attributes become effective again, as soon as some another layer is made a creation layer.
An AlDagNode can be transferred from one layer to another. An AlDagNode can exist on only one layer at a time. When an AlDagNode is assigned to a non-default layer, all its children are automatically assigned to that layer and all the parents are automatically assigned to the default layer. In addition, all the instances of the AlDagNode are also assigned to the same layer. However, the siblings of that AlDagNode remain uneffected.
All the attributes in an AlLayer can be obtained and set with the methods in this class. By default, all the layers have a corresponding menu in the Alias interface and are visible in the layer bar in the Alias interface. However, through visible_in_layer_bar() methods, a partial list of layers with which one chooses to work can be made visible. The change in visibility in the layer bar does not change the other attributes of the Allayer.
All the existing layers in an AlUniverse can be accessed through methods in AlUniverse. The layer functionality can be temporarily disabled through the static method set_layers_enabled() in the AlUniverse class. When the layer functionality is disabled or turned off, all the layers attributes temporarily become similar to the default layer. However, the layer references of the AlDagNode are not changed.
Symmetric layers are also supported in the API. Methods available allow the developer to turn symmetric layers on, find out if a layer is symmetric, set/query the origin and normal parameters of the symmetric plane and create the symmetric geometry. Symmetric layers are specified by a normal and a point(origin). Note: creation of symmetric geometry is performed by the AlDagNode class.
The complete layers interface is available in Open Model as well.
- assign_child(*args, **kwargs)
Overloaded function.
assign_child(self: alias_api.AlLayer, child_layer_number: int) -> int
Assign an Alias layer as child of the current layer.
If this layer is not a folder layer, the operation will fail to assign the child layer.
- param child_layer_number
the ID of the child layer which is to be assigned to the layer
- type child_layer_number
int
- return
The status code result of the operation.
- rype
int(AlStatusCode)
assign_child(self: alias_api.AlLayer, child_layer: alias_api.AlLayer) -> int
Assign an Alias layer as child of the current layer.
If this layer is not a folder layer, the operation will fail to assign the child layer.
- param child_layer
the child layer to assign to the layer
- type child_layer
AlLayer
- return
The status code result of the operation.
- rype
int(AlStatusCode)
- assign_parent(self: alias_api.AlLayer, layer_id: int) int
Assign an Alias layer as the parent of the current layer.
- Parameters
layer_id (int) – the parent layer id to assign to the layer
- Returns
The status code result of the operation.
- Rype
int(AlStatusCode)
- assign_selection(self: alias_api.AlLayer, assign_top_nodes: bool = False) int
Assign the current selection to the Alias layer.
- Parameters
assign_top_nodes (bool) – True will get the top-level parent node of each of the selected nodes and set the layer of the top-level node to cascade down to all child nodes.
- Returns
The status code result of the operation.
- Rype
int(AlStatusCode)
- assign_sibling_on_left(self: alias_api.AlLayer, layer_id: int) int
Assign an Alias layer as the sibling on the left of the current layer.
- Parameters
layer_id (int) – the sibling layer id to assign to the layer
- Returns
The status code result of the operation.
- Rype
int(AlStatusCode)
- assign_sibling_on_right(self: alias_api.AlLayer, layer_id: int) int
Assign an Alias layer as the sibling on the right of the current layer.
- Parameters
layer_id (int) – the sibling layer id to assign to the layer
- Returns
The status code result of the operation.
- Rype
int(AlStatusCode)
- child_layer(self: alias_api.AlLayer) alias_api.AlLayer
Return the child layer below this layer in the graph of Alias AlLayer objects.
- copy_wrapper(self: alias_api.AlLayer) alias_api.AlObject
Return an exact duplicate of this AlLayer wrapper.
- create(*args, **kwargs)
Overloaded function.
create(self: alias_api.AlLayer, name: str) -> int
Create a new layer.
- param name
The name of the new layer.
- type name
str
- return
The status code result Success - the layer was created Failure - the layer was not created because either the maximum number of layers were already created
or the layer functionality is turned off.
AlreadyCreated - object has already been created
- rtype
int(AlStatusCode)
create(self: alias_api.AlLayer, number: int) -> int
Create a new layer with the given number.
- param number
The number of the new layer.
- type number
int
- return
A tuple (status, number) where status - the status code result of the operation
Success - the layer was created Failure - the layer was not created because either the maximum number of layers were already created
or the layer functionality is turned off.
AlreadyCreated - object has already been created
number - the Id of the created layer
- rtype
tuple
- create_folder(self: alias_api.AlLayer, name: str) int
Create a new layer folder.
- Parameters
name (str) – The name of the new layer folder.
- Returns
The status code result Success - the layer folder was created Failure - the layer folder was not created because either the maximum number of layers were already created
or the layer functionality is turned off.
AlreadyCreated - object has already been created
- Return type
int(AlStatusCode)
- delete_object(self: alias_api.AlLayer) int
Delete the layer in the Alias Universe.
- property draw_instances
Get or set the draw instances flag on the layer.
- export_content_to_file(self: alias_api.AlLayer, path: str) int
Export the content of the layer to the given file path.
- get_assigned_nodes(self: alias_api.AlLayer) List[AlDagNode]
Return the list of AlDagNodes that are assigned to this AlLayer.
- Returns
The list of dag nodes
- Return type
list<AlDagNode>
- property invisible
Get or set the AlLayer visibility.
- is_assigned(self: alias_api.AlLayer, node: AlDagNode) bool
Return True if the node is assigned to the layer, else False.
- is_empty(self: alias_api.AlLayer) bool
Return True if the Alias layer doesn’t contain any geometry, False otherwise.
- is_folder(self: alias_api.AlLayer) int
Return True if the AlLayer is a layer folder, False otherwise.
- is_picked(self: alias_api.AlLayer) int
Return True if the layer is picked. False is returned if the layer is not picked or if the object is invalid.
- property name
Get or set the AlLayer name.
- next_layer(self: alias_api.AlLayer) alias_api.AlLayer
Return the layer following this layer in the graph of Alias AlLayer objects.
- property number
Get the AlLayer number.
- parent_layer(self: alias_api.AlLayer) alias_api.AlLayer
Return the parent layer above this layer in the graph of Alias AlLayer objects, None if there is no parent layer.
- pick(self: alias_api.AlLayer) int
Picks the layer.
- Returns
The status code result Success - the pick was successfully Failure - the pick operation failed because layers have been disabled InvalidObject - the object is not valid
- Return type
int(AlStatusCode)
- pick_nodes(self: alias_api.AlLayer, leaf_nodes_only: bool = True) int
- )
Pick all the nodes assigned to the Alias layer.
- param leaf_nodes_only
True will pick only the leaf nodes, False will pick the top-most level nodes assigned to the layer (not including their children).
- type leaf_nodes_only
bool
- return
The status code result of the operation.
- rtype
int(AlStatusCode)
- prev_layer(self: alias_api.AlLayer) alias_api.AlLayer
Return the layer previous to this layer in the graph of Alias AlLayer objects.
- set_symmetric_normal(self: alias_api.AlLayer, x: float, y: float, z: float) int
Sets the normal of the symmetric plane.
- Parameters
x (float) – the x coordinate of the normal of the symmetric plane
y (float) – the y coordinate of the normal of the symmetric plane
z (float) – the z coordinate of the normal of the symmetric plane
- Returns
the status code result of the operation Success - the method succeeded Failure - the method failed InvalidObject - the layer is invalid or is not symmetric
- Return type
int(AlStatusCode)
- set_symmetric_origin(self: alias_api.AlLayer, x: float, y: float, z: float) int
Set the location of the origin of the symmetric layer.
- Parameters
x (float) – the x coordinate of the symmetric layer’s origin
y (float) – the y coordinate of the symmetric layer’s origin
z (float) – the z coordinate of the symmetric layer’s origin
- Returns
the status code result of the operation Success - the method succeeded Failure - the method failed InvalidObject - the layer is invalid or is not symmetric
- Return type
int(AlStatusCode)
- property symmetric
Get or set the symmetric flag on the layer.
- symmetric_normal(self: alias_api.AlLayer) Tuple[int, float, float, float]
Return the symmetric normal of the layer.
- Returns
A tuple (status, x, y, z) where status - the status code result of the operation
Success - the method succeeded Failure - the method failed InvalidObject - the layer is invalid or is not symmetric
x - the x coordinate of the normal y - the y coordinate of the normal z - the z coordinate of the normal
- Return type
tuple
- symmetric_origin(self: alias_api.AlLayer) Tuple[int, float, float, float]
Return the location of the origin of the symmetric layer.
- Returns
A tuple (status, x, y, z) where status - the status code result of the operation
Success - the method succeeded Failure - the method failed InvalidObject - the layer is invalid or is not symmetric
x - the x coordinate of the layer’s origin y - the y coordinate of the layer’s origin z - the z coordinate of the layer’s origin
- Return type
tuple
- type(self: alias_api.AlLayer) alias_api.AlObjectType
Return the AlLayer type identifier.
- unpick(self: alias_api.AlLayer) int
Unpicks the layer.
- Returns
The status code result Success - the unpick was successfully Failure - the unpick operation failed because layers have been disabled InvalidObject - the object is not valid
- Return type
int(AlStatusCode)
- class alias_api.AlLayeredShader
Base object for representing shader data
This class encapsulates the basic functionality for checking and setting the name of a shader as well as accessing the textures that a particular shader refers to, and the animation on the shader. Shader objects are accessible through both the AlUniverse class and the objects that reference them (AlSurface and AlFace classes).
A layered shader object may reference shaders. The first_shader() and next_shader() methods are used to access these textures.
first_shader() returns the first shader that the shader object references. next_shader() moves from a given referenced shader to the next shader in order, as related to the layered shader object.
- add_shader(self: alias_api.AlLayeredShader, shader: alias_api.AlShader) bool
Add a shader to the layer shader.
- copy_wrapper(self: alias_api.AlLayeredShader) alias_api.AlObject
Return an exact duplicate of this AlLayeredShader wrapper.
- create(self: alias_api.AlLayeredShader) int
Initialize and allocate space for the AlLayeredShader and add it to the global list of shaders in the Alias Universe.
- delete_object(self: alias_api.AlLayeredShader) int
Delete the Alias shader object and return the status code of the delete operation.
- get_first_shader(self: alias_api.AlLayeredShader) alias_api.AlShader
Returns the first shader.
- get_next_shader(self: alias_api.AlLayeredShader, cur_shader: alias_api.AlShader) alias_api.AlShader
get the next shader.
- is_used(self: alias_api.AlLayeredShader) int
Returns True if the AlLayeredShader object is assigned to a gemoetry node, else False.
- property name
Get or set the AlLayeredShader name.
- remove_shader(self: alias_api.AlLayeredShader, shader: alias_api.AlShader) bool
Remove a shader to the layer shader.
- type(self: alias_api.AlLayeredShader) alias_api.AlObjectType
Return the AlLayeredShader type identifier.
- class alias_api.AlLight
Encapsulates methods common to all lights.
This virtual class contains methods which are common to all types of lights. This includes color, linkage to objects and exclusivity.
To create a light, the user must instantiate and call the create method of a specific type of light (eg. a point light or a spot light). When a light is created, three light nodes are created, grouped under a group node, which is inserted into the universe’s dag. These light nodes represent the position, “look at” and “up” points of the light.
Even though three light nodes are created for all lights, only the spot light class uses the information in the “look at” and “up” nodes. All other classes either don’t have a direction or store direction in a different manner. The direction vector of a spot light is the vector between its position point and its “look at” point. The “up” direction vector of a spot light is the vector between its position point and its “up” point.
There are two ways to delete a light object. When an AlLight object is deleted, its three light nodes are deleted. Alternatively, when a light node is deleted, its associated light (and other light nodes) are deleted. The group node that originally grouped the position, “look at” and “up” nodes is not deleted.
The light classes are derived as follows, where a class inherits the functionality defined in the class above it. The user can only instantiate ambient, point, direction, spot, linear and area lights.
For directional lights, the light positions are (in Z-up coordinate system) position at (0,0,0), view at (0,0,-1), and up at (0,1,-1). For linear lights, the axis by default starts at the position point and extends (2,0,0). For area lights, the short axis starts at the position point and extends (0,1,0); the long axis starts at the position point and extends (2,0,0).
All lights have an “exclusive” flag. If this flag is TRUE, then the light will only illuminate objects to which it is linked. If the flag is False, the light will illuminate objects that have no light links. The default for new lights is False.
- delete_object(self: alias_api.AlLight) int
Delete the AlLight from the Alias Universe and return the status of the performed operation.
- first_linked_object(self: alias_api.AlLight) alias_api.AlObject
Return the first object that is linked to this light.
If there are no objects linked to this light, then Non is returned. Only objects with 3D geometry can be linked to a light. Cameras, lights, curves and CVs cannot be linked to a light. Surfaces and faces can be linked to a light.
- Returns
The first linked object.
- Return type
- has_linked_objects(self: alias_api.AlLight) int
Return True if this light has any objects linked to it, else False.
- light_node(self: alias_api.AlLight) AlLightNode
Return the dag node that represents the light’s position.
- look_at_node(self: alias_api.AlLight) AlLightNode
Return the ‘look at’ node attached to this light.
- property name
Get or set the AlLight name.
- next_linked_object(self: alias_api.AlLight, obj: alias_api.AlObject) alias_api.AlObject
Return the object following the given object that is linked to this linked.
None is returned if there is no following object or if the given object was not found in the light list. Only objects with 3D geometry can be linked to a light. Cameras, lights, curves and CVs cannot be linked to a light. Surfaces and faces can be linked to a light.
- Parameters
obj – the object whose following linked object is returned.
- Returns
The next linked object t othe given object.
- Return type
- type(self: alias_api.AlLight) alias_api.AlObjectType
Return the AlLight type identifier.
- up_node(self: alias_api.AlLight) AlLightNode
Return the ‘up’ node attached to this light.
- class alias_api.AlLightNode
The dag node class for lights.
This class is a dag node class used specifically for lights. Each AlLight object has three light nodes for position, ‘look at’ and ‘up’ points. (For more information on how AlLight’s and AlLightNode’s work together, see the Class Description for the AlLight object.)
To create a light node, the user must create a specific type of light, which automatically creates the necessary light nodes. These light nodes are grouped and inserted into the universe’s dag. The user cannot directly instantiate a light node.
To figure out whether or not a light node represents a position, a ‘look at’ or an ‘up’ point, the user can use:
the is_position_node(), is_look_at_node(), is_up_node() methods, or
the type() method of the attached AlLight object.
A light node can be deleted in two ways. When a light node is deleted, its associated light (and other light nodes) are deleted. Alternatively, when a light is deleted, its light nodes are also deleted.
- copy_wrapper(self: alias_api.AlLightNode) alias_api.AlObject
Return an exact duplicate of this AlLightNode wrapper.
- delete_object(self: alias_api.AlLightNode) int
Delete the AlLightNode from the Alias Universe and return the status of the performed operation.
- is_instanceable(self: alias_api.AlLightNode) int
Return False. A light node can not be instanced.
- is_look_at_node(self: alias_api.AlLightNode) int
Return True if this node is a ‘look at’ node.
- is_position_node(self: alias_api.AlLightNode) int
Return True if this node is a ‘position’ node.
- is_up_node(self: alias_api.AlLightNode) int
Return True if this node is a ‘up’ node.
- light(*args, **kwargs)
Overloaded function.
light(self: alias_api.AlLightNode) -> alias_api.AlLight
Return the attached light object. If the light does not exist or is not the right type, None is returned.
light(self: alias_api.AlLightNode, tm: alias_api.AlTM) -> alias_api.AlLight
Return the attached light object.
If the light does not exist or is not the right type, None is returned. The AlTM ‘tm’ will be updated with the light node’s transformation matrix, if a light exists.
- param tm
The transform matrix to set the light node’s TM to.
- type tm
AlTM
- return
The attached light object.
- rtype
AlLight
- type(self: alias_api.AlLightNode) alias_api.AlObjectType
Return the AlLightNode type identifier.
- class alias_api.AlLineAttributes
Interface to Alias line attributes.
AlLineAttributes is a class derived from the AlAttributes class. This class allows access to the attributes for a line.
The attributes which define a line are just its start point, and its end point. Coordinates are given in object space, and not world space.
- copy_wrapper(self: alias_api.AlLineAttributes) alias_api.AlObject
Return an exact duplicate of this AlLineAttributes wrapper.
- end_point(self: alias_api.AlLineAttributes) Tuple[int, float, float, float]
Returns the end point for the line.
- Returns
a tuple containing: (1) the status code result:
Success - the start point was successfully returned. InvalidObject - the attribute was invalid. Failure - an error occured
the end point x coordinate
the end point y coordinate
the end point z coordinate
- Return type
Tuple[int(AlStatusCode), float, float, float]
- set_end_point(self: alias_api.AlLineAttributes, x: float, y: float, z: float) int
Sets the end point for the line.
- Parameters
x (float) – end point x coordinate
y (float) – end point y coordinate
z (float) – end point z coordinate
- Returns
the status code result of the operation: Success - Setting the end point succeeded. InvalidObject - the attribute was invalid Failure - Setting the end point failed.
- Return type
int(AlStatusCode)
- set_start_point(self: alias_api.AlLineAttributes, x: float, y: float, z: float) int
Sets the start point for the line.
- Parameters
x (float) – start point x coordinate
y (float) – start point y coordinate
z (float) – start point z coordinate
- Returns
the status code result of the operation: Success - Setting the start point succeeded. InvalidObject - the attribute was not valid Failure - Setting the start point failed.
- Return type
int(AlStatusCode)
- start_point(self: alias_api.AlLineAttributes) Tuple[int, float, float, float]
Returns the start point for the line.
- Returns
a tuple containing: (1) the status code result:
Success - the start point was successfully returned. InvalidObject - the attribute was invalid. Failure - an error occured.
the start point x coordinate
the start point y coordinate
the start point z coordinate
- Return type
Tuple[int(AlStatusCode), float, float, float]
- type(self: alias_api.AlLineAttributes) alias_api.AlObjectType
Return the AlLineAttributes type identifier.
- class alias_api.AlLinkItem
Base class for objects contained in an AlList.
This is an abstract base class which classes will derive from so that the objects can be contained in AlList objects.
- class alias_api.AlList
Simple List class for AlLinkItem objects.
This simple container class provides the ability to create and access a list of objects derived from the AlLinkItem class.
- append(self: alias_api.AlList, item: alias_api.AlLinkItem) None
Adds an AlLinkItem object to the end of the list.
- Parameters
item (AlLinkItem) – The object to be appended.
- clear(self: alias_api.AlList) None
Clears the list as an empty list but does not free any of its members.
- first(self: alias_api.AlList) alias_api.AlLinkItem
Return the first element of the list.
- last(self: alias_api.AlList) alias_api.AlLinkItem
Return the last element of the list.
- remove(self: alias_api.AlList, item: alias_api.AlLinkItem) int
Removes an AlLinkItem object from the AlList. Returns 1 if the item was removed, 0 if it was not (because it did not belong in this list).
- Parameters
item (AlLinkItem) – The object to be appended.
- Returns
1 if the item was removed, 0 otherwise.
- Return type
int
- class alias_api.AlLocator
Contains functionality common to all the Alias locators
This virtual class encapsulates methods common to all the Alias locators, such as annotationLocator, distanceLocator, angleLocator, radialLocator, deviationLocator and minmaxLocator.
This class contains methods for picking, deleting, and naming locators. In addition, methods are available for working with layers and for changing invisibility and templated modes.
To create a locator, the user must instantiate and call the create method of a specific type of locator (eg. an angle locator ).
The annotation, distance and angle locators depend on one or more construction entities point types, such as a curve point. If a construction point is deleted, their dependent annotation, distance and angle locators are automatically deleted. Similarly, the radial, deviation and minmax locators are dependent on other objects. If those objects are deleted, the dependent radial, deviation, and minmax locators are also deleted.
The locator classes are derived as follows, where a class inherits the functionality defined in the class above it. The user can not instantiate the locator (AlLocator) class.
- Locator
| | | | |annotation distance angle radial deviation minmax
- copy_wrapper(self: alias_api.AlLocator) alias_api.AlObject
Return an exact duplicate of this AlLocator wrapper.
- delete_object(self: alias_api.AlLocator) int
Delete the AlLocator from the Alias Universe and return the status of the performed operation.
- property invisible
Get or set the AlLocator invisibility property.
- is_picked(self: alias_api.AlLocator) int
On successfully checking the locator, return 1 if the AlLocator is picked, else return 0. On failure to check, return -1.
- property layer
Get or set the AlLocator layer object property.
- property name
Get or set the AlLocator name property.
- pick(self: alias_api.AlLocator) int
Pick the locator. This function has not effect if the locator is already picked.
- templated(self: alias_api.AlLocator) int
On successfully checking the locator, return 1 if the AlLocator depends on anoather object which is templated, else return 0. On failure to check, return -1.
- type(self: alias_api.AlLocator) alias_api.AlObjectType
Return the AlLocator type identifier.
- unpick(self: alias_api.AlLocator) int
Unpick the locator. This function has not effect if the locator is already picked.
- class alias_api.AlMesh
Interface to Alias meshes.
AlMesh is the interface to meshes and their data in Alias. This class lets a developer create and manipulate mesh objects. Data access methods to all properties are provided. The following properties are used throughout the mesh class.
- vertices - Vertices are passed by this class using
an array of floating point values. A vertex consists of three values; x,y,z respectively. Refer to the definition of triangles for a description of the relationship between vertices and triangles. numVertices - The number of vertices is equivalent to the number of x,y,z triplets stored in the vertices array. The total number of floats in the vertices array is equivalent to three times the number of vertices.
- triangles - Triangles are passed by this class using
an array of integer values. A triangle consists of three integer indices. These indices reference a vertex in the vertices array such that vertices[3*index] returns the x coordinate of the vertex. Similarly, vertices[3*index+1] and vertices[3*index+2] return the y and z coordinate respectively. Indices are to be specified in counter clockwise order relative to the front of their face.
- num_triangles - The number of triangles is equivalent to
the number of integer triplets stored in the triangles array. The total number of integers in the triangles array is equivalent to three times the number of triangles.
- normals - Normals are passed by this class using
an array of floating point values. They consist of three values; x,y,z respectively. Normals are per vertex. They are referenced by triangles in the same manner that vertices are referenced.
- uvs - UVs are passed by this class using an array
of float values. They consist of two floating point values; u,v respectively. UVs are per vertex. They are referenced by triangles in the same manner that vertices are referenced.
- assign_layered_shader(self: alias_api.AlMesh, shader: AlLayeredShader) int
Assigns shader to the mesh.
- Parameters
shader (AlShader) – the shader to assign
- Returns
The status code result Success - The shader was successfully assigned to the mesh. InvalidArgument - shader is invalid. InvalidObject - The mesh was not created properly. Failure - Unable to process request.
- assign_shader(self: alias_api.AlMesh, shader: AlShader) int
Assigns shader to the mesh.
- Parameters
shader (AlShader) – the shader to assign
- Returns
The status code result Success - The shader was successfully assigned to the mesh. InvalidArgument - shader is invalid. InvalidObject - The mesh was not created properly. Failure - Unable to process request.
- assign_switch_shader(self: alias_api.AlMesh, shader: AlSwitchShader) int
Assigns shader to the mesh.
- Parameters
shader (AlShader) – the shader to assign
- Returns
The status code result Success - The shader was successfully assigned to the mesh. InvalidArgument - shader is invalid. InvalidObject - The mesh was not created properly. Failure - Unable to process request.
- copy_wrapper(self: alias_api.AlMesh) alias_api.AlObject
Return an exact duplicate of this AlMesh wrapper.
- create(self: alias_api.AlMesh, vertices: List[float], triangles: List[int], normals: List[float], uvs: List[float]) int
Creates a mesh object with the supplied data. The is expected to allocate memory and seed data for the various arrays. Passing a uv array is optional. Passing a normal array is optional. Note that normals are recalculated as the mesh is edited.
- :return the status code
The status code result: Success - the file was stored successfully Failure - the wire file could not be stored properly InvalidArgument - unrecognized file type or fileName is NULL.
- delete_object(self: alias_api.AlMesh) int
Delete the AlMesh from the Alias Universe and return the status of the performed operation.
- first_shader(self: alias_api.AlMesh) AlShader
Return the first shader that this mesh object references. The function will return 0 if there are no shaders or the mesh was not created properly.
- get_layered_shader(self: alias_api.AlMesh) AlLayeredShader
Return the layered shader that this mesh object references. The function will return 0 if there are no shaders or the mesh was not created properly.
- get_switch_shader(self: alias_api.AlMesh) AlSwitchShader
Return the switch shader that this mesh object references. The function will return 0 if there are no shaders or the mesh was not created properly.
- layer_shader(self: alias_api.AlMesh, shader: AlShader) int
Layers the shader on the mesh.
- Returns
The status code result Success - the shader was successfully layered on the mesh. InvalidArgument - shader is invalid. InvalidObject - The mesh was not created properly. Failure - Unable to process request.
- mesh_node(self: alias_api.AlMesh) AlMeshNode
Return the AlMeshNode for this mesh. Return None if there is not an attached polyset node.
- property name
Get or set the AlMesh name.
- next_shader(self: alias_api.AlMesh, shader: AlShader) AlShader
Return the shader after the one specified by shader.
- The function will return 0 if:
The end of the shading list has been reached.
The argument, shader, is 0.
the mesh was not created properly.
There are no shaders.
- normals(self: alias_api.AlMesh) List[float]
Returns a list of the mesh’s normal data.
- number_of_triangles(self: alias_api.AlMesh) int
Return the number of triangles currently stored in the mesh. The function will return -1 if the mesh was not created properly.
- number_of_vertices(self: alias_api.AlMesh) int
Return the number of vertices currently stored in the mesh. The function will return -1 if the mesh was not created properly.
- triangles(self: alias_api.AlMesh) List[int]
Returns a list of the mesh’s triangle data.
- type(self: alias_api.AlMesh) alias_api.AlObjectType
Return the AlMesh type identifier.
- uvs(self: alias_api.AlMesh) List[float]
Returns a list of the mesh’s uv data.
- vertices(self: alias_api.AlMesh) List[float]
Returns a list of the mesh’s vertex data.
- class alias_api.AlMeshNode
A dag node that refers to a mesh’s geometry.
AlCurveNode is the class used to access and manipulate meshes within the dag. This class behaves like other dag nodes (see AlDagNode for a description of the usage and purpose of dag nodes). Users access the geometry of the curve via the ‘mesh()’ method which returns a pointer to an AlMesh object.
- copy_wrapper(self: alias_api.AlMeshNode) alias_api.AlObject
Return an exact duplicate of this AlMeshNode wrapper.
- mesh(self: alias_api.AlMeshNode) alias_api.AlMesh
Return a pointer object ot the mesh attached to the node.
- type(self: alias_api.AlMeshNode) alias_api.AlObjectType
Return the AlMeshNode type identifier.
- class alias_api.AlMessageType
The type of message
Members:
DagNodeModifiedGeometry
DagNodeColourModified
DagNodeModified
TrimSurface
Invalid
FirstMessage
DagNodeDeleted
DagNodeInstanced
DagNodeModifiedShaderAssignment
DeleteAll
DagNodeModifiedConstraint
HierarchyModified
StageActive
DagNameModified
JointModified
Refresh
DagNodePreReplaceGeometry
DagNodeReplaceGeometry
DagNodeApplyTransformation
DagNodeVisible
DagDispModified
ReferenceFileDeleted
CosDeleted
CosModified
CosVisible
LayerSymmetryModified
PostRetrieve
AttributesDelete
UniverseDeleted
PreUpdate
PostUpdate
PreRetrieve
Quit
StageMerged
AnimPlayback
ListModifiedNodes
PreRefresh
TextureDeleted
CommandInstall
LayerStateModified
CommandFree
LayerAssign
PickListModified
UntrimSurface
PlotRefresh
UniverseCreated
StageCreated
StageDeleted
UniverseMerged
CloudDeleted
PreStore
UniverseActive
PostStore
TextureModified
ReferenceFileSetModified
ClMemberModified
DagInserted
ShaderDeleted
CameraModified
ExprModified
LayersEnabled
CommandUnInstall
ShaderAdded
CnetDeleted
ShaderModified
LayerAdded
LightModified
TextureAdded
DagNodeUndeleted
LayerDeleted
LayerAttributeChanged
ReferenceFileSetDeleted
LayerVisibilityModified
LayersReordered
ReferenceFileModified
ReferenceFileAdded
ReferenceFileSetAdded
ReferenceLayerModified
CosCreated
LocatorAdded
LocatorDeleted
LocatorModified
LastMessage
- property name
- class alias_api.AlMinmaxLocator
Interface to Alias Min Max locators.
A min max locator finds and displays the minimum and maximum distance between any of the two curves, curves on surface, or surfaces. This class contains methods to create, query the distance and set the display attributes in the Alias windows.
- attached_to(self: alias_api.AlMinmaxLocator) Tuple[int, alias_api.AlObject, alias_api.AlObject]
Returns the two objects that are used to create the min/max locator.
The objects returned can be curves on surfaces, curve node or surface nodes.
- Returns
A tuple containing: (1) the status code result of the operation:
Success - the attached to objects were found InvalidObject - the object is not valid Failure - the method failed
the first object
the second object
- comb_density(self: alias_api.AlMinmaxLocator) Tuple[int, float]
Finds the density of the comb display for Minmax locator in the Alias modeling windows.
- Returns
A tuple containing: (1) the status code result of the operation:
Success - the display mode was found InvalidObject - the object is not valid
the comb density
- Return type
tuple<AlStatusCode, float>
- comb_display(self: alias_api.AlMinmaxLocator) Tuple[int, int]
Whether the comb of the Minmax locator is displayed in the Alias modeling windows.
- Returns
A tuple containing: (1) the status code result of the operation:
Success - the display mode was found InvalidObject - the object is not valid
the display mode
- Return type
tuple<AlStatusCode, bool>
- comb_scale(self: alias_api.AlMinmaxLocator) Tuple[int, float]
Finds the scale of the comb display for Minmax locator in the Alias modeling windows.
- Returns
A tuple containing: (1) the status code result of the operation:
Success - the display mode was found InvalidObject - the object is not valid
the comb scale
- Return type
tuple<AlStatusCode, float>
- comb_threshold(self: alias_api.AlMinmaxLocator) Tuple[int, float]
Finds the threshold of the comb display for Minmax locator in the Alias modeling windows.
- Returns
A tuple containing: (1) the status code result of the operation:
Success - the display mode was found InvalidObject - the object is not valid
the comb threshold
- Return type
tuple<AlStatusCode, float>
- copy_wrapper(self: alias_api.AlMinmaxLocator) alias_api.AlObject
Return an exact duplicate of this AlMinmaxLocator wrapper.
- create(*args, **kwargs)
Overloaded function.
create(self: alias_api.AlMinmaxLocator, curve1: alias_api.AlCurve, curve2: alias_api.AlCurve) -> int
Create a Minmax locator between two curves.
- param curve1
The first curve
- type curve1
AlCurve
- param curve2
The second curve
- type curve2
AlCurve
- return
The status code result of the operation: Success - the minmax locator was created Failure - the minmax locator was not created InvalidArgument - either one or both curves were invalid AlreadyCreated - object has already been created
- rtype
AlStatusCode
create(self: alias_api.AlMinmaxLocator, curve1: alias_api.AlCurve, curve2: alias_api.AlCurveOnSurface) -> int
Create a Minmax locator between a curve and curve on surface.
- param curve1
The first curve
- type curve1
AlCurve
- param curve2
The second curve on surface
- type curve2
AlCurveOnSurface
- return
The status code result of the operation: Success - the minmax locator was created Failure - the minmax locator was not created InvalidArgument - either one or both curves were invalid AlreadyCreated - object has already been created
- rtype
AlStatusCode
create(self: alias_api.AlMinmaxLocator, curve1: alias_api.AlCurveOnSurface, curve2: alias_api.AlCurveOnSurface) -> int
Create a Minmax locator between two curves on surface.
- param curve1
The first curve on surface
- type curve1
AlCurveOnSurface
- param curve2
The second curve on surface
- type curve2
AlCurveOnSurface
- return
The status code result of the operation: Success - the minmax locator was created Failure - the minmax locator was not created InvalidArgument - either one or both curves were invalid AlreadyCreated - object has already been created
- rtype
AlStatusCode
create(self: alias_api.AlMinmaxLocator, curve1: alias_api.AlSurface, curve2: alias_api.AlSurface) -> int
Create a Minmax locator between two surfaces.
- param curve1
The first surface
- type curve1
AlSurface
- param curve2
The second surface
- type curve2
AlSurface
- return
The status code result of the operation: Success - the minmax locator was created Failure - the minmax locator was not created InvalidArgument - either one or both curves were invalid AlreadyCreated - object has already been created
- rtype
AlStatusCode
create(self: alias_api.AlMinmaxLocator, curve1: alias_api.AlCurve, curve2: alias_api.AlSurface) -> int
Create a Minmax locator between a curve and a surface.
- param curve1
The first curve
- type curve1
AlCurve
- param curve2
The second surface
- type curve2
AlSurface
- return
The status code result of the operation: Success - the minmax locator was created Failure - the minmax locator was not created InvalidArgument - either one or both curves were invalid AlreadyCreated - object has already been created
- rtype
AlStatusCode
create(self: alias_api.AlMinmaxLocator, curve1: alias_api.AlCurveOnSurface, curve2: alias_api.AlSurface) -> int
Create a Minmax locator between a curve on surface and a surface.
- param curve1
The first curve on surface
- type curve1
AlCurveOnSurface
- param curve2
The second surface
- type curve2
AlSurface
- return
The status code result of the operation: Success - the minmax locator was created Failure - the minmax locator was not created InvalidArgument - either one or both curves were invalid AlreadyCreated - object has already been created
- rtype
AlStatusCode
- left_justify_max_distance(self: alias_api.AlMinmaxLocator) Tuple[int, int]
Find whether the text of maximum distance in minmax locator is left justified or right justified
- Returns
A tuple containing: (1) the status code result of the operation:
Success - the justification was found InvalidObject - the object is not valid
the justification
- Return type
tuple<AlStatusCode, bool>
- left_justify_min_distance(self: alias_api.AlMinmaxLocator) Tuple[int, int]
Find whether the text of minimum distance in minmax locator is left justified or right justified
- Returns
A tuple containing: (1) the status code result of the operation:
Success - the justification was found InvalidObject - the object is not valid
the justification
- Return type
tuple<AlStatusCode, bool>
- maximum_distance(self: alias_api.AlMinmaxLocator) Tuple[int, float]
Finds the maximum distance for the Minmax locator
- Parameters
dist (float) – The maximum distance
- Returns
The status code result of the operation: Success - the maximum distance was found InvalidObject - the object is not valid
- Return type
- minimum_distance(self: alias_api.AlMinmaxLocator) Tuple[int, float]
Finds the minimum distance for the Minmax locator
- Parameters
dist (float) – The minimum distance
- Returns
The status code result of the operation: Success - the minimum distance was found InvalidObject - the object is not valid
- Return type
- set_comb_density(self: alias_api.AlMinmaxLocator, density: float) int
Set the density of comb in the Alias modeling window for the Minmax locator
- Parameters
density (float) – The density of the comb display.
- Returns
The status code result of the operation: Success - the density was set successfully InvalidObject - the object is not valid
- Return type
- set_comb_display(self: alias_api.AlMinmaxLocator, display: int) int
Set the display of comb in the Alias modeling window for the Minmax locator
- Parameters
display (bool) – A value of true sets comb display and false turns the display off.
- Returns
The status code result of the operation: Success - the display mode was set successfully InvalidObject - the object is not valid
- Return type
- set_comb_scale(self: alias_api.AlMinmaxLocator, scale: float) int
Set the scale of comb in the Alias modeling window for the Minmax locator
- Parameters
scale (float) – The scale of the comb display.
- Returns
The status code result of the operation: Success - the scale was set successfully InvalidObject - the object is not valid
- Return type
- set_comb_threshold(self: alias_api.AlMinmaxLocator, threshold: float) int
Set the threshold of comb in the Alias modeling window for the Minmax locator
- Parameters
threshold (float) – The threshold of the comb display.
- Returns
The status code result of the operation: Success - the threshold was set successfully InvalidObject - the object is not valid
- Return type
- set_left_justify_max_distance(self: alias_api.AlMinmaxLocator, left_justify: int) int
Set the justification of the text for the maximum distance for minmax locator.
The text can be right justified or left justified.
- Parameters
left_justify (bool) – A value of true makes the text left justified and a value false makes it right justified.
- Returns
The status code result of the operation: Success - setting was successful InvalidObject - the object is not valid
- Return type
- set_left_justify_min_distance(self: alias_api.AlMinmaxLocator, left_justify: int) int
Set the justification of the text for the minimum distance for minmax locator.
The text can be right justified or left justified.
- Parameters
left_justify (bool) – A value of true makes the text left justified and a value false makes it right justified.
- Returns
The status code result of the operation: Success - setting was successful InvalidObject - the object is not valid
- Return type
- type(self: alias_api.AlMinmaxLocator) alias_api.AlObjectType
Return the AlMinmaxLocator type identifier.
- class alias_api.AlObject
Base class for all Alias Data types.
This is an abstract base class which holds a reference to an anonymous data structure. Derived classes will initialize the reference to refer to a particular data structure. This class provides a mechanism for completely hiding the internal data structures from the user.
This class gives some homogeneity between several different classes by providing methods which derived classes will redefine so that the name and type of the object can be obtained and so that object down casting can be done safely.
There are a group of functions (the ‘downcasting’ methods )for casting an AlObject to one of its derived classes. They have the form
Al{DerivedObject} *AlObject::as{DerivedObject}Ptr()
where {DerivedObject} is the name of the derived class.
All these functions return NULL in the base class, and the derived class of the appropriate type simply returns a pointer to itself. In this way, safe typecasting can be maintained.
- as_action_ptr(self: alias_api.AlObject) AlAction
Return a non-null pointer to an AlAction if it is safe to downcast the object to it.
- as_angle_locator_ptr(self: alias_api.AlObject) AlAngleLocator
Return a non-null pointer to an AlAngleLocator if it is safe to downcast the object to it.
- as_animatable_ptr(self: alias_api.AlObject) alias_api.AlAnimatable
Return a non-null pointer to an AlAnimatable if it is safe to downcast the object to it.
- as_annotation_locator_ptr(*args, **kwargs)
Overloaded function.
as_annotation_locator_ptr(self: alias_api.AlObject) -> AlAnnotationLocator
Return a non-null pointer to an AlAnnotationLocator if it is safe to downcast the object to it.
as_annotation_locator_ptr(self: alias_api.AlObject) -> AlAnnotationLocator
Return a non-null pointer to an AlAnnotationLocator if it is safe to downcast the obect to it.
- as_arc_attributes_ptr(self: alias_api.AlObject) AlArcAttributes
Return a non-null pointer to an AlArcAttribute if it is safe to downcast the object to it.
- as_attributes_ptr(self: alias_api.AlObject) AlAttributes
Return a non-null pointer to an AlAttributes if it is safe to downcast the object to it.
- as_camera_node_ptr(*args, **kwargs)
Overloaded function.
as_camera_node_ptr(self: alias_api.AlObject) -> AlCameraNode
Return a non-null pointer to an AlCameraNode if it is safe to downcast the object to it.
as_camera_node_ptr(self: alias_api.AlObject) -> AlCameraNode
Return a non-null pointer to an AlCameraNode if it is safe to downcast the obect to it.
- as_camera_ptr(self: alias_api.AlObject) AlCamera
Return a non-null pointer to an AlCamera if it is safe to downcast the object to it.
- as_channel_ptr(self: alias_api.AlObject) AlChannel
Return a non-null pointer to an AlChannel if it is safe to downcast the object to it.
- as_cloud_ptr(self: alias_api.AlObject) AlCloud
Return a non-null pointer to an AlCLoud if it is safe to downcast the object to it.
- as_cluster_member_ptr(self: alias_api.AlObject) AlClusterMember
Return a non-null pointer to an AlClusterMember if it is safe to downcast the object to it.
- as_cluster_node_ptr(self: alias_api.AlObject) AlClusterNode
Return a non-null pointer to an AlClusterNode if it is safe to downcast the object to it.
- as_cluster_ptr(self: alias_api.AlObject) AlCluster
Return a non-null pointer to an AlCluster if it is safe to downcast the object to it.
- as_clusterable_ptr(self: alias_api.AlObject) alias_api.AlClusterable
Return a non-null pointer to an AlClusterable if it is safe to downcast the object to it.
- as_conic_attributes_ptr(self: alias_api.AlObject) AlConicAttributes
Return a non-null pointer to an AlConicAttributes if it is safe to downcast the object to it.
- as_construction_entity_ptr(self: alias_api.AlObject) AlConstructionEntity
Return a non-null pointer to an AlConstructionEntity if it is safe to downcast the object to it.
- as_construction_plane_ptr(self: alias_api.AlObject) AlConstructionPlane
Return a non-null pointer to an AlConstructionPlane if it is safe to downcast the object to it.
- as_curve_attributes_ptr(self: alias_api.AlObject) AlCurveAttributes
Return a non-null pointer to an AlCurveAttributes if it is safe to downcast the object to it.
- as_curve_cv_ptr(self: alias_api.AlObject) AlCurveCV
Return a non-null pointer to an AlCurveCV if it is safe to downcast the object to it.
- as_curve_on_surface_point_ptr(self: alias_api.AlObject) AlCurveOnSurfacePoint
Return a non-null pointer to an AlCurveOnSurfacePoint if it is safe to downcast the object to it.
- as_curve_on_surface_ptr(self: alias_api.AlObject) AlCurveOnSurface
Return a non-null pointer to an AlCurveOnSurface if it is safe to downcast the object to it.
- as_curve_point_ptr(self: alias_api.AlObject) AlCurvePoint
Return a non-null pointer to an AlCurvePoint if it is safe to downcast the object to it.
- as_curve_ptr(self: alias_api.AlObject) AlCurve
Return a non-null pointer to an AlCurve if it is safe to downcast the object to it.
- as_dag_node_ptr(self: alias_api.AlObject) AlDagNode
Return a non-null pointer to an AlDagNode if it is safe to downcast the object to it.
- as_deviation_locator_ptr(self: alias_api.AlObject) AlDeviationLocator
Return a non-null pointer to an AlDeviationLocator if it is safe to downcast the object to it.
- as_distance_locator_ptr(self: alias_api.AlObject) AlDistanceLocator
Return a non-null pointer to an AlDistanceLocator if it is safe to downcast the object to it.
- as_envronment_ptr(self: alias_api.AlObject) AlEnvironment
Return a non-null pointer to an AlEnvironment if it is safe to downcast the object to it.
- as_face_node_ptr(self: alias_api.AlObject) AlFaceNode
Return a non-null pointer to an AlFaceNode if it is safe to downcast the object to it.
- as_face_ptr(self: alias_api.AlObject) AlFace
Return a non-null pointer to an AlFace if it is safe to downcast the object to it.
- as_group_node_ptr(self: alias_api.AlObject) AlGroupNode
Return a non-null pointer to an AlGroupNode if it is safe to downcast the object to it.
- as_ik_handle_node_ptr(self: alias_api.AlObject) AlIKHandleNode
Return a non-null pointer to an AlIKHandleNode if it is safe to downcast the object to it.
- as_ik_handle_ptr(self: alias_api.AlObject) AlIKHandle
Return a non-null pointer to an AlIKHandle if it is safe to downcast the object to it.
- as_keyframe_ptr(self: alias_api.AlObject) AlKeyframe
Return a non-null pointer to an AlKeyframe if it is safe to downcast the object to it.
- as_layer_ptr(self: alias_api.AlObject) AlLayer
Return a non-null pointer to an AlLayer if it is safe to downcast the object to it.
- as_layered_shader_ptr(self: alias_api.AlObject) AlLayeredShader
Return a non-null pointer to a AlLayeredShader if it is safe to downcast the object to it.
- as_light_node_ptr(self: alias_api.AlObject) AlLightNode
Return a non-null pointer to an AlLightNode if it is safe to downcast the object to it.
- as_light_ptr(self: alias_api.AlObject) AlLight
Return a non-null pointer to an AlLight if it is safe to downcast the object to it.
- as_line_attributes_ptr(self: alias_api.AlObject) AlLineAttributes
Return a non-null pointer to an AlLineAttributes if it is safe to downcast the object to it.
- as_locator_ptr(*args, **kwargs)
Overloaded function.
as_locator_ptr(self: alias_api.AlObject) -> AlLocator
Return a non-null pointer to an AlLocator if it is safe to downcast the object to it.
as_locator_ptr(self: alias_api.AlObject) -> AlLocator
Return a non-null pointer to an AlLocator if it is safe to downcast the obect to it.
- as_mesh_node_ptr(self: alias_api.AlObject) AlMeshNode
Return a non-null pointer to an AlMeshNode if it is safe to downcast the object to it.
- as_mesh_ptr(self: alias_api.AlObject) AlMesh
Return a non-null pointer to an AlMesh if it is safe to downcast the object to it.
- as_minmax_locator_ptr(self: alias_api.AlObject) AlMinmaxLocator
Return a non-null pointer to an AlMinmaxLocator if it is safe to downcast the object to it.
- as_orthographic_camera_ptr(self: alias_api.AlObject) AlOrthographicCamera
Return a non-null pointer to an AlOrthographicCameraPtr if it is safe to downcast the object to it.
- as_param_action_ptr(self: alias_api.AlObject) AlParamAction
Return a non-null pointer to an AlParamAction if it is safe to downcast the object to it.
- as_perspective_camera_ptr(self: alias_api.AlObject) AlPerspectiveCamera
Return a non-null pointer to an AlPerspectiveCameraPtr if it is safe to downcast the object to it.
- as_plane_attributes_ptr(self: alias_api.AlObject) AlPlaneAttributes
Return a non-null pointer to an AlPlaneAttributes if it is safe to downcast the object to it.
- as_point_ptr(self: alias_api.AlObject) AlPoint
Return a non-null pointer to an AlPoint if it is safe to downcast the object to it.
- as_radial_locator_ptr(self: alias_api.AlObject) AlRadialLocator
Return a non-null pointer to an AlRadialLocator if it is safe to downcast the object to it.
- as_rev_surf_attributes_ptr(self: alias_api.AlObject) AlRevSurfAttributes
Return a non-null pointer to an AlRevSurfAttributes if it is safe to downcast the object to it.
- as_set_member_ptr(self: alias_api.AlObject) AlSetMember
Return a non-null pointer to an AlSetMember if it is safe to downcast the object to it.
- as_set_ptr(self: alias_api.AlObject) AlSet
Return a non-null pointer to an AlSet if it is safe to downcast the object to it.
- as_settable_ptr(self: alias_api.AlObject) alias_api.AlSettable
Return a non-null pointer to an AlSettable if it is safe to downcast the object to it.
- as_shader_ptr(self: alias_api.AlObject) AlShader
Return a non-null pointer to an AlShader if it is safe to downcast the object to it.
- as_shell_node_ptr(self: alias_api.AlObject) AlShellNode
Return a non-null pointer to an AlShellNode if it is safe to downcast the object to it.
- as_shell_ptr(self: alias_api.AlObject) AlShell
Return a non-null pointer to an AlShell if it is safe to downcast the object to it.
- as_space_point_ptr(self: alias_api.AlObject) AlSpacePoint
Return a non-null pointer to an AlSpacePoint if it is safe to downcast the object to it.
- as_surface_node_ptr(self: alias_api.AlObject) AlSurfaceNode
Return a non-null pointer to an AlSurfaceNode if it is safe to downcast the object to it.
- as_surface_point_ptr(self: alias_api.AlObject) AlSurfacePoint
Return a non-null pointer to an AlSurfacePoint if it is safe to downcast the object to it.
- as_surface_ptr(self: alias_api.AlObject) AlSurface
Return a non-null pointer to an AlSurface if it is safe to downcast the object to it.
- as_switch_shader_ptr(self: alias_api.AlObject) AlSwitchShader
Return a non-null pointer to a AlSwitchShader if it is safe to downcast the object to it.
- as_texture_node_ptr(self: alias_api.AlObject) AlTextureNode
Return a non-null pointer to an AlTextureNode if it is safe to downcast the object to it.
- as_texture_ptr(self: alias_api.AlObject) AlTexture
Return a non-null pointer to an AlTexture if it is safe to downcast the object to it.
- copy_wrapper(self: alias_api.AlObject) alias_api.AlObject
Return an exact duplicate of this AlObject wrapper.
- delete_object(self: alias_api.AlObject) int
Delete the object from the Alias Universe.
- property name
Get or set the object name.
- type(self: alias_api.AlObject) alias_api.AlObjectType
Return the AlObject type identifier.
- class alias_api.AlObjectType
Alias object types.
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
PointLightType
Unusedtype
LinearLightType
CurveAttributeType
TextureType
SurfaceType
ReferenceFileType
OrthographicCameraType
PerspectiveCameraType
FuturePointType3
ArcAttributeType
SetMemberType
SphereLightType
SurfaceNodeType
SurfaceCurveType
JointType
SurfaceCVType
LayerType
TorusLightType
LineAttributeType
PolysetType
MotionActionType
LocatorType
WindowType
SwitchShaderType
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
ReferenceObjectType
CategoryType
MeshType
MeshNodeType
EvaluateType
ReferenceLayerType
LayeredShaderType
- property name
- class alias_api.AlOrthographicCamera
Orthographic modeling cameras.
This class provides an interface to orthographic cameras, primarily so that one can manipulate the image planes on those cameras. In general, little can be done to ortho cameras, as they are more of a modeling tool than geometry. In that regard, this class contains little functionality.
It is possible to create a new orthographic camera through the create() call. The valid parameters to that call are defined in AlWindow.h. Note that creating an orthographic camera automatically creates the associated modeling window.
- copy_wrapper(self: alias_api.AlOrthographicCamera) alias_api.AlObject
Return an exact duplicate of this AlOrthographicCamera wrapper.
- create(self: alias_api.AlOrthographicCamera, view_type: alias_api.AlWindow.AlViewType) int
Creates AlOrthographicCamera with the associated window.
- delete_object(self: alias_api.AlOrthographicCamera) int
Delete the AlOrthographicCamera from the Alias Universe.
- property name
Get or set the AlOrthographicCamera name.
- type(self: alias_api.AlOrthographicCamera) alias_api.AlObjectType
Return the AlOrthographicCamera type identifier.
- class alias_api.AlParamAction
Basic interface to derived class of actions for parameter curve actions.
An AlParamAction is derived from an AlAction. This particular action has a list of AlKeyframes which are CVs on a Poon-Ross spline. This spline is basically a Hermite-linear spline. That is, it is a Hermite in y (the vertical axis) and a linear in x (the horizontal axis).
In order to create an AlParamAction, you must have at least one valid, created AlKeyframe which will be the first keyframe of the action. After the AlParamAction is created, you can add other keyframes to the AlParamAction. Note that two AlKeyframes cannot have the same location. If you add a keyframe to the action that has the same location as an existing keyframe of the action, the existing keyframe will be deleted. Since an AlKeyframe is created at (0, 0), you cannot create a bunch of AlKeyframes, add them to the AlParamAction, and then modify their locations later, since the AlParamAction will only have one keyframe (the others will have been deleted as each successive keyframe with the same location is added to the AlParamAction). You must set the location of the AlKeyframe before adding it to the AlParamAction.
If you copy an AlParamAction, all the keyframes (and the keyframes’ streams) will also be copied. If you delete an AlParamAction, all its Keyframes will be deleted.
- add_keyframe(self: alias_api.AlParamAction, location: float, value: float, recompute: int = True, intan: alias_api.AlTangentType = <AlTangentType.TangentFlat: 2>, outtan: alias_api.AlTangentType = <AlTangentType.TangentFlat: 2>) int
This method adds a keyframe to the parameter curve’s list of keyframes. If the parameter curve already has another keyframe at the same location as this keyframe, then the existing keyframe at this location will be deleted and replaced with this keyframe. If this object does not yet reference an actual Parameter Curve, a new curve will be created.
- Parameters
location (float) – the time value for the keyframe
value (float) – the value of the keyframe
recompute – recompute the tangents of neighboring keyframes
intan (AlTangentType) – the in tangent for the keyframe
outtan (AlTangentType) – the out tangent for the keyframe
- Returns
The status code result of the operation: Success - operation completed normally. Failure - operation failed to complete normally. InsufficientMemory - there wasn’t enough memory to complete the operation.
- Return type
- add_keyframe_range(self: alias_api.AlParamAction, location: std::vector<double, std::allocator<double> >, value: std::vector<double, std::allocator<double> >, recompute: bool, intan: alias_api.VectorAlTangentType = VectorAlTangentType[], outtan: alias_api.VectorAlTangentType = VectorAlTangentType[]) int
This method adds a block of keyframes to the parameter curve’s list of keyframes. If the parameter curve already has a keyframe at the same location as one of the added keyframes, then the method will fail.
If this object does not yet reference an actual Parameter Curve, a new curve will be created.
If intan and outan are None, TangentFlat is assumed.
The size of location, value, intan (if not None), and outtan (if not None) must all be the same size.
- Parameters
location (List[float]) – array of keyframe locations (time values)
value (List[float]) – array of keyframe values
recompute (bool) – recompute tangents of neighboring keyframes
intan (List[AlTangentType]) – array of the in-tangents for keyframes
outtan (List[AlTangentType]) – array of the out-tangents for keyframes
- Returns
The status code result of the operation: Success - operation completed normally InvalidArgument - one of the arguments was None or invalid InsufficientMemory - ran out of memory ObjectAlreadyPresent - a keyframe already exists in given location Failure - could not create action
- Return type
- apply_iterator_to_keyframes(self: alias_api.AlParamAction, iter: AlIterator) Tuple[int, int]
Apply the given AlIterator to all keyframes in the action. The second argument will be set to the return value of the last application of the iterator’s function. See the AlIterator class for more information. :param iter: the iterator to be applied to each keyframe :type iter: AlIterator
- Returns
A tuple containing: (1) the status of the application of the iterator
Success - the application of the iterator terminated normally Failure - the application of the iterator terminated abnormally InvalidArgument - the iterator was None. InvalidObject - the action was invalid
the return value of the last application of the iterator’s function
- Return type
tuple<AlStatusCode, int>
- copy_wrapper(self: alias_api.AlParamAction) alias_api.AlObject
Returns a duplicate of this wrapper object, pointing to the same object.
- delete_keyframe_range(self: alias_api.AlParamAction, min_value: float, max_value: float) int
This method deletes all keyframes whose “time”s are greater or equal to the “min_value” given, and less or equal to than the “max_value” given.
- Parameters
min_value (float) – min. time value to delete keyframes from
max_value (float) – max. time value to delete keyframes up to
- Returns
The status code result of the operation: Success - operation completed normally. Failure - operation failed to complete normally. InvalidObject - the action was invalid.
- Return type
- first_keyframe(self: alias_api.AlParamAction) alias_api.AlKeyframe
This method returns the first keyframe of this parameter curve action.
- last_keyframe(self: alias_api.AlParamAction) alias_api.AlKeyframe
This method returns the last keyframe of this parameter curve action.
- number_of_keyframes(self: alias_api.AlParamAction) int
Returns the number of keyframes in this action, or -1 if the call fails.
- type(self: alias_api.AlParamAction) alias_api.AlObjectType
Returns the class identifier ‘ParamActionType’.
- class alias_api.AlPerspectiveCamera
Encapsulates creation, deletion and manipulation of perspective cameras
This class encapsulates all the functionality for creating, deleting and manipulating a perspective camera. The user cannot create, delete or manipulate orthographic cameras.
A camera is made of 4 parts - an AlPerspectiveCamera object and 3 attached AlCameraNodes which represent eye, view and up position of the camera. These camera nodes are members of the universe’s dag structure.
The view direction vector is the vector between the eye position and the view position. The up direction vector is the vector between the eye position and the up position. There are methods to get these positions and to access the attached camera nodes.
To create a perspective camera, the user must instantiate and call the create method on an AlPerspectiveCamera object. This creates the necessary eye, view and up AlCameraNodes, groups them under an AlGroupNode and inserts the group into the universe’s dag structure. The user cannot instantiate an AlCameraNode directly.
When a camera is created, if the coordinate system is specified as kZUp (when initializing the universe) the camera’s default eye, view and up positions are respectively (0.0, -12.0, 0.0), (0.0, 0.0, 0.0), (0.0, -12.0, 1.0). If the coordinate system is specified as kYUp, then eye, view and up positions are (0.0, 0.0, 12.0), (0.0, 0.0, 0.0), (0.0, 1.0, 12.0).
There are two ways to delete a camera object. When the deleteObejct() method of an AlPerspectiveCamera object is called, its three camera nodes are deleted. Alternatively, when a camera node is deleted, its associated camera (and other camera nodes) are deleted. The group node that originally grouped the eye, view and up nodes is not deleted.
- property angle_of_view
Get or set the angle of view of the camera.
- copy_wrapper(self: alias_api.AlPerspectiveCamera) alias_api.AlObject
Return an exact duplicate of this AlPerspectiveCamera wrapper.
- create(self: alias_api.AlPerspectiveCamera) int
Creates a camera and all associated eye, view, and up camera nodes and attaches them to the camera.
- delete_object(self: alias_api.AlPerspectiveCamera) int
Delete the AlPerspectiveCamera from the Alias Universe.
- eye(self: alias_api.AlPerspectiveCamera) AlCameraNode
Return the eye node object attached to the camera.
- property focus_length
Get or set the focus length of the camera.
- property name
Get or set the AlPerspectiveCamera name.
- set_world_eye(*args, **kwargs)
Overloaded function.
set_world_eye(self: alias_api.AlPerspectiveCamera, p: alPyMath::Vec3) -> int
Set the world eye position and return the status code result of the operation.
set_world_eye(self: alias_api.AlPerspectiveCamera, x: float, y: float, z: float) -> int
Sets the camera’s world eye position to be x,y, & z in world space. The value will be set in the camera’s eye node.
- param x
The new world eye position along the x axis.
- type x
float
- param y
The new world eye position along the y axis.
- type y
float
- param z
The new world eye position along the z axis.
- type z
float
- return
The status code result: Success - the position was successfully set InvalidObject - the camera is not valid.
- rtype
int(StatusCode)
- set_world_up(*args, **kwargs)
Overloaded function.
set_world_up(self: alias_api.AlPerspectiveCamera, p: alPyMath::Vec3) -> int
Set the world up position and return the status code result of the operation.
- param p
A vec3 containing the new world up position.
- return
The status code result: Success - the position was successfully set InvalidObject - the camera is not valid.
- rtype
int(StatusCode)
set_world_up(self: alias_api.AlPerspectiveCamera, x: float, y: float, z: float) -> int
Sets the camera’s world up position to be x,y, & z in world space. The value will be set in the camera’s up node.
- param x
The new world up position along the x axis.
- type x
float
- param y
The new world up position along the y axis.
- type y
float
- param z
The new world up position along the z axis.
- type z
float
- return
The status code result: Success - the position was successfully set InvalidObject - the camera is not valid.
- rtype
int(StatusCode)
- set_world_view(*args, **kwargs)
Overloaded function.
set_world_view(self: alias_api.AlPerspectiveCamera, p: alPyMath::Vec3) -> int
Set the world view position and return the status code result of the operation.
set_world_view(self: alias_api.AlPerspectiveCamera, x: float, y: float, z: float) -> int
Sets the camera’s world view position to be x,y, & z in world space. The value will be set in the camera’s view node.
- param x
The new world view position along the x axis.
- type x
float
- param y
The new world view position along the y axis.
- type y
float
- param z
The new world view position along the z axis.
- type z
float
- return
The status code result: Success - the position was successfully set InvalidObject - the camera is not valid.
- rtype
int(StatusCode)
- type(self: alias_api.AlPerspectiveCamera) alias_api.AlObjectType
Return the AlPerspectiveCamera type identifier.
- up(self: alias_api.AlPerspectiveCamera) AlCameraNode
Return the up node object attached to the camera.
- view(self: alias_api.AlPerspectiveCamera) AlCameraNode
Return the view node object attached to the camera.
- world_eye(self: alias_api.AlPerspectiveCamera) Tuple[int, float, float, float]
Find the world coordinates of the camera’s eye location.
- Returns
A tuple (status, x, y, z), where status [AlStatusCode] - the status code result
Success - the coordinates was found InvalidObject - the point is not valid
x [float] - the x world coordinate of the eye position y [float] - the y world coordinate of the eye position z [float] - the z world coordinate of the eye position
- Return type
tuple
- world_up(self: alias_api.AlPerspectiveCamera) Tuple[int, float, float, float]
Find the world coordinates of the camera’s up location.
- Returns
A tuple (status, x, y, z), where status [AlStatusCode] - the status code result
Success - the coordinates was found InvalidObject - the point is not valid
x [float] - the x world coordinate of the up position y [float] - the y world coordinate of the up position z [float] - the z world coordinate of the up position
- Return type
tuple
- world_view(self: alias_api.AlPerspectiveCamera) Tuple[int, float, float, float]
Find the world coordinates of the camera’s view location.
- Returns
A tuple (status, x, y, z), where status [AlStatusCode] - the status code result
Success - the coordinates was found InvalidObject - the point is not valid
x [float] - the x world coordinate of the view position y [float] - the y world coordinate of the view position z [float] - the z world coordinate of the view position
- Return type
tuple
- class alias_api.AlPickable
Basic Interface to Alias objects which can be picked.
This class encapsulates the functionality of Alias objects which have the capacity to be picked. As expected, pickable objects can either be picked or unpicked.
- is_picked(self: alias_api.AlPickable) int
Return True if the object is picked.
- pick(self: alias_api.AlPickable) int
Pick the object
- unpick(self: alias_api.AlPickable) int
Unpick the object
- class alias_api.AlPlaneAttributes
Interface to Alias plane surface attributes.
AlPlaneAttributes is a class derived from the AlAttributes class. This class allows access to the attributes for an plane.
The attributes which define a plane are the coefficients of Ax + By + Cz + D = 0 and coordinates of the center of the plane.
At this time it is only possible to query an AlPlaneAttribute. Further it is currently not possible to create a plane with attributes either in OpenModel or Alias. This attribute is provided for compatibility with IGES, and as such the only way to get a plane with attributes into an Alias wire file is to import an IGES file into Alias and then save a wire file.
- center_point(self: alias_api.AlPlaneAttributes) Tuple[int, float, float, float]
Returns the center of a plane
- Returns
a tuple containing: (1) the status code result:
Success - the center point was successfully returned. InvalidObject - the attr
the center point x coordinate
(3) the center point y coordinate (3) the center point z coordinate
- Return type
Tuple[int(AlStatusCode), float, float, float]
- coefficients(self: alias_api.AlPlaneAttributes) Tuple[int, float, float, float, float]
Determine the coefficients for the Conic, where the Conic is defined by the equation
Ax + By + Cz + D = 0
- Returns
A tuple containg: (1) the status code result:
Success - coefficients were successfully returned. InvalidObject - the attribute was invalid Failure - an error occurred
c_a - the coefficient A
c_b - the coefficient B
c_c - the coefficient C
c_d - the coefficient D
- Return type
Tuple[int(AlStatusCode), float, float, float, float]
- copy_wrapper(self: alias_api.AlPlaneAttributes) alias_api.AlObject
This method makes a copy of the AlPlaneAttributes. The returned AlPlaneAttributes will reference the same data as the original.
- type(self: alias_api.AlPlaneAttributes) alias_api.AlObjectType
Returns the class identifier ‘ConicAttributeType’.
- class alias_api.AlPoint
Contains functionality common to all Alias construction entity points.
This virtual class is derived from AlConstructionEntity and encapsulates methods common to all the Alias point type such as space points, curve points, curve on surface points, and surface points.
- copy_wrapper(self: alias_api.AlPoint) alias_api.AlObject
Return an exact duplicate of this AlPoint wrapper.
- type(self: alias_api.AlPoint) alias_api.AlObjectType
Return the AlPoint type identifier.
- worldPosition(self: alias_api.AlPoint, x: float, y: float, z: float) int
Return the world coordinates of the AlPoint.
- class alias_api.AlRadialLocator
Interface to Alias Radial locators
A Radial locator is used to create a radial measure of a curve or a curve on surface in their respective parametric spaces. This class methods to create the locator, query the radius and set the display attributes of the radial locator in the Alias windows. If the curve or curve on surface on which this locator is created is deleted, the locator is automatically deleted.
- attached_to(self: alias_api.AlRadialLocator) alias_api.AlObject
Returns the object this locator is attached to. This object can be attached to either a curve on surface or a curve node. NULL is returned if this method fails.
- center(self: alias_api.AlRadialLocator) Tuple[int, float, float, float]
Get the center of curvature of the curve where radial locator is created.
- Returns
A tuple containing: (1) the status code result of the operation:
Success - the center was found InvalidObject - the object is not valid
the center of curvature of the curve at the locator
- Return type
tuple<AlStatusCode, float>
- copy_wrapper(self: alias_api.AlRadialLocator) alias_api.AlObject
Return an exact duplicate of this AlRadialLocator wrapper.
- create(*args, **kwargs)
Overloaded function.
create(self: alias_api.AlRadialLocator, curve: alias_api.AlCurve, u: float = 0.0) -> int
Creates a radial locator on the given curve
- param curve
The curve on which the locator is created.
- type curve
AlCurve
- param u
Curve parameter at which locator is created.
- type u
float
- return
The status code result of the operation: Success - the locator was successfully created AlreadyCreated - object has already been created Failure - the radial locator could not be created InvalidArgument - the curve is not a valid object
- rtype
AlStatusCode
create(self: alias_api.AlRadialLocator, curve: alias_api.AlCurveOnSurface, u: float = 0.0) -> int
Creates a radial locator on the given curve
- param curve
The curve on which the locator is created.
- type curve
AlCurveOnSurface
- param u
Curve parameter at which locator is created.
- type float
- return
The status code result of the operation: Success - the locator was successfully created AlreadyCreated - object has already been created Failure - the radial locator could not be created InvalidArgument - the curve is not a valid object
- rtype
AlStatusCode
- diameter_create(self: alias_api.AlRadialLocator, curve: alias_api.AlCurve, u: float = 0.0) int
Creates a radial locator on the given curve
- Parameters
curve (AlCurve) – The curve on which which the locator is created.
u (float) – The curve parameter at which locator is created.
- Returns
The status code result of the operation: Success - the locator was successfully created AlreadyCreated - object has already been created Failure - the radial locator could not be created InvalidArgument - the curve is not a valid object
- Return type
- left_justify(self: alias_api.AlRadialLocator) Tuple[int, int]
Find whether the text of radial locator is left justified or right justified.
- Returns
A tuple containing: (1) the status code result of the operation:
Success - the justification was found InvalidObject - the object is not valid
a boolean value indicating whether the text is left justified
- Return type
tuple<AlStatusCode, bool>
- offset(self: alias_api.AlRadialLocator) Tuple[int, float]
Get the offset of the Radial locator display.
- Parameters
value (float) – The display offset.
- Returns
The status code result of the operation: Success - the offset was found InvalidObject - the object is not valid
- parameter(self: alias_api.AlRadialLocator) Tuple[int, float]
Get the curve parameter where radial locator is located.
- Returns
A tuple containing: (1) the status code result of the operation:
Success - the parameter was found
the curve parameter at the locator
- Return type
tuple<AlStatusCode, float>
- radius(self: alias_api.AlRadialLocator) Tuple[int, float]
Get the radius of the curve where radial locator is created
- Returns
A tuple containing: (1) the status code result of the operation:
Success - the radius was found InvalidObject - the object is not valid
the radius of the curve at the locator
- Return type
tuple<AlStatusCode, float>
- set_left_justify(self: alias_api.AlRadialLocator, left_justify: int) int
Set the justification of the text for the Radial locator.
The text can be right justified or left justified.
- Parameters
left_justify (bool) – A value of true makes the text left justified and a value false makes it right justified.
- Returns
The status code result of the operation: Success - setting was successful InvalidObject - the object is not valid
- Return type
- set_offset(self: alias_api.AlRadialLocator, offset: float) int
Set the offset in Radial locator display.
- Parameters
offset (float) – The value of the offset.
- Returns
The status code result of the operation: Success - the offset was set InvalidObject - the object is not valid
- set_parameter(self: alias_api.AlRadialLocator, u: float) int
Set the curve parameter at which the radial locator is located.
- Parameters
u (float) – The curve parameter
- Returns
The status code result of the operation: Success - the parameter was set InvalidObject - the object is not valid
- Return type
- type(self: alias_api.AlRadialLocator) alias_api.AlObjectType
Return the AlRadialLocator type identifier.
- class alias_api.AlReferenceFile
A base class that encapsulates access to Reference File.
- copy_wrapper(self: alias_api.AlReferenceFile) alias_api.AlObject
Return an exact duplicate of this AlReferenceFile wrapper.
- delete_object(self: alias_api.AlReferenceFile) int
Delete the AlReferenceFile from the Alias Universe and return the status of the performed operation.
- property file_name
Get the AlReferenceFile file name.
- get_alternatives(self: alias_api.AlReferenceFile) List[AlReferenceFileSet]
Return a list of all the alternatives this AlReferenceFile belongs to.
- property name
Get the AlReferenceFile name.
- property path
Deprecated - use ‘file_name’ property instead.
- property source_path
Deprecated - use ‘source_wirefile’ property instead.
- property source_wirefile
Get the AlReferenceFile source wire file path.
- status(self: alias_api.AlReferenceFile) alias_api.ReferenceFileStatus
Return the status of the reference file.
- type(self: alias_api.AlReferenceFile) alias_api.AlObjectType
Return the AlReferenceFile type identifier.
- property uuid
Get the AlReferenceFile UUID.
- class alias_api.AlReferenceFileSet
A base class that encapsulates access to Reference File Sets.
- add_reference(self: alias_api.AlReferenceFileSet, ref_file: alias_api.AlReferenceFile) int
Deprecated - use ‘add_reference_file_to_alternative’ instead.
- add_reference_file_to_alternative(self: alias_api.AlReferenceFileSet, ref_file: alias_api.AlReferenceFile) int
Add an AlReferenceFile to the AlReferenceFileSet.
- copy_wrapper(self: alias_api.AlReferenceFileSet) alias_api.AlObject
Return an exact duplicate of this AlReferenceFileSet wrapper.
- delete_object(self: alias_api.AlReferenceFileSet) int
Delete the AlReferenceFileSet from the Alias Universe and return the status of the performed operation.
- get_references(self: alias_api.AlReferenceFileSet) List[alias_api.AlReferenceFile]
Return a list of all the AlReferenceFiles for this AlReferenceFileSet.
- property name
Get or set the AlReferenceFile name.
- type(self: alias_api.AlReferenceFileSet) alias_api.AlObjectType
Return the AlReferenceFileSet type identifier.
- class alias_api.AlReferenceLayer
A base class that encapsulates access to Reference Layers.
- copy_wrapper(self: alias_api.AlReferenceLayer) alias_api.AlObject
Return an exact duplicate of this AlReferenceLayer wrapper.
- delete_object(self: alias_api.AlReferenceLayer) int
Delete the AlReferenceLayer from the Alias Universe and return the status of the performed operation.
- get_colour(self: alias_api.AlReferenceLayer) Tuple[int, std::array<unsigned char,4>]
Return the colour of this layer.
- get_owner(self: alias_api.AlReferenceLayer) alias_api.AlReferenceFile
Return the AlReferenceFile owner of this object.
- is_visible(self: alias_api.AlReferenceLayer) bool
Return True if the layer is visible.
- symmetric_normal(self: alias_api.AlReferenceLayer) Tuple[int, float, float, float]
Return the symmetry normal of this object.
- symmetric_origin(self: alias_api.AlReferenceLayer) Tuple[int, float, float, float]
Return the symmetry origin of this object.
- symmetry_state(self: alias_api.AlReferenceLayer) alias_api.SymmetryState
Return the AlReferenceFile owner of this object.
- type(self: alias_api.AlReferenceLayer) alias_api.AlObjectType
Return the AlReferenceLayer type identifier.
- class alias_api.AlRetrieveOptions
A structure used to transfer options that control the retrieve() method.
An AlRetrieveOptions structure is used set or determine the options that the AlUniverse::retrieve() method uses to tailor the import of files. To avoid setting all of the fields of AlRetrieveOptions using AlUniverse::setRetrieveOptions(), it is recommended that the current values be acquired first using AlUniverse::retrieveOptions().
General Options:
new_stage:
Determines if all retrieved geometry is put in the current stage, or is put in a new stage named after the filename. If set to TRUE, then the retrieved geometry will be put in a new stage called <filename><ext> (e.g. model.iges -> modeliges) and this stage will be made current.
Wire File Options:
All wire file options default to TRUE.
keep_windows:
If set to TRUE, the modelling window layout contained in wire files will be retrieved, and if set to FALSE, the window layout will not be retrieved.
ckeep_cameras:
If set to TRUE, the cameras contained in wire files will be retrieved, and if set to FALSE, the cameras will not be retrieved.
keep_animation:
If set to TRUE, both the animation and the model contained in wire files will be retrieved, and if set to FALSE, only the model will be retrieved.
Note: If a window contains an animated camera and keep_animation is TRUE then this window will be retrieved also, even if keep_windows is FALSE.
keep_backgrounds:
If set to TRUE, the background contained in wire files will be retrieved, and if set to FALSE, the background will not be retrieved.
keep_unitsTolerances: If set to TRUE, linear units, angular units, and construction toleranced contained in the wire will be retrieved and set. If set to FALSE, the units and tolerances in the wire file are ignored. Only relevent for OpenAlias plugins.
keep_renderGlobals:
If set to TRUE, the render global information stored in a wire file will be retrieved and set. If set to FALSE, this information will be ignored. Only relevent for OpenAlias plugins.
IGES/VDAIS/C4X/JAMA-IS and VDAFS File Options:
group:
If set to TRUE, all geometry retrieved from the file will be grouped under a node named after the translator. For example, IGES geometry will be grouped under a node called “IGES_FILE”. and STEP geometry will be grouped under a node called “STEP_FILE”. If set to FALSE, this group node node will not be created. The default is FALSE.
coalesce:
If set to TRUE, multiple knots will be removed based on continutity in IGES Parametric Curve and Surface geometry, and all VDAFS curve and surface geometry. The default is FALSE.
annotation:
If set to TRUE, supported geometric entities that have been flagged for use as annotation will be retrieved. If set to FALSE, these entities will not be retrieved. This option does not apply to VDAFS.
trim_to_surf:
If set to TRUE, retrieved Trimmed or Bounded surfaces whose boundaries are the same as, or iso-parametric to, the natural boundaries of the untrimmed surface, will be converted to untrimmed surfaces by shrinking the surface to the trim boundaries. If set to FALSE, trimmed surfaces will be represented as such even if the trim boundary information is unnecessary. The default is TRUE. This option does not apply to VDAFS.
scale:
All retrieved geometry will be scaled by this factor. The default is 1.0.
layer_or_set:
This controls the mapping of the IGES/VDAIS/JAMIAS Level. The options are a) kLayer, maps level to layer, this is the default b) kSet, maps level to set c) kLayerAndSet, maps level to layer and set d) kNoLayerOrSet, there is no mapping level is ignored. This option does not apply to VDAFS or C4
default_trim:
This controls the type of curves that will be used in trimming a surface. The options are a) kParameter, use the parameter (2D) space curves, this is the default. b) kWorld, use the world (3D) space curves c) kUseFlag, use the preference in the IGES/VDAIS/JAMAIS/C4 file NOTE kUseFlag is invalid for VDAFS.
create_scan_data:
This control the conversion of “Scan Data” 106 Forms 1-3, 11-13 and 63. If on this entity is treated as Scan Data on IGES import. During VDAFS import, PSET and MDI entities are treated as Scan Data.
DWG/DXF File Options.
group:
See description above.
stitch:
Determines whether to stitch the surfaces of a solid into a shell (TRUE) or to group them instead (FALSE).
%canonymous_blocks Determines whether “anonymous” DWG/DXF BLOCK entities are processed (TRUE) or ignored (FALSE). The default is FALSE, since mostly, these BLOCK entities contain pattern hatching lines.
units:
If the units of the DWG/DXF coordinate data is known, it can be set using this option so that the data is properly scaled. This option is necessary since the units of the DWG/DXF coordinate data is not stored in the file. The default is inches (kInches), but it can be set to any of the following values: kMiles, kFeet, kInches, kMils, kMicroInches, kKilometers, kMeters, kCentimeters, kMillimeters, or kMicrons.
scale:
See above for description of this field.
- class alias_api.AlRevSurfAttributes
Interface to Alias revolved surface attributes.
AlRevSurfAttributes is a class derived from the AlAttributes class. This class allows access to some of the attributes of a revolved surface, in this case the start and end angles of revolution.
When querying the attributes of a revolved surface (retrieved from IGES or created in Alias with exact ON) the first attribute will be an AlRevSurfAttributes, the second will be an AlLineAttributes representing the axis of revolution, and the remainder of the attributes describe the line which was revolved to generate the surface.
- copy_wrapper(self: alias_api.AlRevSurfAttributes) alias_api.AlObject
This method makes a copy of the AlRevSurfAttributes. The returned AlRevSurfAttributes will reference the same data as the original.
- end_angle(self: alias_api.AlRevSurfAttributes) float
Returns the end angle in degrees for the revolved surface.
- start_angle(self: alias_api.AlRevSurfAttributes) float
Returns the start angle in degrees for the revolved surface.
- type(self: alias_api.AlRevSurfAttributes) alias_api.AlObjectType
Returns the class identifier ‘ConicAttributeType’.
- class alias_api.AlSet
Basic Interface to Alias set structures.
A set can be described as a storable list. A set can contain any combination of cameras, dag nodes, curve CV’s and surface CV’s, or polyset vertices. A set can be exclusive or multi - exclusive means that a member of a set can be in no other set; multi means that a member of the set can be in any other non-exclusive set.
You can access the members of a set by traversing a set’s list of members.
If you remove all members of a set, the empty AlSet object must be explicitly deleted. If you store an empty set, it will be lost when you retrieve your wire file into the interactive Alias package.
The following classes can be grouped into sets: AlDagNode, AlPerspectiveCamera, AlCurveCV, AlPolysetVertex and AlSurfaceCV.
- apply_iterator_to_members(self: alias_api.AlSet, itr: AlIterator) int
Apply the given iterator to eaach member of this set.
See documentation for AlIterator.
- Parameters
itr (AlIterator) – The iterator to apply to each set member
- Returns
The status code result of the operation Success - operation exited normally InvalidArgument - ‘iter’ was None Failure - operation exited abnormally InvalidObject - the set is invalid
- Return type
int(AlStatusCode)
- copy_wrapper(self: alias_api.AlSet) alias_api.AlObject
Return an exact duplicate of this AlSet object.
- create(self: alias_api.AlSet, exclusive: int) int
Does any initialization and allocation of data for an AlSet.
If the ‘exclusive’ flag is set to True, then this set is made an exclusive set (ie. the members of this set are not allowed to be members of any other set). If it is set to False, then the set is designated as “multiple” (ie. the members of this set can be in any other non-exclusive set).
- Parameters
exclusive (bool) – state to set the exclusive flag for this set (see above)
- Returns
The status code result of the operation: sSuccess - set was created sInsufficientMemory - no memory
- Return type
int(AlStatusCode)
- delete_object(self: alias_api.AlSet) int
Delete the AlSet from the Alias Universe and return the status of the performed operation.
- first_member(self: alias_api.AlSet) AlSetMember
Return the AlSetMember that is the first member in the list of members of this set.
Return None if this set has no members. Note that this operation is a O(log n) operation and is provided for convience. If you intend to perform an operation on every element in the set, use an iterator.
- is_empty(self: alias_api.AlSet) int
Return True if the set is empty (ie. it has zero members), otherwise return False.
- is_exclusive(self: alias_api.AlSet) int
Return True if the set is exclusive, or False if the set is ‘multiple’.
- property name
Get or set the AlSet name.
- next_set(self: alias_api.AlSet) alias_api.AlSet
Return the next AlSet in the set list, or None if there are no more sets.
- number_of_members(self: alias_api.AlSet) int
Return the number of members belonging to this set. Return -1 if the set is invalid.
- prev_set(self: alias_api.AlSet) alias_api.AlSet
Return the previous AlSet in the set list, or None if there are no more sets.
- set_exclusive(self: alias_api.AlSet, on: int) int
Makes the current set exclusive or multiple. If ‘on’ is True then the set is made exclusive.
- type(self: alias_api.AlSet) alias_api.AlObjectType
Return the AlSet type identifier.
- class alias_api.AlSetMember
Basic Interface to the members of Alias set structures.
This class provides utility functions for set operations. The first AlSetMember of a set can be retrieved from the AlSet. Then iteration through the sets can be performed using the calls provided within this class.
The following classes can be grouped into sets: AlDagNode, AlPerspectiveCamera, AlCurveCV, AlPolysetVertex and AlSurfaceCV. These classes use multiple inheritance which include the AlSettable class. Use the add_to_set() method of class AlSettable to add the object to a set.
- copy_wrapper(self: alias_api.AlSetMember) alias_api.AlObject
Return an exact duplicate of this AlSetMember object.
- next_set_member(self: alias_api.AlSetMember) alias_api.AlSetMember
Return the next AlSetMember. Return None if there is no next set member.
- object(self: alias_api.AlSetMember) alias_api.AlObject
Return the object that this set member references.
- prev_set_member(self: alias_api.AlSetMember) alias_api.AlSetMember
Return the previous AlSetMember. Return None if there is no next set member.
- remove_from_set(self: alias_api.AlSetMember, set: alias_api.AlSet) int
Remove this member from the set.
- Parameters
set (AlSet) – The set to remove this from
- Returns
The status code of the result: Success - If the object was removed successfully InvalidArgument - The set was invalid ObjectNotAMember - If the object was not found in this set InvalidObject - The set is invalid
- Return type
int(AlStatusCode)
- set(self: alias_api.AlSetMember) alias_api.AlSet
Return the set that this set member belongs to.
- type(self: alias_api.AlSetMember) alias_api.AlObjectType
Return the AlSetMember type identifier.
- class alias_api.AlSettable
Encapsulates methods common to Alias objects which can belong to sets.
This class is a base class for all objects which can be contained in a set. It provides the methods necessary to access the set methods of these objects.
Note that this class relies on the fact the classes derived from it overload the extractType function in AlObject. In theory, we should be introducing a new base class, AlTypeable, which has a pure virtual extractType method. But this introduces a lot of extra code. Let’s just assume for now that if AlFoo inherits AlSettable, then AlFoo provides a working extractType method.
- add_to_set(self: alias_api.AlSettable, arg0: AlSet) int
Adds this object to the set
- Parameters
set (AlSet) – set to add to
- Returns
The status of the operation: Success - successfully added to the set. InsufficientMemory - not enough memory available. ObjectInSet - this object already belongs to this set ObjectInAnotherSet - this set is exclusive and this object already belongs to another set. ObjectInExclusiveSet - this object already belongs to an exclusive set. ObjectAncestorInSet - an ancestor of this object already belongs to this set. ObjectDescendentInSet - a descendent of this object already belongs to this set. InvalidArgument - set was NULL or, this object is a AlSurfaceCV and is the target of a construction history. InvalidObject - this object was invalid
- Return type
- apply_iterator_to_sets(self: alias_api.AlSettable, arg0: AlIterator) Tuple[int, int]
Apply the given iterator to all the sets affect by this object. See the documentation for AlIterator.
Warning: be careful when using this iterator. If you modify the actual set during an iteration, it is possible that this routine will end up pointing to invalid data and send you garbage. This should not happen when simply applying transformations to a set. But deleting a set using this method is considered unsafe. If you do it, return immediately.
- Parameters
iter (AlIterator) – the iterator to apply to each set
- Returns
A tuple containing: (1) the status of the application of the iterator
Success - the applyIteratorToSets exited normally Failure - applyIteratorToSets exited abnormally InvalidArgument - iter is NULL
the return value of the last application of the iterator’s function
- Return type
tuple<AlStatusCode, int>
- first_set(self: alias_api.AlSettable) AlSet
Finds and returns the first set of which this object is a member. If no such set can be found, None is returned.
- is_set_member(self: alias_api.AlSettable, arg0: AlSet) AlSetMember
Returns the AlSetMember object if it is a member of the set.
- Parameters
set (AlSet) – the object to test membership in.
- Returns
The AlSetMember object representing the set membership.
- Return type
- next_set(self: alias_api.AlSettable, arg0: AlSet) AlSet
Finds and returns the set following the given one of which this object is a member. If no such set can be found, None is returned.
- prev_set(self: alias_api.AlSettable, arg0: AlSet) AlSet
Finds and returns the set preceding the given one of which this object is a member. If no such set can be found, None is returned.
- remove_from_all_sets(self: alias_api.AlSettable) int
Removes this object from all sets in the universe that it may be in.
- Returns
The status of the operation Success - object was removed from all sets
- remove_from_set(self: alias_api.AlSettable, arg0: AlSet) int
Removes this object from the set. If the given dag node was not found in the set, then nothing is removed.
- Parameters
set (AlSet) – the set to remove from.
- Returns
The status of the operation: Success - if this object was removed successfully InvalidArgument - set was invalid ObjectNotAMember - if the object was not found in this set InvalidObject - the set is invalid
- Return type
- class alias_api.AlShader
Base object for representing shader data
This class encapsulates the basic functionality for checking and setting the name of a shader as well as accessing the textures that a particular shader refers to, and the animation on the shader. Shader objects are accessible through both the AlUniverse class and the objects that reference them (AlSurface and AlFace classes).
A shader object may reference textures. The first_texture() and next_texture() methods are used to access these textures.
first_texture() returns the first texture that the shader object references. next_texture() moves from a given referenced texture to the next texture in order, as related to the shader object. (See the similar methods for the AlTexture/AlEnvironment classes.)
The animation on a shader can be accessed through the first_channel() and next_channel() methods. All the channels on the shader can be deleted by calling deleteAnimation().
The shader parameters can be accessed through the parameter() and setParameter() methods. Each shader has a specific set of parameters that are valid for it that depend on its type. The full list of shader parameters can be seen in the file AlShadingFields.h. For example, all parameters specific to the Blinn shader have names of the form kFLD_SHADING_BLINN_*. Parameters common to all shaders have the form kFLD_SHADING_COMMON_*. All parameters are treated as doubles even though this may not necessarily be what they are. This is done to make the interface as simple and consistent as possible.
- add_texture(self: alias_api.AlShader, field_name: str, texture_name: str) Tuple[int, alias_api.AlTexture]
Add a texture to the field of the AlShader.
- apply_iterator_to_textures(self: alias_api.AlShader, iter: AlIterator, retcode: int) int
Applies the given AlIterator to all textures of this shader. The second argument will be set to the return value of the last application of the iterator’s function.
- copy_object(self: alias_api.AlShader) alias_api.AlShader
Copy this AlShader object and return the new object, or None if the copy operation failed.
- copy_wrapper(self: alias_api.AlShader) alias_api.AlObject
Return an exact duplicate of this AlShader wrapper.
- create(self: alias_api.AlShader) int
Initialize and allocate space for the AlShader and add it to the global list of shaders in the Alias Universe.
- delete_object(self: alias_api.AlShader, force: bool = False) int
Delete the AlObject from the Alias Universe and return the status of the performed operation.
- fields(self: alias_api.AlShader) List[alias_api.AlShadingFields]
return a list of all the fields used by the texture.
- first_texture(self: alias_api.AlShader) alias_api.AlTexture
Return the first texture under this shader.
- get_assigned_nodes(self: alias_api.AlShader) List[alias_api.AlDagNode]
Return the list of AlDagNodes that are assigned to this AlShader.
- Returns
The list of dag nodes
- Return type
list<AlDagNode>
- is_assigned(self: alias_api.AlShader, node: alias_api.AlDagNode) bool
Return True if the node is assigned to the shader, else False.
- is_used(self: alias_api.AlShader) int
Return True if the AlShader is being used by another object.
- mapped_fields(self: alias_api.AlShader) List[str]
return a list of all the mapped fields used by the shader.
- property name
Get or set the unique identifying name property.
- next_texture(self: alias_api.AlShader, cur_texture: alias_api.AlTexture) alias_api.AlTexture
Get the next texture under this shader.
- parameter(self: alias_api.AlShader, parameter_name: alias_api.AlShadingFields) Tuple[int, float]
Finds the value of a given texture field.
- remove_texture(self: alias_api.AlShader, field_name: str) int
Remove the texture from the field of the AlShader.
- set_parameter(self: alias_api.AlShader, parameter_name: alias_api.AlShadingFields, value: float) int
Changes the value of the texture field.
- property shading_model
Get or set the shading model property.
- type(self: alias_api.AlShader) alias_api.AlObjectType
Return the shader type identifier.
- class alias_api.AlShadingFields
Types for shader methods.
Members:
CommonColorB
ChromeFloorColorG
CommonTransparencyShade
CommonColorR
CommonColorG
CommonTransparencyG
BallBottom
HighlightMax
SCloudLevelMax
FogMazAltitude
MasterLightAOContrast
BlinnSpecularR
CommonIncandescentB
HighlightHLDirectionY
SkySunsetBrightnessB
SFileRatio
ShaderGlowGlowColorR
StencilValRange
CommonIncandescentR
GridVWidth
SkySunsetBrightnessR
ShaderGlowGlowColorB
CommonTextureInvert
FogAMult
BlinnDiffuse
GraniteCellSize
CommonTransparencyB
BlinnReflectivity
BlinnSpecularG
CommonTransparencyR
CommonIncandescentG
SkySunsetBrightnessG
CommonUseBackgroundColor
CommonRefractiveIndex
CommonReflectionLimit
LambertDiffuse
SkyCloudThreshold
CommonPsysSpeedDecay
CommonTextureAlphaOffset
CommonRefractionSamples
FogDepthB
CommonRefractionLimit
StencilKeyMasking
CommonShadowLevelLimit
PhongSpecularG
CommonRespectReflectionMap
SWoodRandomness
RampHueNoiseFrequency
SFractalLevelMin
CommonTextureVCoverage
PhongDiffuse
SWoodLayerSize
FogColumn
SMarbleRatio
CommonPsysBolbNoise
PhongSpecularR
PhongSpecularB
SkyAirDensity
ChromeGridWidthOffset
CommonPsysUnused
PhongReflectivity
PhongShinyness
ShaderGlowGlowRadialNoise
BlinnSpecularB
CommonPsysHairLengthMax
BlinnSpecularRolloff
LeatherCreaseColorG
BlinnEccentricity
BackgroundColorR
CommonFillColorB
ChromeLightColorR
SWoodFillerColorB
BackgroundColorG
RampNoise
ChromeLightColorG
BackgroundColorB
CommonFillColorR
TextureActive
ChromeLightColorB
SWoodFillerColorR
CommonTextureUCoverage
FogColorR
FogColorG
FogColorB
CommonPsysSurfaceShading
FogDepthR
StencilThreshold
FogAOffset
FogDepthG
CommonTextureAlphaMult
FilerType
FogMinAltitude
MountainSnowDropOff
CommonTextureRGBOffsetR
FogFogType
SCloudColor2R
CommonTranslucenceDepth
CommonTextureRGBMultR
SCloudColor2G
CommonTextureRGBMultG
SCloudColor2B
CommonTextureRGBMultB
CommonTextureRGBOffsetG
CommonTextureUOffset
CommonTextureRGBOffsetB
CommonTextureBlurMult
CommonPsysBranchAngle
CommonPsysRenderType
CommonTextureBlurOffset
SMarbleContrast
CommonTextureRotate
CommonTextureURepeat
ShaderGlowHaloTyoe
CommonTextureMirror
CommonTextureVRepeat
SFractalAmplitude
ClothVThreadColorR
CommonTextureVOffset
CommonTextureUnused
ClothVThreadColorB
CommonTextureUTranslate
CommonTextureVTranslate
CommonTextureUWrap
CommonTextureVWrap
BulgeUWidth
SCloudCenterThreshold
WaterSmoothness
CommonPsysColorG
BulgeVWidth
GridFillerColorR
BallInclination
ClothUWave
SMarbleLevelMax
BallElevation
WaterWindU
BallEyeSpace
BallReflect
ChromeGRidWidth
RampSatNoise
GroundPlaneShadowTransparency_
BallSkyRadius
ChromeLightWidth
MountainRockRoughness
GraniteDensity
BallTop
BallLeft
SMarbleLevelMin
BallRight
BallFront
CommonPsysHairLengthMin
BallBack
CheckerColor1R
CheckerColor1G
SynWallElasticity
CheckerColor1B
CheckerColor2R
CheckerColor2G
RampValNoiseFrequency
CheckerColor2B
StencilPositiveKey
CommonPsysFriction
CheckerContrast
ClothUThreadColorR
ClothUThreadColorG
ClothUThreadColorB
SFractalLevelMaz
ClothVThreadColorG
ClothGapColorR
WaterRipplePhaseVelocity
WaterVMin
SkySunHaloBrightnessB
ClothGapColorG
SkySunHaloBrightnessG
ShaderGlowGlowStarLevel
ClothGapColorB
CommonTextureStagger
ClothUThreadWidth
SkySkySamples
ClothVThreadWidth
ClothVWave
SMarbleFillerColorR
ClothRandomness
SRockColor2R
CommonPsysTransparencyMethod
ClothWidthSpread
ClothBrightnessSpread
ChromeSkyColorR
ChromeZenithColorG
GraniteColor2G
DynTurbTimeResolution
ChromeSkyColorG
ChromeZenithColorR
GridLineColorB
GraniteColor2R
ChromeSkyColorB
GridLineColorG
WaterUMax
FractalAnimated
ChromeZenithColorB
GridLineColorR
GraniteColor2B
SWoodXRipples
SMarbleXRipples
ChromeLightWidthMulti
ChromeLightWidthOffset
LeatherDensity
ChromeLightDepth
HighlightHLDirectionZ
ChromeLightDepthMult
ShaderGlowGlowType
CommonFillColorG
GeometryScale
ChromeLightDepthOffset
SWoodFillerColorG
ChromeFloorColorR
CommonPsysSize
ChromeFloorColorB
ChromeHorizonColorR
StencilColorKeyB
ChromeHorizonColorG
CommonPsysBlobLighting
SWoodAge
ChromeHorizonColorB
StencilColorKeyR
ChromeGridColorR
ChromeGridColorG
ChromeGridColorB
ChromeRealFloor
ChromeGridWidthMult
ChromeGridDepth
ShaderGlowGlowColorG
ChromeGridDepthMult
ChromeGridDepthOffset
WaterRippleSpreadStart
FractalAmplitude
CurvatureMin
MasterLightColorB
CurvatureMax
FractalThreshold
FractalRatio
FractalLevelMin
SCloudXRipples
LensEffectFilterB
SphereShearU
CommonFogActive
FractalLevelMax
FractalTime
GridFillerColorG
DynTurbIntensity
GridFillerColorB
CommonPsysAttraction
GridUWidth
WaterReflectionBoundary
GridContrast
HighlightMin
SCloudLevelMin
ShaderGlowHaloLensFlare
HighlightHLDirectionX
MountainSnowColorR
NoiseAmplitude
SFractalThreshold
MountainSnowColorG
MountainSnowColorB
SMarbleZRipples
SkySunBrightnessG
MountainRockColorR
WaterRippleTime
MountainAmplitude
CommonPsysSpeedRange
MountainSnowRoughness
MountainBoundaryRoughness
CommonGlowIntensity
CommonPsysIncandescenceG
MountainSnowAltitude
GraniteColor1B
GraniteFillerColorG
WaterSubFrequency
MountainSnowMaxSlope
MountainSnowLevelMax
NoiseThreshold
NoiseAnimated
DynBackOffset
NoiseTime
WaterAmplitude
CommonPsysBlobThreshold
RampUWave
RampVWave
RampNoiseFrequency
CommonPsysBlurQuality
DynFloorOffset
RampHueNoise
RampValNoise
CommonPsysGrowMethod
RampSatNoiseFrequency
DynTurbSpaceResolution
SCloudColor1R
SCloudColor1G
SCloudColor1B
SCloudContrast
ShaderGlowHaloColorG
SCloudSoftEdges
SCloudTransparencyRange
SCloudEdgeThreshold
SnowThreshold
ShaderGlowHaloColorR
SCloudAmplitude
SCloudRatio
SnowSurfaceColorR
SCloudYRipples
RampInterpolation
GraniteSpottyness
SCloudZRipples
SFractalRatio
SFractalXRipples
SFractalYRipples
SFractalZRipples
SkyCloudBrightnessR
WaterFrequency
LeatherCellSize
ShaderGlowGlowSpread
DynTurbRougness
SkyTotalBrightness
SkySunBrightnessR
SkySunBrightnessB
SkySunHaloBrightnessR
CommonPsysMotionType
SkySunElevation
SkySunAzimuth
SFileYAmplitude
SkySunSize
SkySunBlur
LeatherCellColorR
SkySkyBrightnessR
SkySkyBrightnessG
SFileZRipples
StencilSatRange
SkySkyBrightnessB
SkyDustDensity
ShaderGlowQuality
SkySkyThickness
SkySkyRadius
LightTunnelNumberBands
SkyHasFloor
SkyFloorTextureR
SkyFloorTextureG
GraniteThreshold
SkyFloorTextureB
SkyCloudBrightnessG
LightTunnelBandwidth
SkyCloudBrightnessB
SphereShearV
SkyCloudDensity
SkyCloudPower
SkyCloudAltitude
CommonPsysDiffusionMethod
SkyCloudHaloSize
SkyFloorSamples
SkyCloudSamples
SMarbleFillerColorG
StencilEdgeBlend
SWoodGrainSpacing
StencilMaskLevel
StencilMaskBlur
StencilColorKeyG
StencilHueRange
CommonPsysIncandescenceR
GraniteFillerColorR
SFileXAmplitude
WaterUMin
SFileLevelMin
CommonPsysBendV
SFileLevelMax
SnowThickness
CommonTextureChordLength
SFileXRipples
SFileYRipples
SMarbleFillerColorB
SMarbleVienColorR
SMarbleVienColorG
SMarbleVienColorB
SMarbleVienWidth
SnowDepthDecay
ShaderGlowRotation
SMarbleDiffusion
MasterLightIntensity
CommonPsysSplitTime
SMarbleAmplitude
SMarbleYRipples
SnowColorR
CommonTextureBlend
SnowColorG
SnowColorB
ShaderGlowGlowOpacity
CommonTextureNotUsed
SnowSurfaceColorG
SRockDiffusion
SnowSurfaceColorB
SphereFlip
DynLeft
ShaderGlowGlowIntensity
SRockColor1R
CommonPsysHairStiffness
SRockColor1G
SRockColor1B
LeatherThreshold
CommonTranslucence
SRockColor2G
SRockColor2B
SRockMixRatio
SRockGrainSize
SFileStagger
LeatherCellColorG
LeatherCellColorB
LeatherCreaseColorR
LeatherCreaseColorB
LeatherSpotyness
LeatherRandomness
LeatherCreases
GraniteColor1R
CommonPsysIncandescenceB
GraniteColor1G
GraniteFillerColorB
LightTunnelVisible
GraniteColor3R
CommonPsysParentShading
GraniteColor3G
CommonPropsDensity
GraniteColor3B
GraniteMixRatio
LensEffectFilterR
GraniteRandomness
GraniteCrease
SWoodVeinColorR
SWoodVeinColorG
SWoodVeinColorB
ShaderGlowRadialNoiseFrequency
SWoodVeinSpread
SWoodGrainColorR
SWoodGrainColorG
SWoodGrainColorB
WaterWindV
SWoodGrainContrast
SWoodCenterU
SWoodCenterV
SWoodXAmplitude
SWoodYAmplitude
DynLeftOffset
SWoodRatio
ShaderGlowStarPoints
CommonPsysCollisionMethod
SWoodLevelMin
SWoodLevelMax
CommonPsysTimeRandom
LensEffectFilmGrain
SWoodYRipples
SWoodZRipples
WaterRippleSpreadRate
VolumeFrom
VolumeTo
CurvatureRepeats
ShaderGlowHaloRadialNoise
WaterNumWaves
WaterWaveTime
WaterWaveVelocity
WaterRippleDropSize
WaterRippleFrequency
WaterRippleAmplitude
WaterRippleUOrigin
WaterRippleVOrigin
DynTurbPersistance
WaterRippleGroupVelocity
WaterVMax
CommonHideGlowSource
CommonPropsFriction
CommonSurfaceWidth
CommonTransparencyDepth
CommonChromaticAberration
CommonRefractionJitter
CommonUseFillerColor
CommonLineThickness
CommonUPatchLines
CommonVPatchLines
CommonTextureWrap
RampType
SFileProjection
DynTurbGranularity
HighlightRepeats
FileUseExtension
FileFrameExtension
ShaderGlowThredhold
ShaderGlowGlowEccentricity
ShaderGlowHaloColorB
ShaderGlowHaloSpread
ShaderGlowHaloEccentricity
ShaderGlowHaloStarLevel
LensEffectFilterG
MasterLightColorR
MaterLightColorG
CommonOpacityDepth
CommonPsysEmission
CommonPsysGlowIntensity
CommonPsysLifespanMin
CommonPsysColorR
CommonPsysColorB
CommonPsysTransparencyR
CommonPsysTransparencyG
GeometrySourceTexture
CommonPsysTransparencyB
DynFrontOffset
CommonPsysTranslucence
CommonPsysBolbNoiseFrequency
CommonPsysDensity
CommonPsysSizeRange
CommonPsysBuoyancy
GeometryType
CommonPsysMass
CommonPsysStartFrame
CommonPsysElasticity
CommonPsysAtomsPerSec
CommonPsysSpeed
CommonPsysLifespanMax
CommonPsysRandomization
CommonPsysBlurLength
CommonPsysCollisions
CommonPsysCycles
CommonPsysNoiseAspect
CommonPsysNumChildren
CommonPsysBendU
CommonPsysCurl
CommonPsysEndFrame
CommonPsysUseParticleFile
CommonPsysHairSegments
CommonPropsPropMass
CommonPropsElasticity
CommonPropsDragCoeff
DynGravity
DynAitDensity
DynForceScale
DynTimeScale
DynFloor
DynCeiling
DynCeilingOffset
DynRight
DynRightOffset
DynTurbVariability
DynFront
DynBack
DynTurbType
DynTurbSpread
DynTurbAnimated
DynWallFriction
CommonMatteObject
FogMinDistance
FogMaxDistance
Cache
CommonReflectBackground
ShaderGlowHaloIntensity
TransparencyMaterialCode
ClearCoatActive
ClearCoatIndex
ClearCoatScale
ClearCoatBias
ClearCoatMaterialCode
LightTunnelEnable
LightTunnelIntensity
LightTunnelColorR
LightTunnelBandFringe
GeometryRotate
GeometryHeight
- property name
- class alias_api.AlShell
Interface to Alias nurbs surface geometry.
A shell is a collection of surfaces which behave as a single object. Each surface can have its own set of trim curves. A cube with six square sides is a shell. The cube can be assigned a single shader and rendering formation. The cube is made of a collection of 6 spline surfaces.
The AlTrimRegions are inaccurately named. They actually represent the surfaces in the shell.
- assign_shader(self: alias_api.AlShell, shader: AlShader) int
Assign the given shader to the surface.
If the surface already has shaders they will be removed from the surface. The surface must have a surface node for this method to succeed.
- Parameters
shader (AlShader) – the shader which will be assigned to the surface.
- Returns
The status code result Success - the shader was successfully assigned to the surface. InvalidArgument - ‘shader’ was invalid Failure - the shader was not created. InvalidObject - the surface is invalid
- Return type
int(AlStatusCode)
- copy_wrapper(self: alias_api.AlShell) alias_api.AlObject
Return an exact duplicate of this AlShell wrapper.
- first_shader(self: alias_api.AlShell) AlShader
Return the first shader that this surface object references. Return None if there are no shaders.
- get_layered_shader(self: alias_api.AlShell) AlLayeredShader
Return the attached layered shader.
- get_switch_shader(self: alias_api.AlShell) AlSwitchShader
Return the attached switch shader.
- layer_shader(self: alias_api.AlShell, shader: AlShader) int
Layers the given shader on the surface.
The surface must have a surface node for this method to succeed.
- Parameters
shader – the shader which will be layered on the surface.
- Tye shader
AlShader
- Returns
The status code result Success - the shader was successfully layered on the surface. InvalidArgument - ‘shader’ was invalid Failure - the shader was not created. InvalidObject - the surface is invalid
- Return type
int(AlStatusCode)
- next_shader(self: alias_api.AlShell, shader: AlShader) AlShader
Return the shader after the given shader in the object’s shader list.
Return None if there isn’t a next shader. Specifying None as parameter will return the first shader.
- shell_node(self: alias_api.AlShell) AlShellNode
Return the AlShellNode for this surface.
- type(self: alias_api.AlShell) alias_api.AlObjectType
Return the AlShell type identifier.
- class alias_api.AlShellNode
Dag node class for shells.
This method provides DagNode level access to Shells. Use the shell method to get the actual AlShell underneath this DagNode.
- copy_wrapper(self: alias_api.AlShellNode) alias_api.AlObject
Return an exact duplicate of this AlShellNode wrapper.
- shell(*args, **kwargs)
Overloaded function.
shell(self: alias_api.AlShellNode) -> alias_api.AlShell
Return a pointer to the shell data structure which can be used to access the geometry of the shell.
shell(self: alias_api.AlShellNode, arg0: alias_api.AlTM) -> alias_api.AlShell
Return a pointer to the shell data structure which can be used to access the geometry of the shell. The AlTM will be updated with the shell’s transformation matrix.
- type(self: alias_api.AlShellNode) alias_api.AlObjectType
Return the AlShellNode type identifier.
- class alias_api.AlSpacePoint
Interface to Alias space points.
AlSpacePoint is the interface to Alias Space points. A space point can be created at any point in the world coordinate system. There are methods to query and modify the position of the point in this class.
- copy_wrapper(self: alias_api.AlSpacePoint) alias_api.AlObject
Return an exact duplicate of this AlSpacePoint wrapper.
- create(self: alias_api.AlSpacePoint, x: float, y: float, z: float) int
Create an AlSpacePoint at the given coordinates.
- type(self: alias_api.AlSpacePoint) alias_api.AlObjectType
Return the AlSpacePoint type identifier.
- class alias_api.AlStatusCode
Resulting operation status codes
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
- class alias_api.AlStoreOptions
A structure used to transfer options that control the store() method.
An AlStoreOptions structure is used set or determine the options that the store() method uses to tailor the export of files.
To avoid setting all of the fields of AlStoreOptions using set_store_options(), it is recommended that the current values be acquired first using store_options().
- class alias_api.AlSurface
Interface to Alias nurbs surface geometry.
AlSurface is the interface to the geometric data of Alias’ NURBS surface objects. To create a surface, first instantiate and create an AlSurface and then instantiate and create an AlSurfaceNode. There is only a limited amount that you can do with an AlSurface that does not have an AlSurfaceNode.
For more information on how to create the surface geometry, see the description for the create() method.
The method is_construction_history_resulting_surface() is used to find out if a surface may be modified based on changes to its constructor objects.
A NURBS surface is described as having two dimensions u and v. Many of the surface properties (form, multiplicity, etc.) are the same as a NURBS curve but are expressed in both the u and v direction.
The form of a surface in the u or v direction can be one of three types: periodic, closed or open. If a surface is “kPeriodic” in u, then it is tangent continuous in u at all points in that direction. If a surface is “Closed” in u, it is not periodic but its edges in the u direction are coincident. If the surface is neither closed nor periodic in u, it is considered to be “Open”. The same applies in the v direction.
There are two ways to delete an AlSurface. If the AlSurface delete_object() is called, the attached AlSurfaceNode is deleted. If the AlSurfaceNode delete_object() is called, the attached AlSurface is deleted.
You should always create a surface node for a surface. If you create a surface with no surface node, then the surface is not added to the universe. If you should lose the pointer to the the surface, it will become lost memory.
There is one limitation to this class: you cannot add or remove individual CV’s (except by changing multiplicity).
If an AlSurface has curves-on-surface, then you can get a pointer to the first curve-on-surface and then traverse the curves using methods in the class AlCurveOnSurface.
If an AlSurface is trimmed, the trim regions on the surface can be accessed using the first_trim_region() method and then traversed using methods in the class AlTrimRegion.
All AlSurface objects will have at least one shader attached to them. These can be accessed through the first_shader() and next_shader() methods.
All AlSurface objects have render information attached to them. The AlRenderInfo structure can be used to query the surface’s render parameters.
Surfaces are made of surface control points (or CV’s) which you traverse as a list by using the first_cv() in conjunction with the AlSurfaceCV methods. You can also pack the surface information into an array using methods in this class.
What is multiplicity?
An AlSurfaceCV object can actually represent multiple CV’s, depending on the AlSurfaceCV’s multiplicity and periodicity. Notice that in this class there are two sets of methods - some “incl_multiples” and some not (namely “number_of_cvs”, “cvs_world_position”, “cvs_unaffected_position”, etc). The set of methods without multiplicity lets you get all surface CV’s where a surface CV can have multiplicity of 1, 2 or 3. The set of methods “incl_multiples” lets you get ALL surface CV’s including multiples due to a multiplicity > 1 and due to periodicity.
Example 1:
Create a surface in the interactive Alias package with 16 CV’s, and pick the CV which is 2nd in the u direction and 2nd in the v direction. Set the multiplicity of this CV to 3 in the u direction and 2 in the v direction (using the “multiplicity” menu item in the Curve Tools menu). Then:
number_of_cvs() will return 4. number_of_cvs() will return 4.
cvs_world_position must be passed a 4x4x4 CVs matrix, and the u and v multiplicity vectors must each be of length 4.
cvs_unaffected_position() must be passed the same as item 2.
set_cvs_unaffected_position() must be passed the same as item 2.
number_of_cvs_incl_multiples() will return 6. number_of_cvs_incl_multiples() will return 5.
cvs_world_position_incl_multiples() must be passed a 6x5x4 CVs matrix.
You will notice that in this matrix there are duplicate CVs to indicate multiples due to mutiplicity > 1 and periodicity.
cvs_unaffected_position_incl_multiples() must be passed the same as item 6.
You will notice that in this matrix there are duplicate CVs to indicate multiples due to mutiplicity > 1 and periodicity.
set_cvs_unaffected_position_incl_multiples() must be passed the
same as item 6. Similar to items 6 and 7, you should put duplicate CVs to account for multiples although this is not mandatory. You may want to refer to the examples in the AlCurve class description. The way CVs are ignored also applies to this method.
Example 2:
If you create a surface in the interactive Alias package with 16 CV’s and “close” the surface in the u direction (using the “close” menu item in the Object Tools menu), you create a periodic surface. Then:
number_of_cvs() will return 4. number_of_cvs() will return 4.
2. cvs_world_position must be passed a 4x4x4 CVs matrix, and the u and v multiplicity vectors must each be of length 4. 3. cvs_unaffected_position() must be passed the same as item 2. 4. set_cvs_unaffected_position() must be passed the same as item 2. 5. number_of_cvs_incl_multiples() will return 7. number_of_cvs_incl_multiples() will return 4. 6. cvs_world_position_incl_multiples() must be passed a 7x4x4 CVs matrix. 7. cvs_unaffected_position_incl_multiples() must be passed the same as item 6. 8. set_cvs_unaffected_position_incl_multiples() must be passed the same as item 6. Similar to items 6 and 7, you should put duplicate CVs to account for multiples although this is not mandatory. You may want to refer to the examples in the AlCurve class description. The way CVs are ignored also applies to this method.
How do I process a matrix of CV’s?
Methods in this class store CV’s in the V direction first, then in the U direction. Here’s an example of how to get the world positions of the CV’s of a surface and print them out in V direction then U direction. (Notice that the outer “for” loop uses the number of CV’s in the U direction).
- assign_shader(self: alias_api.AlSurface, shader: AlShader) int
Assign the given shader to the surface.
If the surface already has shaders they will be removed from the surface. The surface must have a surface node for this method to succeed.
- Parameters
shader (AlShader) – the shader which will be assigned to the surface.
- Returns
The status code result Success - the shader was successfully assigned to the surface. InvalidArgument - ‘shader’ was invalid Failure - the shader was not created. InvalidObject - the surface is invalid
- Return type
int(AlStatusCode)
- copy_wrapper(self: alias_api.AlSurface) alias_api.AlObject
Return an exact duplicate of this AlSurface wrapper.
- create_sphere(self: alias_api.AlSurface, center: alPyMath::Vec3, radius: float) int
Create a spherical surface from an origin point and a radius.
- delete_object(self: alias_api.AlSurface) int
Delete the AlSurface from the Alias Universe and return the status of the performed operation.
- first_shader(self: alias_api.AlSurface) AlShader
Return the first shader that this surface object references. Return None if there are no shaders.
- get_curves_on_surface(self: alias_api.AlSurface) List[alias_api.AlCurveOnSurface]
Return a list of curve on surface nodes.
- get_layered_shader(self: alias_api.AlSurface) AlLayeredShader
Return the attached layered shader.
- get_shaders(self: alias_api.AlSurface) List[AlShader]
Return a list of shaders.
- get_switch_shader(self: alias_api.AlSurface) AlSwitchShader
Return the attached switch shader.
- is_construction_history_resulting_surface(self: alias_api.AlSurface) int
Returns True if this surface is the resulting surface of a construction history operation, else False.
- layer_shader(self: alias_api.AlSurface, shader: AlShader) int
Layers the given shader on the surface.
The surface must have a surface node for this method to succeed.
- Parameters
shader – the shader which will be layered on the surface.
- Tye shader
AlShader
- Returns
The status code result Success - the shader was successfully layered on the surface. InvalidArgument - ‘shader’ was invalid Failure - the shader was not created. InvalidObject - the surface is invalid
- Return type
int(AlStatusCode)
- property name
Get or set the AlSurface name.
- next_shader(self: alias_api.AlSurface, shader: AlShader) AlShader
Return the shader after the given shader in the object’s shader list.
Return None if there isn’t a next shader. Specifying None as parameter will return the first shader.
- surface_node(self: alias_api.AlSurface) AlSurfaceNode
Return the surface node for this surface. Return None if there is no surface node attached.
- type(self: alias_api.AlSurface) alias_api.AlObjectType
Return the AlSurface type identifier.
- class alias_api.AlSurfaceNode
Dag node class for nurbs surfaces.
AlSurfaceNode is the class used to access and manipulate surfaces within the dag.
This class behaves like other dag nodes (see AlDagNode for a description of the usage and purpose of dag nodes) and in addition allows users to add curves on surfaces and access the geometry of the surface via the surface() method. The surface() method returns a pointer to an AlSurface object which provides the user with the methods used to modify the geometry of the surface. Surfaces can be created from scratch by calling the AlSurfaceNode.create() method, or read in from a wire file.
- copy_wrapper(self: alias_api.AlSurfaceNode) alias_api.AlObject
Return an exact duplicate of this AlSurfaceNode wrapper.
- create(self: alias_api.AlSurfaceNode, surface: alias_api.AlSurface) int
Allocate the dag node and geometry required for this object.
This method must be called once and only once before any other method and only if the surface has been allocated by the user (e.g. not read in from a wire file). It is an error to call this method twice or if the object has been read in from a wire file.
- Parameters
surface (AlSurface) – The surface to create this surface node for.
- Returns
The status code result Success - the surface node was created InvalidArgument - the ‘surface’ was None or invalid Failure - the surface node was not created
- Return type
- delete_object(self: alias_api.AlSurfaceNode) int
Delete the AlSurfaceNode from the Alias Universe and return the status of the performed operation.
- has_history(self: alias_api.AlSurfaceNode) bool
Return True if the surface node’s surface has construction history.
- patch_precision(self: alias_api.AlSurfaceNode) int
Return the patch precision for the surface. Return -1 if the surface is invalid.
- set_patch_precision(self: alias_api.AlSurfaceNode, precision: int) int
Set the patch precision for the surface.
- Parameters
precision (int) – The new patch precision (range is 2-64).
- Returns
The status code result Success - the patch precision was set InvalidArgument - value for patch prevision was invalid InvalidObject - the surface node was invalid
- Return type
- surface(*args, **kwargs)
Overloaded function.
surface(self: alias_api.AlSurfaceNode) -> alias_api.AlSurface
Return a the surface data structure which can be used to access the geometry of the surface.
surface(self: alias_api.AlSurfaceNode, arg0: alias_api.AlTM) -> alias_api.AlSurface
Return a the surface data structure which can be used to access the geometry of the surface.
- type(self: alias_api.AlSurfaceNode) alias_api.AlObjectType
Return the AlSurfaceNode type identifier.
- class alias_api.AlSurfacePoint
Interface to Alias Surface points.
A point can be created in the parametric space of any AlSurface. This point can be queried for the surface normal, tangents, position in world coordinate system, arc lengths, and curvatures. This class contains methods for creating, and moving the surface point.
If the AlSurface is deleted, the surface point created on it is automatically deleted.
- attached_to(self: alias_api.AlSurfacePoint) alias_api.AlSurfaceNode
Return the AlSurfaceNode this AlSurfacePoint is associated with.
- copy_wrapper(self: alias_api.AlSurfacePoint) alias_api.AlObject
Return an exact duplicate of this AlSurfacePoint wrapper.
- create(self: alias_api.AlSurfacePoint, surface: alias_api.AlSurface, u: float, v: float) int
Create an AlSurfacePoint on the given AlSurface.
- type(self: alias_api.AlSurfacePoint) alias_api.AlObjectType
Return the AlSurfacePoint type identifier.
- class alias_api.AlSwitchShader
Base object for representing shader data
This class encapsulates the basic functionality for checking and setting the name of a shader as well as accessing the textures that a particular shader refers to, and the animation on the shader. Shader objects are accessible through both the AlUniverse class and the objects that reference them (AlSurface and AlFace classes).
A switch shader object may reference shaders. The first_shader() and next_shader() methods are used to access these textures.
first_shader() returns the first shader that the shader object references. next_shader() moves from a given referenced shader to the next shader in order, as related to the switch shader object.
- add_shader(self: alias_api.AlSwitchShader, shader: alias_api.AlShader) bool
Add a shader to the switch shader.
- copy_wrapper(self: alias_api.AlSwitchShader) alias_api.AlObject
Return an exact duplicate of this AlSwitchShader wrapper.
- create(self: alias_api.AlSwitchShader) int
Initialize and allocate space for the AlSwitchShader and add it to the global list of shaders in the Alias Universe.
- delete_object(self: alias_api.AlSwitchShader) int
Delete the Alias shader object and return the status code of the delete operation.
- get_active_shader(self: alias_api.AlSwitchShader) alias_api.AlShader
Return the current active shader.
- get_first_inactive_shader(self: alias_api.AlSwitchShader) alias_api.AlShader
Returns the first inactive shader.
- get_next_inactive_shader(self: alias_api.AlSwitchShader, cur_shader: alias_api.AlShader) alias_api.AlShader
get the next inactive shader.
- is_used(self: alias_api.AlSwitchShader) int
Returns True if the SwitchShader object is assigned to a gemoetry node, else False.
- property name
Get or set the AlSwitchShader name.
- remove_shader(self: alias_api.AlSwitchShader, shader: alias_api.AlShader) bool
Remove a shader to the switch shader.
- set_active_shader(self: alias_api.AlSwitchShader, shader: alias_api.AlShader) None
Set the current active shader.
- type(self: alias_api.AlSwitchShader) alias_api.AlObjectType
Return the AlSwitchShader type identifier.
- class alias_api.AlTM
Basic Interface to Alias transformation matrix.
This class encapsulates the functionality for creating, manipulating and deleting Alias 4x4 transformation matrices.
Tranformation matrices are used to perform linear transformations of a vector. Composite transformations are performed by multiplying the individual transformations together.
- The matrix is ordered as AlTM[y][x]:
0,0 0,1 0,2 0,3 1,0 1,1 1,2 1,3 2,0 2,1 2,2 2,3 3,0 3,1 3,2 3,3
The transformation matrix usually takes the form:
- TM = | r00 r01 r02 0 |
- r10 r11 r12 0 |r20 r21 r22 0 |tx0 ty0 tz0 1 |
where tx0, ty0, tz0 are the aggregrate translations and r(xy) is the aggregate product of rotations, scales and shears.
A point is transformed by considering the point to be a row vector of 4 elements and then post multiplying by the transformation matrix.
[x’ y’ z’ w’] = [x y z w] | 00 01 02 03 | | 10 11 12 13 | | 20 21 22 23 | | 30 31 32 33 |
If the w component is not specified, it is assumed to have a value of 1.
- assign(self: alias_api.AlTM, row: int, col: int, value: float) None
Set the AlTM matrix value at the row and column index.
- decompose(self: alias_api.AlTM) Tuple[int, List[float[3]], List[float[3]], List[float[3]], List[float[3]]]
Decompose the transform matrix into translate, rotate, scale and shear vectors.
- static diagonal(d0: float, d1: float, d2: float, d3: float) alias_api.AlTM
Return a zero matrix with diagonal values of ‘d’.
- get_tm(self: alias_api.AlTM) Tuple[int, List[List[float[4]][4]]]
Return the contents of the AlTM into a 4x4 array.
- static identity() alias_api.AlTM
Return the identity matrix.
- inverse(self: alias_api.AlTM) alias_api.AlTM
Return the inverse of the matrix.
- static rotate(x: float, y: float, z: float, angle: float) alias_api.AlTM
Return a transformation matrix to rotate counterclockwise about the axis (x, y, z).
- static rotate_x(rx: float) alias_api.AlTM
Return a transformation matrix to rotate about the x-axis.
- static rotate_y(ry: float) alias_api.AlTM
Return a transformation matrix to rotate about the y-axis.
- static rotate_z(rz: float) alias_api.AlTM
Return a transformation matrix to rotate about the z-axis.
- static scale(d: float) alias_api.AlTM
Return a transformation matrix to scale a point (x, y, z) by a constant with a value of ‘d’.
- static scale_nonp(sx: float, sy: float, sz: float) alias_api.AlTM
Return a transformation matrix to non-proportionally scale a point (x, y, z) by ‘sx’ in the x-axis, ‘sy’ in the y-axis, and ‘sz’ in the z-axis.
- set_tm(self: alias_api.AlTM, tm: List[List[float[4]][4]]) int
Copies the given 4x4 transform matrix into this AlTM.
- trans_normal(self: alias_api.AlTM, x: float, y: float, z: float) Tuple[int, float, float, float]
Using the transformation matrix, transform the normal (x,y,z).
- trans_point(*args, **kwargs)
Overloaded function.
trans_point(self: alias_api.AlTM, d: List[float[4]]) -> Tuple[int, List[float[4]]]
Return the resulting point by transforming the point ‘d’ using this matrix.
trans_point(self: alias_api.AlTM, x: float, y: float, z: float, w: float) -> Tuple[int, float, float, float, float]
Using the transformation matrix, transform the point (x,y,z,w).
trans_point(self: alias_api.AlTM, x: float, y: float, z: float) -> Tuple[int, float, float, float]
Using the transformation matrix, transform the point (x,y,z,1).
- trans_vector(self: alias_api.AlTM, x: float, y: float, z: float) Tuple[int, float, float, float]
Using the transformation matrix, transform the vector (x,y,z,1).
- static translate(arg0: float, arg1: float, arg2: float) alias_api.AlTM
Return a transformation matrix to translate a point (x, y, z) by (tx, ty, tz).
- transpose(self: alias_api.AlTM) alias_api.AlTM
Return the transpose of the matrix.
- static zero() alias_api.AlTM
Return the zero matrix.
- class alias_api.AlTangentType
The type of tangent.
Members:
TangentSmooth
TangentLinear
TangentFlat
TangentStep
TangentSlow
TangentInOut
TangentFast
TangentFixed
TangentUnchanged
- property name
- class alias_api.AlTessellateTypes
The tessellation types.
Members:
TessellateTriangle
TessellateQuad
- property name
- class alias_api.AlTexture
Base object for representing texture data
This class encapsulates the basic functionality for checking and setting the name of a texture as well as accessing the textures that this texture refers to, and the animation on this texture. These texture objects can be obtained from the AlShader class and the AlEnvironment class.
A texture object itself may also reference other textures. For this reason the first_texture() and next_texture() methods are used.
first_texture() returns the first texture that the texture object references. next_texture() moves from a given referenced texture to the next texture in order, as related to the texture object. (See the similar methods for the AlShader/AlEnvironment classes.)
The animation on a texture can be accessed through the first_channel() and next_channel() methods. All the channels on the texture can be deleted by calling deleteAnimation().
The texture parameters can be accessed through the parameter() and set_parameter() methods. Each texture has a specific set of parameters that are valid for it that depend on its type. The full list of texture parameters can be seen in the file AlShadingFields.h. For example, all parameters specific to the water texture have names of the form FLD_SHADING_WATER_*. Parameters common to all textures have the form FLD_SHADING_COMMON_TEXTURE_*. All parameters are treated as doubles even though this may not necessarily be what they are. This was done to make the interface as simple and consistent as possible.
New AlTextures cannot be created by allocating a new AlTexture object because an AlTexture must be associated with a shader. Use the AlShader.add_texture() method to create the new AlTexture.
- add_texture(self: alias_api.AlTexture, field_name: str, texture_type: str) Tuple[int, alias_api.AlTexture]
Add a texture to the field of the AlTexture.
- copy_wrapper(self: alias_api.AlTexture) alias_api.AlObject
Return an exact duplicate of this AlTexture wrapper.
- field_type(self: alias_api.AlTexture) str
Returns a string which indicates which field of the parent object(AlShader, AlTexture, AlEnvironment) that this texture is mapped to. Note that the returned strings are identical to the field names written out to SDL.The SDL manual gives a complete list of possible return
values for this function.
- fields(self: alias_api.AlTexture) List[alias_api.AlShadingFields]
return a list of all the fields used by the texture.
- filename(self: alias_api.AlTexture) str
- If the texture is a file texture, this method returns the path and name to the image file used for
the texture. If the texture is any other type, NULL is returned.
- first_texture(self: alias_api.AlTexture) alias_api.AlTexture
Return the first texture.
- mapped_fields(self: alias_api.AlTexture) List[str]
return a list of all the fields used by the texture.
- property name
Get or set the AlTexture name.
- next_texture(self: alias_api.AlTexture, cur_texture: alias_api.AlTexture) alias_api.AlTexture
return the next texture.
- parameter(self: alias_api.AlTexture, parameter_name: alias_api.AlShadingFields) Tuple[int, float]
Finds the value of a given texture field.
- remove_texture(self: alias_api.AlTexture, field_name: str) int
Remove the texture from the field of the AlTexture.
- set_filename(self: alias_api.AlTexture, file_path: str) int
If the texture is a file texture, this method sets the path and name to the image file used for the texture. If the texture is any other type, sFailure is returned. Note that the string provided is duplicated, so you are responsible for the space allocated for the original copy.
- set_parameter(self: alias_api.AlTexture, parameter_name: alias_api.AlShadingFields, value: float) int
Changes the value of the texture field.
- texture_node(self: alias_api.AlTexture) AlTextureNode
Returns a pointer to the transformation AlTextureNode on solid textures. If the texture is not a solid texture or there is no AlTextureNode, this method returns None.
- texture_type(self: alias_api.AlTexture) str
Returns a string which indicates the ‘name’ of the texture type. Note that these strings are identical to those output to SDL.
- type(self: alias_api.AlTexture) alias_api.AlObjectType
Return the AlTexture type identifier.
- class alias_api.AlTextureNode
Dag node class for solid textures.
AlTextureNode is the class used to access and manipulate the transformations on solid textures within the dag. This class behaves like other dag nodes (see AlDagNode for a description of the usage and purpose of dag nodes) except that you are not able to instantiate or create one.
- copy_wrapper(self: alias_api.AlTextureNode) alias_api.AlObject
Return an exact duplicate of this AlTextureNode wrapper.
- delete_object(self: alias_api.AlTextureNode) int
Delete the AlTextureNode from the Alias Universe and return the status of the performed operation.
- texture(self: alias_api.AlTextureNode) alias_api.AlTexture
Return the texture under this node.
- type(self: alias_api.AlTextureNode) alias_api.AlObjectType
Return the AlTextureNode type identifier.
- class alias_api.AlTripleComponent
The component of an action that should be extracted when evaluating a channel.
Members:
InvalidComponent
X_Component
Y_Component
Z_Component
- property name
- class alias_api.AlWindow
Interface to the Alias modeling windows.
Alias modeling windows are the windows in which geometry information is actually viewed and modified. These are the Top, Front, Right and Perspective windows, as well as the SBD window. This class allows the creation, positioning and sizing windows. You can get the camera associated with a window. Plugins can use the mapping functions to determine where in world space a screen event occurred.
AlUniverse contains methods for getting the first modeling window, the current modeling window, and the sbd window.
- class AlViewType
The window view type.
Members:
ViewInvalid
Bottom
Back
ViewOther
Left
Front
Right
Sbd
Top
Perspective
- property name
- property camera
Get or set the effective camera of the modeling window.
- copy_wrapper(self: alias_api.AlWindow) alias_api.AlObject
Return an exact duplicate of this AlWindow wrapper.
- create(self: alias_api.AlWindow, view_type: alias_api.AlWindow.AlViewType) int
Create a new AlWindow object with the given view type in the Alias Universe.
- delete_object(self: alias_api.AlWindow) int
Delete the AlWindow from the Alias Universe and return the status of the performed operation.
- get_resolution(self: alias_api.AlWindow) Tuple[int, int, int]
Retrieves the resolution of a window.
- property grid_size
Return the size of the grid in world coordinates.
- type(self: alias_api.AlWindow) alias_api.AlObjectType
Return the AlWindow type identifier.
- exception alias_api.AliasCompatibilityException
- exception alias_api.AliasOpenModelException
- exception alias_api.AliasPythonException
- class alias_api.LinearUnit
Linear measurement units.
Members:
Miles
Yards
Feet
Inches
Kilometers
Meters
Centimeters
Millimeters
- property name
- class alias_api.Menu
Add menus to the Alias menu bar using this object.
- add_command(self: alias_api.Menu, label: str, callback: Callable[[], None], add_separator: bool = False, parent: object = None) object
- clean(self: alias_api.Menu) None
- remove(self: alias_api.Menu) int
- class alias_api.MenuItem
Menu items for the Menu object.
- class alias_api.MessageResult
The result returned by a message event.
- property attributes_1_name
Get the first AlAttributes from the message event that triggered the Python callback.
- property bool_value_1
Get the first bool value from the message event that triggered the Python callback.
- property camera_1_name
Get the first AlCamera from the message event that triggered the Python callback.
- property cloud_1_name
Get the first AlCloud from the message event that triggered the Python callback.
- property curve_on_surface_1_name
Get the first AlCurveOnSurface from the message event that triggered the Python callback.
- property dag_node_1_name
Get the first AlDagNode from the message event that triggered the Python callback.
- property dag_node_2_name
Get the second AlDagNode from the message event that triggered the Python callback.
- property int_value_1
Get the first int value from the message event that triggered the Python callback.
- property int_value_2
Get the second int value from the message event that triggered the Python callback.
- property light_1_name
Get the first AlLight from the message event that triggered the Python callback.
- property locator_1_name
Get the first AlLocator from the message event that triggered the Python callback.
- property message_type
Get the message type that trigger the Python callback.
- property reference_file_1_name
Get the first AlReferenceFile name from the message event that triggered the Python callback.
- property reference_file_1_path
Get the first AlReferenceFile source wire file path from the message event that triggered the Python callback.
- property reference_file_set_1_name
Get the first AlReferenceFileSet from the message event that triggered the Python callback.
- property shader
Get the first AlShader name from the message event that triggered the Python callback. Deprecated and will be remoed in v4.0.0 - use shader_1_name instead.
- property shader_1_name
Get the first AlShader from the message event that triggered the Python callback.
- property str_value_1
Get the first string value from the message event that triggered the Python callback.
- property surface_1_name
Get the first AlSurface from the message event that triggered the Python callback.
- property texture_1_name
Get the first AlTexture from the message event that triggered the Python callback.
- property tm_1
Get the first AlTM from the message event that triggered the Python callback.
- class alias_api.ReferenceFileStatus
The reference file status.
Members:
FileNotFound
SourceWireNotFound
Stale
UpToDate
Error
- property name
- class alias_api.Stage
Class object to represetn a stage in Alias.
- property name
Get or set the Stage name.
- property path
Get or set the Stage path.
- class alias_api.SymmetryState
The symmetry state.
Members:
Mirror
Original
BothSides
- property name
- class alias_api.TraverseDagInputData
Input data for traversing teh dag.
- property layers
Get or set the list of layers to filter the search results.
If the filter is inclusive (see layersInclusive), then only nodes assigned to one of the layers will be accepted in the traversal results.
If the filter is not inclusive, then nodes assigned to one of the layers will not be accepted in the traversal results.
If the list is empty, all nodes may be accepted in the search results.
- property layersInclusive
Get or set the flag to indicate if the layers filter is inclusive.
Set to True to include only nodes that are assigned to one of the layers. Set to False to exclude nodes that are assigned to one of the layers.
- property nodeNamesInclusive
Get or set the flag to indicate if the nodeNames filter is inclusive. Set to True to include only nodes whose name is listed in nodeNames. Set to False to exclude nodes whose name is listed in nodeNames.
- property nodeTypesInclusive
Get or set the flag to indicate if the nodeTypes filter is inclusive.
Set to True to include only nodes with type that is listed in nodeTypes. Set to False to exclude nodes with type thati s listed in nodeTypes.
- property node_names
Get or set the list of node names to filter the search results. If the filter is inclusive (see nodeNameInclusive), then only nodes whose name is listed in nodeNames will be accepted in the traversal results. If the filter is not inclusive, then nodes whose name is listed in nodeNames will not be accepted in the traversal results. If the list is empty, all nodes names may be accepted in the search results.
- property node_types
Get or set the list of node types to filter the search results.
If the filter is inclusive (see nodeTypesInclusive), then only nodes with types listed in nodeTypes will be accepted in the traversal results.
If the filter is not inclusive, then nodes with types listed in nodeTypes will not be accepted in the traversal results.
If the list is empty, all nodes types may be accepted in the search results.
- property shaders
Get or set the list of shaders to filter the search results.
If the filter is inclusive (see shadersInclusive), then only nodes assigned to one of the shaders will be accepted in the traversal results.
If the filter is not inclusive, then nodes assigned to one of the shaders will not be accepted in the traversal results.
If the list is empty, all nodes may be accepted in the search results.
- property shadersInclusive
Get or set the flag to indicate if the shaders filter is inclusive.
Set to True to include only nodes that are assigned to one of the shaders. Set to False to exclude nodes that are assigned to one of the shaders.
- class alias_api.TraverseDagOutputData
Output data from traversing the dag.
- property count
Get the number of nodes obtained from traversing the DAG.
- property curves_on_surface
Get the curves on surface obtained from traversing the DAG.
- property nodes
Get the nodes obtained from traversing the DAG.
- property status
Get the resulting status code from traversing the DAG.
- class alias_api.UngroupOption
Options for ungrouping
Members:
DeleteNode
CopyNode
Collapse
Extract
MoveUp
- property name
- class alias_api.Variant
Class object to represent a variant in Alias.
- property name
Get the Variant name. If the Variant is renamed after this object is created, the name property will not be updated to reflect the name change.
- property path
Get the thumnail path for the Variant. If the Variant path is changed after this object is created, the path property will not be updated to reflect the path change.
- class alias_api.Vec3
Class object to represent a 3D vector.
- cross(*args, **kwargs)
Overloaded function.
cross(self: alias_api.Vec3, v: alias_api.Vec3) -> alias_api.Vec3
Compute the cross product of this vector and ‘v’. Return the resulting cross product vector.
cross(self: alias_api.Vec3, v: alias_api.Vec3, result: alias_api.Vec3) -> None
Compute the cross product of this vector and ‘v’. Assign the resulting cross product vector to ‘result’.
- magnitude(self: alias_api.Vec3) float
Return the magnitude value of the vector.
- normalize(self: alias_api.Vec3) bool
Normalize the vector. Return True if the vector was successfully normalized, else False.
- to_list(self: alias_api.Vec3) list
Return the vector coordinates as a list of values.
- property x
Get or set the x coordinate of the vector.
- property y
Get or set the y coordinate of the vector.
- property z
Get or set the z coordinate of the vector.
- class alias_api.VectorAlTangentType
A list containing object of type AlTangentType
- append(self: alias_api.VectorAlTangentType, x: alias_api.AlTangentType) None
Add an item to the end of the list
- clear(self: alias_api.VectorAlTangentType) None
Clear the contents
- count(self: alias_api.VectorAlTangentType, x: alias_api.AlTangentType) int
Return the number of times
x
appears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: alias_api.VectorAlTangentType, L: alias_api.VectorAlTangentType) -> None
Extend the list by appending all the items in the given list
extend(self: alias_api.VectorAlTangentType, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(self: alias_api.VectorAlTangentType, i: int, x: alias_api.AlTangentType) None
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: alias_api.VectorAlTangentType) -> alias_api.AlTangentType
Remove and return the last item
pop(self: alias_api.VectorAlTangentType, i: int) -> alias_api.AlTangentType
Remove and return the item at index
i
- remove(self: alias_api.VectorAlTangentType, x: alias_api.AlTangentType) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- 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.adjust_window(hwnd: int) None
Adjust the specified child window such that it is centered over the Alias main window.
- 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.assign_children_to_parent_layer(*args, **kwargs)
Overloaded function.
assign_children_to_parent_layer(parent_nodes: List[alias_api.AlDagNode]) -> int
Move the children of the given parent nodes to the parent’s layer.
- param parent_nodes
The parent nodes.
- type parent_nodes
List[AlDagNode]
assign_children_to_parent_layer(parent_node_names: List[str]) -> int
Move the children of the given parent nodes to the parent’s layer.
- param parent_nodes
The parent node names.
- type nodes
List[str]
- alias_api.assign_nodes_to_layer(*args, **kwargs)
Overloaded function.
assign_nodes_to_layer(nodes: List[str], layer_name: str) -> int
Set the layer of the given dag nodes to the specified layer.
- param nodes
The dag nodes to set the layer.
- type nodes
List[AlDagNode]
- param layer_name
The name of the layer to set the nodes to.
- type layer_name
str
- return
The status code result Success - all nodes were set to the layer successfully Failure - one or more nodes failed to set the layer InvalidArgument - the layer name is invalid
- rtype
int(AlStatusCode)
assign_nodes_to_layer(nodes: List[alias_api.AlDagNode], layer_name: str) -> int
Set the layer of the given dag nodes to the specified layer.
- param nodes
The dag nodes to set the layer.
- type nodes
List[AlDagNode]
- param layer_name
The name of the layer to set the nodes to.
- type layer_name
str
- return
The status code result Success - all nodes were set to the layer successfully Failure - one or more nodes failed to set the layer InvalidArgument - the layer name is invalid
- rtype
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.clear_queued_events() None
Clear the currently queued events. The callbacks of the events in the queue will not be triggered.
- 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_group_for_layer(layer_name: str, group_name: str) alias_api.AlGroupNode
Create a group node for the specified layer.
- Parameters
layer_name (str) – The name of the layer to create the group node for.
group_name (str) – The name of the group node to create.
- Returns
The newly created group node. None if failed to create the group node.
- Return type
- 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_layered_shader() alias_api.AlLayeredShader
Create a new AlLayeredShader in the Alias Universe.
- alias_api.create_orthographic_camera(view_type: alias_api.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_switch_shader() alias_api.AlSwitchShader
Create a new AlSwitchShader in the Alias Universe.
- 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.current_window() alias_api.AlWindow
Returns the currently active window.
- alias_api.delete_all(objs: List[alias_api.AlObject]) int
Delete all the Alias Objects in the list.
- Parameters
objs (List[AlObject]) – List of Alias Objects to delete.
- Returns
The status code result of the operation: sSuccess - all objects were deleted sFailure - one or more objects were not deleted
- Return type
int(AlStatusCode)
- alias_api.delete_all_construction_entities() int
Delete all AlConstructionPlane objects found in the Alias Universe.
- alias_api.delete_all_construction_history(cos: std::vector<AlCurveOnSurface * __ptr64, std::allocator<AlCurveOnSurface * __ptr64> >) None
Delete the construction histor for all the given curve on surface objects.
- alias_api.delete_all_locators() int
Delete all locators.
After this operation, all references to all AlLocators will be invalid.
- Returns
The status code result Success - everything was successfully deleted. Failure - the universe was not initialized or the deletion failed.
- Return type
int(AlStatusCode)
- alias_api.delete_construction_history(cos: alias_api.AlCurveOnSurface) None
Delete the construction histor for the curve on surface.
- alias_api.delete_dag_nodes_by_name(node_names: List[str]) int
Delete the dag nodes with the given names.
- Parameters
node_names (List[str]) – The names of the dag nodes to delete.
- Returns
The status code result Success - all nodes were deleted successfully Failure - one or more nodes failed to delete
- Return type
int(AlStatusCode)
- alias_api.delete_history(*args, **kwargs)
Overloaded function.
delete_history(node: alias_api.AlDagNode) -> None
Delete the history from this dag node.
- param node
The dag node to delete history from.
- type node
AlDagNode
delete_history(nodes: List[alias_api.AlDagNode]) -> None
Delete the history from the given dag nodes.
- param nodes
The dag nodes to delete history from.
- type nodes
List[AlDagNode]
- alias_api.delete_layers_by_name(layer_names: List[str]) int
Delete the layers with the given names.
- Parameters
layer_names (List[str]) – The names of the layers to delete.
- Returns
The status code result of the operation: sSuccess - all objects were deleted sFailure - one or more objects were not deleted
- Return type
int(AlStatusCode)
- alias_api.delete_null_nodes() int
Delete all null nodes in the Alias scene.
- alias_api.delete_sets_by_name(names: Set[str]) int
Delete sets by name.
- Parameters
names (List[str]) – The names of the sets to delete.
- Returns
The status code result of the operation Success - operation exited normally Failure - operation exited abnormally
- Return type
int(AlStatusCode)
- alias_api.do_updates(new_state: int = True) int
The do_updates flag is used to notify the system that you are finished performing. If this flag is true, then it is equivalent to sending out a ‘geometry modified’ message to the rest of the system. When the system receives the update message, then operations such as construction history etc are performed.
If the previous state of the flag was FALSE and the new state is TRUE, then an update will be performed now and on each subsequent dag modification.
- 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.export_by_layer(target_dirname: str, base_filename: str, file_type: alias_api.AlFileType, layer_list: List[alias_api.AlLayer], overwrite: bool = False) int
Export each layer to a new file.
This function will modify the pick list, ensure to save the state of the pick list before calling this function if it is desired to restore it after this operation.
This is an alternative function to exportByLayerSequentially that is optimized for when there are many dag nodes, since it will only traverse the DAG once, whereas exportByLayerSequentially will traverse the DAG once per layer. The downside of this function is that it requires more memory since it will keep track of the nodes per layer.
This function requires Alias >= 2022.2
- Parameters
target_dirname (str) – The output directory to save new layer files to.
base_filename (str) – The base filename for the newly saved layer files. The layer name will be appended for each file.
file_type (AlFileType) – The file type that the new layer files will be saved as.
layer_list (list<AlLayer>) – The layers to export.
overwrite (bool) – True will overwrite any existing files, False will not save a the layer file it if a file already exists with the same name.
- Raises
AliasCompatibilityException – if currently running version of Alias < 2022.2
AliasPythonException – if errors were reported during export
- alias_api.export_by_layer_sequentially(target_dirname: str, base_filename: str, file_type: alias_api.AlFileType, layer_list: List[alias_api.AlLayer], overwrite: bool = False) int
Export each layer to a new file.
This function will modify the pick list, ensure to save the state of the pick list before calling this function if it is desired to restore it after this operation.
This is a naive approach to export all layers. For each layer, the DAG is traversed to pick each node in the layer. This will be slow if there are many nodes in the DAG.
Use exportByLayer for an optimized approach, for Alias >= 2022.2
- Parameters
target_dirname (str) – The output directory to save new layer files to.
base_filename (str) – The base filename for the newly saved layer files. The layer name will be appended for each file.
file_type (AlFileType) – The file type that the new layer files will be saved as.
layer_list (list<str>) – The layers in the file to export. If not specified, all layers will be exported.
overwrite (bool) – True will overwrite any existing files, False will not save a the layer file it if a file already exists with the same name.
- 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.
- Returns
The dag node with the given name.
- Return type
- 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_environment() alias_api.AlEnvironment
Returns the first Environment in the list of Alias Environment objects. NULL is returned if the list is empty..
- 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_layered_shader() alias_api.AlLayeredShader
Return the first AlLayeredShader in the list of Alias AlLayeredShader objects. None is returned if the list is empty.
- alias_api.first_locator() alias_api.AlLocator
Return the first AlLocator in the list of Alias AlLocator objects. None is returned if the list is empty.
- alias_api.first_pick_item() int
Set the pick list to reference the first object in the list.
- alias_api.first_set() alias_api.AlSet
Return the first set in the Alias Universe.
- 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.first_switch_shader() alias_api.AlSwitchShader
Return the first AlSwitchShader in the list of Alias AlSwitchShader objects. None is returned if the list is empty.
- alias_api.flatten_group_nodes(*args, **kwargs)
Overloaded function.
flatten_group_nodes() -> int
Flatten all top-level group nodes in the DAG.
This function is deprecated. Use method ungroup with UngroupOption.Collapse instead.
Any group nodes found in the top-level group nodes will have all its children moved to the top-level group node, and then be removed. The result is each group node specified will not contain any nested group nodes.
- return
The status code result of the flatten operation.
- rtype
int(AlStatusCode)
flatten_group_nodes(group_nodes: List[alias_api.AlGroupNode]) -> int
Flatten the specified group nodes.
Any group nodes found in the specified group nodes will have all its children moved to the top-level group node, and then itself will be removed. The result is each group node specified will not contain any nested group nodes.
- param group_nodes
The group nodes to flatten.
- type group_nodes
list<AlGroupNode>
- return
The status code result of the flatten operation.
- rtype
int(AlStatusCode)
- 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_locator_strings() List[str]
Return the string value for all annotation locators in the Alias Universe.
- alias_api.get_annotation_locators() List[alias_api.AlAnnotationLocator]
Return all annotation locators in the Alias Universe.
- alias_api.get_bounding_box_from_hanger(node: alias_api.AlDagNode) Tuple[int, List[float[6]]]
Return the bounding box computed from the bounding box hanger for the dag node.
- 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_dag_nodes_by_name(names: List[str]) List[alias_api.AlDagNode]
Returns a list of the dag nodes matching the given names.
- Parameters
names (Union[List[str], Set[str]]) – The names of the dag nodes to search for.
- Returns
The list of dag nodes that match the given names.
- Return type
List[AlDagNode]
- alias_api.get_empty_layers(include_folders: bool = True, skip_layers: Set[str] = set()) List[alias_api.AlLayer]
Return all empty layers.
- Parameters
skip_layers (list<str>) – List of layer names to skip when checking for empty ones.
- Returns
The empty layers.
- Return type
list<AlLayer>
- alias_api.get_empty_sets() List[alias_api.AlSet]
Return a list of all empty sets in the Alias Universe.
- 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_layered_shader_by_name(shader_name: str) alias_api.AlLayeredShader
Return the AlLayeredShader found by the given name.
- alias_api.get_layered_shader_by_node(node_name: str) alias_api.AlLayeredShader
Return the AlLayeredShader assigned to the node corresponding to the given name.
- alias_api.get_layered_shaders() List[alias_api.AlLayeredShader]
Return a list of all the AlLayeredShader objects in the Alias universe.
- alias_api.get_layers(*args, **kwargs)
Overloaded function.
get_layers(ignore_names: Set[str] = set(), ignore_numbers: Set[int] = set(), include_folders: bool = True, include_non_folders: bool = True) -> List[alias_api.AlLayer]
Return a list of all the layers in the Alias Universe.
get_layers(nodes: List[AlDagNode]) -> List[alias_api.AlLayer]
Return a list of all the layers in the Alias Universe that are assigned to the given nodes.
- param nodes
The nodes to get the layers from.
- type nodes
List[AlDagNode]
- return
The list of layers assigned to the given nodes.
- rtype
List[AlLayer]
- alias_api.get_layers_by_name(layer_names: List[str]) List[alias_api.AlLayer]
Return the AlLayer objects found from the given list of names.
- alias_api.get_layers_using_multiple_shaders() List[alias_api.AlLayer]
Return layers whose geometry do not all use the one same shader.
- alias_api.get_locator_by_name(name: str) alias_api.AlLocator
Return the AlLocator object with the given name.
- Parameters
name (str) – The name of the locator to return.
- Returns
The AlLocator object with the given name.
- Return type
- alias_api.get_locators() List[alias_api.AlLocator]
Return a list of all AlLocator objects in the Alias Universe.
- Returns
The list of AlLocator objects.
- Return type
List[AlLocator]
- alias_api.get_locators_by_name(names: List[str]) List[alias_api.AlLocator]
Return a list of AlLocator objects with the given names.
- Parameters
names (List[str]) – The list of locator names to return.
- Returns
The list of AlLocator objects with the given names.
- Return type
List[AlLocator]
- alias_api.get_main_window_id() int
Return the window handle to the Alias main window.
- alias_api.get_nesting_groups() List[alias_api.AlGroupNode]
Return the list of top-level group nodes that contain at least one group.
- 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_references_by_name(names: List[str]) List[alias_api.AlReferenceFile]
Return the AlReferenceFile objects matching the given list of names.
- alias_api.get_sets_by_name(names: Set[str]) List[alias_api.AlSet]
Get sets by name.
- Parameters
names (List[str]) – The names of the sets to get.
- Returns
A list of sets with the given names.
- Return type
List[AlSet])
- 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_name(shader_names: List[str]) List[alias_api.AlShader]
Return the Shader objects found by the given list of names.
- 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_switch_shader_by_name(shader_name: str) alias_api.AlSwitchShader
Return the SwitchShader found by the given name.
- alias_api.get_switch_shader_by_node(node_name: str) alias_api.AlSwitchShader
Return the switch shader assigned to the node corresponding to the given name.
- alias_api.get_switch_shaders() List[alias_api.AlSwitchShader]
Return a list of all the switch shaders in the Alias universe.
- 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_construction_history(cos: alias_api.AlCurveOnSurface) int
Return 1 if the curve on surface has construction history, 0 if no construction history, and -1 if the curve on surface is invalid.
- 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_queued_events() bool
Check if there are Alias event callbacks queued and waiting to execute.
Queued event callbacks will be executed once queuing events is turned off.
- Returns
True if there are queued event callbacks, 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.import_subdiv(filepath: str) None
Imports a subdiv data from OBJ, TSM, F3D or SF3D file.
Note that SF3D file format is only supported in OpenAlias.
- Parameters
filepath (str) – The name of the input file to process
- Throws AliasPythonException
If filepath is None, Alias failed to import or the Alias universe has not been initialized.
- alias_api.import_subdivision(filepath: str) None
Deprecated - use ‘import_subdiv’ instead.
Imports a subdiv data from OBJ, TSM, F3D or SF3D file.
Note that SF3D file format is only supported in OpenAlias.
- Parameters
filepath (str) – The name of the input file to process
- Throws AliasPythonException
If filepath is None, Alias failed to import or the Alias universe has not been initialized.
- alias_api.initialize_universe(up: alias_api.AlCoordinateSystem = <AlCoordinateSystem.???: 1>, init_project_env: int = False) int
Initialize the Alias Universe.
- alias_api.is_construction_layer(layer_number: int) bool
Determine if the layer is a construction layer.
- Parameters
layer_number – The number of the layer to check.
- Returns
True if the layer is a construction layer, else False.
- 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_queuing_events() bool
Check if the Alias event callbacks are currently being queued.
When event callbacks are being queued, this means that when Alias events are fired, the C++ message handler is still invoked, but the Python callbacks registered to the Alias events will not be executed immediately, and instead will be executed once queuing events is turned off.
- Returns
True if event callbacks are being queued, else False.
- Return type
bool
- alias_api.is_stage_empty() bool
Check if the current file is empty or not.
- alias_api.linear_scale(type: alias_api.Type) float
Return the linear scale factor for the current units.
- alias_api.linear_units(type: alias_api.Type) alias_api.LinearUnit
Return the linear units for the current units.
- 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_locator(cur_locator: alias_api.AlLocator) alias_api.AlLocator
Return the AlLocator following cur_locator in the list of Alias AlLocator objects.
None is returned if cur_locator has no next locator.
- alias_api.next_pick_item() int
Set the pick list to reference the next object in the list.
- alias_api.next_shader(*args, **kwargs)
Overloaded function.
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.
next_shader(cur_shader: alias_api.AlLayeredShader) -> alias_api.AlLayeredShader
Return the AlLayeredShader following cur_shader in the list of Alias AlLayeredShader objects. None is returned if cur_shader has no next shader.
- alias_api.next_switch_shader(cur_shader: alias_api.AlSwitchShader) alias_api.AlSwitchShader
Return the AlSwitchShader following cur_shader in the list of Alias AlSwitchShader 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.node_switch_shader(node: alias_api.AlDagNode) AlSwitchShader
Return the switch shader used by the given dag node. Return None if no switch shader used.
- alias_api.open_file(path: str, new_stage: bool = False, delete_current: bool = False) int
Open a file in Alias.
- alias_api.pick(pickables: List[alias_api.AlPickable]) int
Pick all the given objects.
The objects must be pickable.
- Parameters
pickables (List[AlPickable]) – The list of pickables to pick.
- alias_api.pick_all_layers() int
Pick all layers in the Alias Universe.
- Returns
The status code result of the operation. Success - everything was successfully picked. Failure - not all locators were successfully picked.
- Return type
int(AlStatusCode)
- alias_api.pick_all_locators() int
Pick all locators.
- Returns
The status code result Success - everything was successfully picked. Failure - not all locators were successfully picked.
- Return type
int(AlStatusCode)
- alias_api.pick_by_name(name: str) int
Add all objects that match the given string pattern to the pick list.
- alias_api.pick_layers(*args, **kwargs)
Overloaded function.
pick_layers(layers: List[alias_api.AlLayer]) -> int
Pick the layers.
- param layers
The layers to pick.
- type layers
List[AlLayer]
- return
The status code result of the operation. Success - everything was successfully picked. Failure - not all locators were successfully picked.
- rtype
int(AlStatusCode)
pick_layers(layer_names: List[str]) -> int
Pick the layers with the given names.
- param layer_names
The names of the layers to pick.
- type layer_names
List[str]
- return
The status code result of the operation. Success - everything was successfully picked. Failure - not all locators were successfully picked.
- rtype
int(AlStatusCode)
- alias_api.pick_locators(*args, **kwargs)
Overloaded function.
pick_locators(locators: List[alias_api.AlLocator]) -> int
Pick the given locators.
- param locators
The list of locators to pick.
- type locators
List[AlLocator]
- return
The status code result Success - everything was successfully picked. Failure - not all locators were successfully picked.
- rtype
int(AlStatusCode)
pick_locators(names: List[str]) -> int
Pick the locators with the given names.
- param names
The list of locator names to pick.
- type names
List[str]
- return
The status code result Success - everything was successfully picked. Failure - not all locators were successfully picked.
- rtype
int(AlStatusCode)
- alias_api.pick_nodes(*args, **kwargs)
Overloaded function.
pick_nodes(nodes: List[alias_api.AlPickable]) -> int
Pick the given dag nodes.
- param nodes
The dag nodes to pick.
- type nodes
List[AlDagNode]
- return
The status code result Success - all nodes were picked successfully Failure - one or more nodes failed to pick
- rtype
int(AlStatusCode)
pick_nodes(node_names: List[str]) -> int
Pick the dag nodes with the given names.
- param node_names
The names of the dag nodes to pick.
- type node_names
List[str]
- return
The status code result Success - all nodes were picked successfully Failure - one or more nodes failed to pick
- rtype
int(AlStatusCode)
- alias_api.pick_nodes_assigned_to_layers(*args, **kwargs)
Overloaded function.
pick_nodes_assigned_to_layers(layers: List[alias_api.AlLayer]) -> int
Pick all the nodes assigned to the given layers.
- param layers
The layers to pick nodes from.
- type layers
List[AlLayer]
- return
The status code result of the operation.
- rtype
int(AlStatusCode)
pick_nodes_assigned_to_layers(layer_names: List[str]) -> int
Pick all the nodes assigned to the given layers.
- param layer_names
The names of the layers to pick nodes from.
- type layer_names
List[str]
- return
The status code result of the operation.
- rtype
int(AlStatusCode)
- alias_api.pick_nodes_assigned_to_shaders(*args, **kwargs)
Overloaded function.
pick_nodes_assigned_to_shaders(shaders: List[alias_api.AlShader]) -> int
Pick the nodes assigned to all the given shaders.
- param shaders
The list of shaders.
- type shaders
List[AlShader]
pick_nodes_assigned_to_shaders(shader_names: List[str]) -> int
Pick the nodes assigned to all the given shaders.
- param shaders
The list of shaders by name.
- type shaders
List[str]
- 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.queue_events(queue: bool) None
Manage queuing Python callbcacks triggered by Alias message events.
Pass True to this function to start queuing all Python callbacks that are triggered by Alias message events.
When ready to execute the Python callbacks, pass False to this funciton to empty the queue and trigger each Python callback in the queue.
- Parameters
queue – True to queue event callbacks, and False to execute the queued event callbacks.
type queue: bool
- alias_api.redraw_screen(redraw_flag: int = 3) int
Redraw the Alias screen.
- 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.remove_references(reference_files: List[alias_api.AlReferenceFile]) int
Remove all the AlReferenceFile from the Alias Universe.
- alias_api.reset() None
Deprecated - use ‘reset_stages’ instaed.
- alias_api.reset_pivots(*args, **kwargs)
Overloaded function.
reset_pivots(nodes: List[alias_api.AlDagNode]) -> int
Reset the pivots of the given dag nodes to the origin.
- param nodes
The dag nodes to reset pivots to origin.
- type nodes
List[AlDagNode]
reset_pivots(node_names: List[str]) -> int
Reset the pivots of the dag nodes with the given names to the origin.
- param node_names
The names of the dag nodes to reset pivots to origin.
- type node_names
List[str]
- alias_api.reset_stages() None
Reset the current session by deleting all the stages. OpenAlias will create default windows.
- alias_api.retrieve(file_name: str) int
Retrieves an Alias Wire file and adds the objects stored in the file to the list of Alias AlDagNode objects. If fileName is NULL the file is read from stdin.
If the universe has been initialized with Y-axis up, and the wire file retrieved was stored in a Z-axis up system, or vice versa, then the model will be rotated by 90 degrees. It is best to initialize the universe in the same orientation as the wire files that will be retrieved.
Note that if InvalidWireFile is returned you are likely trying to retrieve a newer wire file than your application recognizes. In this case you should link your application with the OpenModel library distributed with the newer Alias.
- Parameters
file_name (str) – The name of the file to be retrieved
- Returns
The status code result of the operation: Success - the file was retrieved successfully InsufficientMemory - not enough memory Failure - the wire file could not be retrieved properly InvalidWireFile - the file was not a compatible Alias wire file.
- Return type
- alias_api.retrieve_options() Tuple[int, AlRetrieveOptions]
Get the options used by retrieve().
- Returns
A tuple containing: (1) the status code result of the operation:
Success - the options were returned succesfully. Failure - AlUniverse was not initialized.
The options used by retrieve().
- Return type
tuple<AlStatusCode, AlRetrieveOptions>
- 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.save_layers(file_path: str, target_dirname: str, layer_names: List[str] = [], save_invisible: bool = True, picked_only: bool = False, file_type: alias_api.AlFileType = <AlFileType.Wire: 1>, use_sequential: bool = False, overwrite: bool = False, threshold: int = 8) int
Retrieve the file and export each of its layers to a new file.
This provides the same functionality as the Save Layers plugin. It is a convenience function to calling the main export by layer functions ( export_by_layer, export_by_layer_sequentially).
The pick list state will be saved before modifying it, and restored at the end of the operation.
Empty layers will be omitted (there will be no wire file created for empty layers).
This function requires Alias >= 2022.2
- Parameters
file_path (str) – The file to export layers from. This file will first be retrieved.
target_dirname (str) – The output directory to save new layer files to.
layer_names (list<str>) – The layers in the file to export. If not specified, all layers will be exported.
save_invisible (bool) – True will export all non-empty layers, False will only save layers that are visible or that are construction layers.
picked_only (bool) – True will export only layers that are picked, False will export both picked and not picked layers.
file_type (AlFileType) – The file type that the new layer files will be saved as.
use_sequential (bool) – True will force using the sequential export method (ignores the threshold value).
overwrite (bool) – True will overwrite any existing files, False will not save a the layer file it if a file already exists with the same name.
threshold (int) – Set the upperbound limit on number of layers to switch between export methods. If the number of layers is less than or equal the threshold, then layers are exported sequentially. If the number of layers is greater than the threshold, then layers are exported in an optimized way.
- Raises
AliasCompatibilityException – if currently running version of Alias < 2022.2
AliasPythonException – if the optimized export method was used and reported any errors
- alias_api.search_dag(input_data: alias_api.TraverseDagInputData) alias_api.TraverseDagOutputData
Search the entire DAG validating each node with the provided input data.
The input data will be used to filter the output data results. See TraverseDagInputData for more details on how to filter the output data.
NOTE: this is a customized traverse_dag function optimized for this specific use case.
- Parameters
input_data (TraverseDagInputData) – The input data to pass to the DAG traversal
- Returns
The status code result of the traversal.
- Return type
int(AlStatusCode)
- alias_api.search_node_has_history(input_data: alias_api.TraverseDagInputData) alias_api.TraverseDagOutputData
Search the entire DAG for nodes with construction history.
The input_data will be used to filter the output data results. See TraverseDagInputData for more details on how to filter the output data.
NOTE: this is a customized traverse_dag function optimized for this specific use case.
- Parameters
input_data (TraverseDagInputData) – The input data to pass to the DAG traversal
- Returns
The status code result of the traversal.
- Return type
int(AlStatusCode)
- alias_api.search_node_has_non_origin_pivot(input_data: alias_api.TraverseDagInputData, reset: bool = False) alias_api.TraverseDagOutputData
Search the entire DAG for nodes with scale or rotate pivots not positioned at the origin.
The input_data will be used to filter the output data results. See TraverseDagInputData for more details on how to filter the output data.
NOTE: this is a customized traverse_dag function optimized for this specific use case.
- Parameters
input_data (TraverseDagInputData) – The input data to pass to the DAG traversal
reset (bool) – True will reset the pivot to the origin, else False to return the data.
- Returns
The status code result of the traversal.
- Return type
int(AlStatusCode)
- alias_api.search_node_has_non_zero_transform(input_data: alias_api.TraverseDagInputData, top_level_only: bool = True, reset: bool = False) alias_api.TraverseDagOutputData
Search the entire DAG for nodes that do not have a zero transform.
The input_data will be used to filter the output data results. See TraverseDagInputData for more details on how to filter the output data.
NOTE: this is a customized traverse_dag function optimized for this specific use case.
- Parameters
input_data (TraverseDagInputData) – The input data to pass to the DAG traversal
top_level_only (bool) – True will return only top-level nodes with non-zero transforms.
reset (bool) – True will reset the transform to zero, else False to return the data.
- Returns
The status code result of the traversal.
- Return type
int(AlStatusCode)
- alias_api.search_node_is_instance(input_data: alias_api.TraverseDagInputData, expand: bool = False) alias_api.TraverseDagOutputData
Search the entire DAG for nodes that are instances.
- A node is considered an instance if:
it is a group node
it shares its children with another sibling group node; e.g. when groupNode.isInstanced() = true
its previous sibling node is an instance; e.g. when groupNode.prevInstance() is not null
The input_data will be used to filter the output data results. See TraverseDagInputData for more details on how to filter the output data.
NOTE: this is a customized traverse_dag function optimized for this specific use case.
- Parameters
input_data (TraverseDagInputData) – The input data to pass to the DAG traversal
expand (bool) – True will expand the instances, else False to return the data. Defaults to False.
- Returns
The status code result of the traversal.
- Return type
int(AlStatusCode)
- alias_api.search_node_is_template(input_data: alias_api.TraverseDagInputData) alias_api.TraverseDagOutputData
Search the entire DAG for nodes that are templates.
The input_data will be used to filter the output data results. See TraverseDagInputData for more details on how to filter the output data.
NOTE: this is a customized traverse_dag function optimized for this specific use case.
- Parameters
input_data (TraverseDagInputData) – The input data to pass to the DAG traversal
- Returns
The status code result of the traversal.
- Return type
int(AlStatusCode)
- alias_api.search_node_layer_does_not_match_parent_layer(input_data: alias_api.TraverseDagInputData, return_parent: bool = False) alias_api.TraverseDagOutputData
Search the entire DAG for nodes that do not have the same layer assigned as their parent node.
The input_data will be used to filter the output data results. See TraverseDagInputData for more details on how to filter the output data.
NOTE: this is a customized traverse_dag function optimized for this specific use case.
- Parameters
input_data (TraverseDagInputData) – The input data to pass to the DAG traversal
return_parent (bool) – True will return the parent of the node that does not match its parent layer, else False to return the node itself. Default is False.
- Returns
The status code result of the traversal.
- Return type
int(AlStatusCode)
- alias_api.search_node_unused_curves_on_surface(input_data: alias_api.TraverseDagInputData, delete_unused: bool = False) alias_api.TraverseDagOutputData
Search the DAG for nodes that have unused curves on surface.
A curve on surface is unused if it is not being used to trim the surface it is on.
The input_data will be used to filter the output data results. See TraverseDagInputData for more details on how to filter the output data.
Instanced nodes will be skipped.
NOTE: this is a customized traverse_dag function optimized for this specific use case.
- Parameters
input_data (TraverseDagInputData) – The input data to pass to the DAG traversal
delete_unused (bool) – True to delete the unused curves on surface that are found, else False to return the data. Default is False.
- Returns
The found unused curves on surface.
- Return type
- alias_api.search_node_unused_curves_on_surface_with_history(input_data: alias_api.TraverseDagInputData, delete_history: bool = False) alias_api.TraverseDagOutputData
Search the DAG for nodes that have unused curves on surface.
A curve on surface is unused if it is not being used to trim the surface it is on.
The input_data will be used to filter the output data results. See TraverseDagInputData for more details on how to filter the output data.
Instanced nodes will be skipped.
NOTE: this is a customized traverse_dag function optimized for this specific use case.
- Parameters
input_data (TraverseDagInputData) – The input data to pass to the DAG traversal
delete_history (bool) – True to delete the unused curves on surface that are found, else False to return the data. Default is False.
- Returns
The found unused curves on surface.
- Return type
- alias_api.set_layer_symmetry(*args, **kwargs)
Overloaded function.
set_layer_symmetry(layers: List[alias_api.AlLayer], symmetric: bool) -> int
Set the symmetry of the given list of layers.
- param layers
The layers to set the symmetry on.
- type layers
List[AlLayer]
- param symmetric
True will set the layer to be symmetric, False will set the layer to be non-symmetric.
- type symmetric
bool
- return
The status code result of the operation.
- rtype
int(AlStatusCode)
set_layer_symmetry(layer_name: List[str], symmetric: bool) -> int
Set the symmetry of the given list of layers by name.
- param layer_names
The names of the layers to set the symmetry on.
- type layer_names
List[str]
- param symmetric
True will set the layer to be symmetric, False will set the layer to be non-symmetric.
- type symmetric
bool
- return
The status code result of the operation.
- rtype
int(AlStatusCode)
- alias_api.set_parent_window(hwnd: int) None
Set the parent window of the specified child window to the main Alias window.
- alias_api.set_retrieve_options(options: AlRetrieveOptions) int
Set the options used by retrieve().
- Returns
The status code result of the operation: Success - the options were set succesfully. InvalidArgument - ‘options’ was NULL, or a parameter in ‘options’ was
out of range.
Failure - AlUniverse was not initialized.
- Return type
- alias_api.set_store_options(options: AlStoreOptions) int
Set the options used by store().
- Returns
The status code result of the operation: Success - the options were set succesfully. InvalidArgument - ‘options’ was NULL, or a parameter in ‘options’ was
out of range.
Failure - AlUniverse was not initialized.
- Return type
- alias_api.store(*args, **kwargs)
Overloaded function.
store(file_name: str, dag_node: alias_api.AlDagNode = 0) -> int
If the AlDagNode argument is absent or NULL then this method stores all the AlObjects in the universe to a file as an Alias Wire file. If the AlDagNode argument is not NULL then only the model below the AlDagNode is stored. If the AlDagNode is in the middle of a hierarchy, the AlDagNodes above the argument will also be stored so as to preserve transformations on the model.
- param file_name
The name of the file to be stored
- type file_name
str
- param dag_node
See description
- type dag_node
AlDagNode
- return
The status code result: Success - the file was stored successfully Failure - the wire file could not be stored properly
store(file_name: str, dag_node: alias_api.AlDagNode, embed_image_references: bool, include_installed_images: bool, file_type: alias_api.AlFileType = <AlFileType.Wire: 1>) -> int
If the AlDagNode argument is absent or NULL then this method stores all the AlObjects in the universe to a file as an Alias Wire file. If the AlDagNode argument is not NULL then only the model below the AlDagNode is stored. If the AlDagNode is in the middle of a hierarchy, the AlDagNodes above the argument will also be stored so as to preserve transformations on the model.
The embedImageReferences flag can be used to set the option for saving Embedded Images with the wirefile.
The includeInstalledImages flag can be used to set the option for saving including installed images with the embedded references in the wirefile.
- param file_name
The name of the file to be stored
- type file_name
str
- param dag_node
See description
- type dag_node
AlDagNode
- param embed_image_references
See description
- type embed_image_references
bool
- param include_installed_images
See description
- type include_installed_images
bool
- param file_type
The type of the file to store, see AlFileType
- type file_type
AlFileType
- return
The status code result: Success - the file was stored successfully Failure - the wire file could not be stored properly
store(filename: str, active: bool, file_type: alias_api.AlFileType = <AlFileType.Wire: 1>) -> int
This is a very early implementation of a general file saving method. It accepts a filename, active flag and a file type. Currently it will only store wire files, iges files, and dxf files, as well as IGES derivatives C4, Jamias and VDAIS and VDAFS.
- param fileName
The name of the file to be stored.
- param active
Store all or just the selected objects.
- param filetype
The type of file to save.
- return The status code result
Success - the file was stored successfully Failure - the wire file could not be stored properly InvalidArgument - unrecognized file type or fileName is NULL.
- rtype
int(AlStatusCode)
- alias_api.store_active(file_name: str, file_type: alias_api.AlFileType = <AlFileType.Wire: 1>) int
This method allows the user to store only those objects which are on the pick list.
- Parameters
file_name (str) – The name of the file to be stored
file_type (AlFileType) – The type of the file to store, see AlFileType
- Returns
The status code result: Success - the file was stored successfully Failure - the wire file could not be stored properly
- alias_api.store_current_window(filename: str, width: int = 1280, height: int = 1024, anit_alias: bool = False) int
Save the current Alias window to a file.
- Parameters
filename (str) – The path to the file, including file name, to save the resulting image to.
width (int) – The width (in pixels) of the resulting image. Defaults to 1280.
height (int) – The height (in pixels) of the resulting image. Defaults to 1024.
anti_alias (bool) – True to apply anti-aliasing to the resulting image, else False to not apply anti-aliasing. Defaults to False.
- Returns
The resulting status code of the operation.
- Return type
- alias_api.store_options() Tuple[int, AlStoreOptions]
Get the options used by store().
- Returns
A tuple containing: (1) the status code result of the operation:
Success - the options were returned succesfully. Failure - AlUniverse was not initialized.
The options used by store().
- Return type
tuple<AlStatusCode, AlStoreOptions>
- alias_api.tessellate_adaptive(node: alias_api.AlDagNode, type: alias_api.AlTessellateTypes, min: int, max: int, threshold: float, uniformUV: int) Tuple[int, alias_api.AlDagNode]
This method causes geometry below the AlDagNode to be subdivided into polygons depending on the curvature of the surface. Each spline patch will be converted into the minimum allowable number of polygons that satisfy the threshold parameter. If the threshold can not be satisfied by subdividing within the maximum number of subdivisions then the maximum subdivisions value will be used. When converting face nodes, adaptive subdivision cannot be used. Uniform subdivision is used with a spacing of ‘uniformUV’.
- Parameters
node – The AlDagNode above the geometry to tessellate.
type – kTESSELATE_TRIANGLE or kTESSELATE_QUADRILATERAL.
min – The minimum number of times the surface will be subdivided meet the threshold (minimum of 1 ).
max – The maximum number of times the surface will be subdivided meet the threshold (minimum of 1 ).
threshold – The accuracy of the approximation (between 0 and 1). Higer values give a better approximations.
uniformUV – Uniform value used when handing FaceNodes.
- Return A tuple containing status and dagNode
The status code result: Success - the file was stored successfully Failure - the wire file could not be stored properly InvalidArgument - unrecognized file type or fileName is NULL.
The resulting mesh Dag Node.
- alias_api.tessellate_chord_height_deviation(node: alias_api.AlDagNode, tolerance: float) Tuple[int, alias_api.AlDagNode]
- This method tessellates a dag using a chord height deviation tolerance. The chord height deviation
specifies the maximum distance that a triangle will be away from the surface boundary that it will be representing.
- Parameters
node – The AlDagNode above the geometry to tessellate.
tolerance – Chord height deviation.
- Return A tuple containing status and dagNode
The status code result: Success - the file was stored successfully Failure - the wire file could not be stored properly InvalidArgument - unrecognized file type or fileName is NULL.
The resulting mesh Dag Node.
- alias_api.tessellate_chord_height_deviation_accurate(node: alias_api.AlDagNode, tolerance: float) Tuple[int, alias_api.AlDagNode]
This method tessellates a dag node using a chord height deviation tolerance and the accurate tessellator. The chord height deviation specifies the maximum distance that a triangle will be away from the surface boundary that it will be representing.
- Parameters
node – The AlDagNode above the geometry to tessellate.
tolerance – Chord height deviation.
- Return A tuple containing status and dagNode
The status code result: Success - the file was stored successfully Failure - the wire file could not be stored properly InvalidArgument - unrecognized file type or fileName is NULL.
The resulting mesh Dag Node.
- alias_api.tessellate_chord_height_deviation_fast(node: alias_api.AlDagNode, tolerance: float) Tuple[int, alias_api.AlDagNode]
This method tessellates a dag using a chord height deviation tolerance. The chord height deviation specifies the maximum distance that a triangle will be away from the surface boundary that it will be representing.
- Parameters
node – The AlDagNode above the geometry to tessellate.
tolerance – Chord height deviation.
- Return A tuple containing status and dagNode
The status code result: Success - the file was stored successfully Failure - the wire file could not be stored properly InvalidArgument - unrecognized file type or fileName is NULL.
The resulting mesh Dag Node.
- alias_api.tessellate_number(node: alias_api.AlDagNode, type: alias_api.AlTessellateTypes, total: int, count_tol: int, curve_tol: float) Tuple[int, alias_api.AlDagNode]
This method repeatedly tessellates the surfaces with different adaptive subdivision parameters until settings are found that produce a total polygon count close to the requested number. If the requested polygon count cannot be satisfied within the given search tolerance, this function will return either the closest tessellation found that is below the requested total or the minimum number of polygons that it can possibly create. Unlike the interactive method there is no way to abandon this process prematurely.
Since the number of polygons that a spline surface may be tessellated into is not a continuous function it may not be possible to achieve the desired number of polygons exactly. To prevent the search from continuing infinitely, there are tolerances that limit the tesselation. When a test tesselation finds parameter settings that give a polygon count that is between total - count_tol and total + count_tol the search is stopped. Further since it may not be possible to find a tesselation that satisfies the requested total within the given count tolerance this parameter allows the search to be ended when the changes the function makes to the adaptive subdivision curvature threshold parameter falls below curve_tol.
- Parameters
node – The AlDagNode above the geometry to tessellate.
type – kTESSELATE_TRIANGLE or kTESSELATE_QUADRILATERAL.
total – The number of polygons desired (minimum of 1 ).
count_tol – How close to the total is acceptable (minimum of 0).
curve_tol – The adaptive subdivision tolerance (between 0 and 1). Lower values give a better approximation.
- Return A tuple containing status and dagNode
The status code result: Success - the file was stored successfully Failure - the wire file could not be stored properly InvalidArgument - unrecognized file type or fileName is NULL.
The resulting mesh Dag Node.
- alias_api.tessellate_render_settings(node: alias_api.AlDagNode, type: alias_api.AlTessellateTypes) Tuple[int, alias_api.AlDagNode]
This method causes the geometry below the AlDagNode to be subdivided into polygons in according to the current AlRender parameters.
- Parameters
node – The AlDagNode above the geometry to tessellate.
type – kTESSELATE_TRIANGLE or kTESSELATE_QUADRILATERAL.
- Return A tuple containing status and dagNode
The status code result: Success - the file was stored successfully Failure - the wire file could not be stored properly InvalidArgument - unrecognized file type or fileName is NULL.
The resulting mesh Dag Node.
- alias_api.tessellate_uniform(node: alias_api.AlDagNode, type: alias_api.AlTessellateTypes, alongU: int, alongV: int) Tuple[int, alias_api.AlDagNode]
This method causes the geometry below the AlDagNode to be subdivided into polygons in a uniform manner. Each spline patch will be converted into a fixed number of polygons. This method should not be used on trimmed geometry as it will fail; instead, you should use the adaptive method below.
- Parameters
node – The AlDagNode above the geometry to tessellate.
type – kTESSELATE_TRIANGLE or kTESSELATE_QUADRILATERAL.
alongU – The number of subdivisions in the U direction (minimum of 1).
alongV – The number of subdivisions in the V direction (minimum of 1).
- Return A tuple containing status and dagNode
The status code result: Success - the file was stored successfully Failure - the wire file could not be stored properly InvalidArgument - unrecognized file type or fileName is NULL.
The resulting mesh Dag Node.
- alias_api.traverse_dag(*args, **kwargs)
Overloaded function.
traverse_dag(node_callback: Callable[[alias_api.AlDagNode], int]) -> alias_api.TraverseDagOutputData
Traverse the entire DAG and trigger the provided callback for each node.
For each node in the DAG, the node_callback will be called with the current node being traversed. The node_callback will determine if the current node will be accepted (included) in the traversal output data.
- param node_callback
The node callback during traversal for all nodes
- type node_callback
function(AlDagNode) -> int(AlStatusCode)
- return
The output data from the DAG traversal.
- rtype
TraverseDagOutputData
traverse_dag(group_node_callback: Callable[[alias_api.AlDagNode], int], leaf_node_callback: Callable[[alias_api.AlDagNode], int]) -> alias_api.TraverseDagOutputData
Traverse the entire DAG and trigger the provided callback for each node.
For each node in the DAG, the one of the provided callbacks will be called with the current node being traversed. The callback will determine if the current node will be accepted (included) in the traversal output data.
- param group_node_callback
The node callback during traversal for group nodes
- type group_node_callback
function(AlDagNode) -> int(AlStatusCode)
- param leaf_node_callback
The node callback during traversal for leaf nodes
- type leaf_node_callback
function(AlDagNode) -> int(AlStatusCode)
- return
The output data from the DAG traversal.
- rtype
TraverseDagOutputData
traverse_dag(root: alias_api.AlDagNode, group_node_callback: Callable[[alias_api.AlDagNode], int], leaf_node_callback: Callable[[alias_api.AlDagNode], int]) -> alias_api.TraverseDagOutputData
Traverse the DAG starting at the root node, and trigger the provided callbacks for each node.
For each node in the DAG, the one of the provided callbacks will be called with the current node being traversed. The callback will determine if the current node will be accepted (included) in the traversal output data.
- param root
The root node to start the traversal at
- type root
AlDagNode
- param group_node_callback
The node callback during traversal for group nodes
- type group_node_callback
function(AlDagNode) -> int(AlStatusCode)
- param leaf_node_callback
The node callback during traversal for leaf nodes
- type leaf_node_callback
function(AlDagNode) -> int(AlStatusCode)
- return
The output data from the DAG traversal.
- rtype
TraverseDagOutputData
- alias_api.ungroup(*args, **kwargs)
Overloaded function.
ungroup(node: alias_api.AlDagNode, ungroup_option: alias_api.UngroupOption, preserve_position: bool = True) -> int
Ungroup the specified group nodes.
The specified group node will be removed from the DAG, and all its children will be moved to the parent of the group node.
- return
The status code result of the ungroup operation.
- rtype
int(AlStatusCode)
ungroup(node: List[alias_api.AlDagNode], ungroup_option: alias_api.UngroupOption, preserve_position: bool = True) -> int
Ungroup the specified group nodes.
The specified group node will be removed from the DAG, and all its children will be moved to the parent of the group node.
- return
The status code result of the ungroup operation.
- rtype
int(AlStatusCode)
- alias_api.unpick(pickables: List[alias_api.AlPickable]) int
Unpick all the given objects.
The objects must be pickable.
- Parameters
pickables (List[AlPickable]) – The list of pickables to unpick.
- alias_api.unpick_all_layers() int
Unpick all layers in the Alias Universe.
- Returns
The status code result of the operation. Success - everything was successfully unpicked. Failure - not all locators were successfully unpicked.
- Return type
int(AlStatusCode)
- alias_api.unpick_all_locators() int
Unpick all locators.
- Returns
The status code result Success - everything was successfully unpicked. Failure - not all locators were successfully unpicked.
- Return type
int(AlStatusCode)
- 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.