alias_api.AlSet

class alias_api.AlSet

Bases: AlObject

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