TransformBlend

from acron.core import TransformBlend
class TransformBlend

Bases:

This defines a single entry in a TransformBlendTable. It represents a unique combination of VertexTransform pointers and blend amounts.

Inheritance diagram

digraph inheritance9994945fa6 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "TransformBlend" [URL="acron.core.TransformBlend.html#acron.core.TransformBlend",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TransformBlend" [arrowsize=0.75,style=""]; }
__eq__()
__init__()
__lt__()
__ne__()
add_transform()

Adds a new transform to the blend. If the transform already existed, increases its weight factor.

assign()
compare_to()

Defines an arbitrary ordering for TransformBlend objects.

get_blend()

Returns the current value of the blend, based on the current value of all of the nested transform objects and their associated weights.

You should call update_blend() to ensure that the cache is up-to-date before calling this.

static get_class_type()
get_modified()

Returns a counter which is guaranteed to increment at least as often as the result of get_blend() changes.

get_num_transforms()

Returns the number of transforms stored in the blend object.

get_transform()

Returns the nth transform stored in the blend object.

get_transforms() → list
get_weight()

Returns the weight associated with the nth transform stored in the blend object.

Returns the weight associated with the indicated transform, or 0 if there is no entry for the transform.

has_transform()

Returns true if the blend has the indicated transform, false otherwise.

limit_transforms()

If the total number of transforms in the blend exceeds max_transforms, removes the n least-important transforms as needed to reduce the number of transforms to max_transforms.

property modified → UpdateSeq

Returns a counter which is guaranteed to increment at least as often as the result of get_blend() changes.

normalize_weights()

Rescales all of the weights on the various transforms so that they sum to 1.0. It is generally a good idea to call this after adding or removing transforms from the blend.

output()
remove_transform()

Removes the nth transform stored in the blend object.

Removes the indicated transform from the blend.

set_transform()

Replaces the nth transform stored in the blend object.

set_weight()

Replaces the weight associated with the nth transform stored in the blend object.

transform_point()

Transforms the indicated point by the blend matrix.

You should call update_blend() to ensure that the cache is up-to-date before calling this.

Transforms the indicated point by the blend matrix.

You should call update_blend() to ensure that the cache is up-to-date before calling this.

Transforms the indicated point by the blend matrix.

You should call update_blend() to ensure that the cache is up-to-date before calling this.

Transforms the indicated point by the blend matrix.

You should call update_blend() to ensure that the cache is up-to-date before calling this.

transform_vector()

Transforms the indicated vector by the blend matrix.

You should call update_blend() to ensure that the cache is up-to-date before calling this.

Transforms the indicated vector by the blend matrix.

You should call update_blend() to ensure that the cache is up-to-date before calling this.

property transforms → Sequence[VertexTransform]

Returns/Replaces the nth transform stored in the blend object.

update_blend()

Recomputes the internal representation of the blend value, if necessary. You should call this before calling get_blend() or transform_point().

property weights → float

Returns the weight associated with the nth transform stored in the blend object.

Returns the weight associated with the indicated transform, or 0 if there is no entry for the transform.

write()