alias_api.AlAnimatable

class alias_api.AlAnimatable

Bases: pybind11_object

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

AlStatusCode

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: SupportsInt) 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

AlChannel

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.

  1. 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

AlList

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.

  1. 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

AlList

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.

Parameters

channel (AlChannel) – One of this object’s channels for which we want to find the next channel.

Returns

The next channel in the list of channels for this object.

Return type

AlChannel

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.

Parameters

channel (AlChannel) – One of this object’s channels for which we want to find the next channel.

Returns

The previous channel in the list of channels for this object.

Return type

AlChannel

sample_channel(self: alias_api.AlAnimatable, parameter: SupportsInt) 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.

  1. The state of the parameter