unreal.NearestNeighborTrainingModel

class unreal.NearestNeighborTrainingModel(outer: Object | None = None, name: Name | str = 'None')

Bases: MLDeformerGeomCacheTrainingModel

Nearest Neighbor Training Model

C++ Source:

  • Plugin: NearestNeighborModel

  • Module: NearestNeighborModelEditor

  • File: NearestNeighborTrainingModel.h

Editor Properties: (see get_editor_property/set_editor_property)

  • custom_sampler_bone_rotations (Array[float]): [Read-Only]

  • custom_sampler_deltas (Array[float]): [Read-Only]

  • sample_bone_rotations (Array[float]): [Read-Write] The bone rotations in bone (local) space for this sample. This is updated after SetCurrentSampleIndex is called and is 6 floats per bone (2 columns of 3x3 rotation matrix).

  • sample_curve_values (Array[float]): [Read-Write] The curve weights. This is updated after SetCurrentSampleIndex is called.

  • sample_deltas (Array[float]): [Read-Write] The delta values per vertex for this sample. This is updated after SetCurrentSampleIndex is called. Contains an xyz (3 floats) for each vertex.

create_model_instance() NearestNeighborModelInstance

Create Model Instance

Return type:

NearestNeighborModelInstance

custom_sample(frame) bool

Custom Sample

Parameters:

frame (int32) –

Return type:

bool

property custom_sampler_bone_rotations: None

[Read-Only]

Type:

(Array[float])

property custom_sampler_deltas: None

[Read-Only]

Type:

(Array[float])

destroy_model_instance(model_instance) None

Destroy Model Instance

Parameters:

model_instance (NearestNeighborModelInstance) –

get_mesh_index_buffer() Array[int32]

Get Mesh Index Buffer

Return type:

Array[int32]

get_model_skeleton(model) Skeleton

Get Model Skeleton

Parameters:

model (MLDeformerModel) –

Return type:

Skeleton

get_nearest_neighbor_model() NearestNeighborModel

Get Nearest Neighbor Model

Return type:

NearestNeighborModel

get_neighbor_stats(stats_data) bool

Get Neighbor Stats

Parameters:

stats_data (NearestNeighborStatsData) –

Return type:

bool

get_num_frames_anim_sequence(anim) int32

Get Num Frames Anim Sequence

Parameters:

anim (AnimSequence) –

Return type:

int32

get_num_frames_geometry_cache(geometry_cache) int32

Get Num Frames Geometry Cache

Parameters:

geometry_cache (GeometryCache) –

Return type:

int32

get_unskinned_vertex_positions() Array[float]

Get Unskinned Vertex Positions

Return type:

Array[float]

kmeans_cluster_poses(k_means_data) int32

Kmeans Cluster Poses

Parameters:

k_means_data (NearestNeighborKMeansData) –

Return type:

int32

set_custom_sampler_data(anim, cache=None) bool

Set Custom Sampler Data

Parameters:
Return type:

bool

set_custom_sampler_data_from_section(section_index) bool

Set Custom Sampler Data from Section

Parameters:

section_index (int32) –

Return type:

bool

train() int32

Train

Return type:

int32

update_nearest_neighbor_data() int32

Update Nearest Neighbor Data

Return type:

int32