LiveKeyItem
human/keys/keys.pyInherits from KeyItem
Item representing a livekey, used for changing the value and converting it.
| Attributes | ||
|---|---|---|
| path | — | |
| value | float | Get current value from temp_key or stored list on human. |
| name | —from KeyItem | |
| category | —from KeyItem | |
| subcategory | —from KeyItem | |
| Methods | ||
| set_without_update() | Set the value of the livekey without updating the human rig and clothing. | |
| to_shapekey() | ShapeKeyItem | Convert this livekey to a Blender shape key on the human. |
| as_bpy() | BpyLiveKey | Get a pointer to a CollectionProperty item representing this livekey. |
| draw_prop() | bpy.types.UILayout | Draw the livekey as a slider in the UI. |
Attributes
No description yet.
Get current value from temp_key or stored list on human.
No description yet.
No description yet.
LiveKeyItem.subcategoryfrom KeyItem
sourceNo description yet.
Methods
LiveKeyItem.set_without_update(value: float)
sourceSet the value of the livekey without updating the human rig and clothing.
This can be used for faster livekey changes. Call
{human}.keys.update_human_from_key_change()
when done with setting your livekeys.
| Parameter | Type | Description |
|---|---|---|
| value | float | value to set the livekey to |
LiveKeyItem.to_shapekey(transfer_value: bool = False) → ShapeKeyItem
sourceConvert this livekey to a Blender shape key on the human.
| Parameter | Type | Description |
|---|---|---|
| transfer_value | bool default False | Move the current value of the livekey onto the shape key. The livekey then no longer shapes the basis of the body, the shape key does. Without this the livekey keeps working and the shape key is added at a value of 0. |
Returns ShapeKeyItem — shapekey item representing the converted livekey
Get a pointer to a CollectionProperty item representing this livekey.
This is useful for sliders in the UI.
Returns BpyLiveKey — CollectionProperty item representing this livekey
LiveKeyItem.draw_prop(layout: bpy.types.UILayout, value_propname: Literal['value', 'value_limited', 'value_positive_limited'] = 'value') → bpy.types.UILayout
sourceDraw the livekey as a slider in the UI.
| Parameter | Type | Description |
|---|---|---|
| layout | bpy.types.UILayout | layout to draw the livekey in |
| value_propname | Literal['value', 'value_limited', 'value_positive_limited'] default 'value' | name of the property to draw. Defaults to "value". |
Returns bpy.types.UILayout — bpy.types.UILayout: layout with the slider drawn in it, as row.