human.keys

Class for changing the shape keys and LiveKeys of this human.

Attributes
all_keysList[Union[LiveKeyItem, ShapeKeyItem]]A list of all ShapeKeyItems and LiveKeyItems of this human.
all_livekeysList[LiveKeyItem]A list of all LiveKeyItems of this human.
all_shapekeysList[ShapeKeyItem]A list of all ShapeKeyItems of this human.
all_added_shapekeysList[ShapeKeyItem]A list of all ShapeKeyItems that were added by the user or converted from lk.
all_deformation_shapekeysList[ShapeKeyItem]A list of ShapeKeyItems that are used for deformation.
temp_keybpy.types.ShapeKeyThe temporary shape key used for livekeying. Points to the Blender key.
permanent_keybpy.types.ShapeKeyThe permanent shape key used for livekeying. Points to the Blender key.
Methods
fold_temp_key()Moves the shape of the temporary live key into the permanent live key.
get()Optional[Union[ShapeKeyItem, LiveKeyItem]]—
filtered()List[Union[LiveKeyItem, ShapeKeyItem]]Get all keys that match the given category and subcategory.
load_from_npz()bpy.types.ShapeKeyCreates new shapekey on the body or the passed obj_override from a npz file.
update_human_from_key_change()Update the human mesh from the current live key values.
as_dict() · set_from_dict()Save these settings to a dict and restore them from one.

Attributes

human.keys.all_keys: List[Union[LiveKeyItem, ShapeKeyItem]]read-only

source

A list of all ShapeKeyItems and LiveKeyItems of this human.

human.keys.all_livekeys: List[LiveKeyItem]read-only

source

A list of all LiveKeyItems of this human.

human.keys.all_shapekeys: List[ShapeKeyItem]read-only

source

A list of all ShapeKeyItems of this human.

human.keys.all_added_shapekeys: List[ShapeKeyItem]read-only

source

A list of all ShapeKeyItems that were added by the user or converted from lk.

A list of ShapeKeyItems that are used for deformation.

This means they are not used for animation, but for changing the base shape of the human. It leaves out the Basis key, the corrective keys, the eye look keys, and the expression keys.

human.keys.temp_key: bpy.types.ShapeKeyread-only

source

The temporary shape key used for livekeying. Points to the Blender key.

human.keys.permanent_key: bpy.types.ShapeKeyread-only

source

The permanent shape key used for livekeying. Points to the Blender key.

Methods

human.keys.fold_temp_key()

source

Moves the shape of the temporary live key into the permanent live key.

The livekey that was changed last lives in the temporary key, all the others are summed in the permanent key. After this call all livekey values are in the permanent key, so the shape of the body does not depend on the temporary key anymore.

human.keys.get(name: str) → Optional[Union[ShapeKeyItem, LiveKeyItem]]

source

No description yet.

ParameterTypeDescription
namestr—

Returns Optional[Union[ShapeKeyItem, LiveKeyItem]]

human.keys.filtered(category: str, subcategory: Optional[str] = None) → List[Union[LiveKeyItem, ShapeKeyItem]]

source

Get all keys that match the given category and subcategory.

ParameterTypeDescription
categorystrThe category to filter for.
subcategoryOptional[str]
default None
The subcategory to filter for.

Returns List[Union[LiveKeyItem, ShapeKeyItem]] — List[Union[LiveKeyItem, ShapeKeyItem]]: List of all keys matching the filter

human.keys.load_from_npz(npz_filepath: str, obj_override: Optional[Object] = None) → bpy.types.ShapeKey

source

Creates new shapekey on the body or the passed obj_override from a npz file.

This .npy file contains a one dimensional array with coordinates of the shape key, RELATIVE to the base coordinates of the body.

ParameterTypeDescription
npz_filepathstrPath to the .npz file
obj_overrideOptional[Object]
default None
Add the shape key to this object instead of to the body object. Defaults to None.

Returns bpy.types.ShapeKey — bpy.types.ShapeKey: The newly created shape key

human.keys.update_human_from_key_change(context: C = None)

source

Update the human mesh from the current live key values.

This is used when updating a live key directly or after changing multiple livekeys with their set_without_update method.

ParameterTypeDescription
contextC
default None
Blender context. Defaults to None.
Serialization: as_dict, set_from_dict

human.keys.as_dict() → dict[str, float]

source

Get the current shape key and live key values as a dictionary.

Returns dict[str, float] — dict[str, float]: Dictionary of shape key and live key values

human.keys.set_from_dict(key_dict: dict[str, float], context: C = None) → list[str]

source

Set the shape key and live key values from a dictionary.

ParameterTypeDescription
key_dictdict[str, float]Dictionary of shape key and live key values
contextC
default None
Blender context. Defaults to None.

Returns list[str] — list[str]: List of errors that occurred during setting the values