Base class used for all four hair subclasses.

Contains ways to change the material of the hair, to access modifiers and particle systems and to generate haircards.

Attributes
lightnessNodeInput—
rednessNodeInput—
roughnessNodeInput—
salt_and_pepperNodeInput—
rootsNodeInput—
root_lightnessNodeInput—
root_rednessNodeInput—
roots_hueNodeInput—
fast_or_accurateNodeInput—
hueNodeInput—
particle_systemsPropCollectionGet propcollection of particle systems on the human used by this hair type.
modifiersPropCollectionModifiers associated with the particle systems of this hair type.
haircard_objOptional[bpy.types.Object]Blender object of haircards IF generated.
materialslist[bpy.types.Material]List of materials used for this type of hair.
nodesPropCollectionPropCollection of nodes used in the materials for this type of hair. # noqa
Methods
convert_to_haircards()bpy.types.ObjectConvert the hair of this type to haircards.
get_evaluated_particle_systems()PropCollectionGet an evaluated version of the particle systems of this hair type.
delete_all()—
randomize_color()Randomize the color of the hair of this type.
as_dict()Save these settings to a dict and restore them from one.

Attributes

No description yet.

No description yet.

No description yet.

No description yet.

No description yet.

No description yet.

No description yet.

No description yet.

No description yet.

No description yet.

Get propcollection of particle systems on the human used by this hair type.

BaseHair.modifiers: PropCollectionread-only

source

Modifiers associated with the particle systems of this hair type.

BaseHair.haircard_obj: Optional[bpy.types.Object]read-only

source

Blender object of haircards IF generated.

BaseHair.materials: list[bpy.types.Material]read-only

source

List of materials used for this type of hair.

Usually singleton, but will contain multiple values if haircards are generated.

BaseHair.nodes: PropCollectionread-only

source

PropCollection of nodes used in the materials for this type of hair. # noqa

Methods

BaseHair.convert_to_haircards(quality: Literal['ultra', 'high', 'medium', 'low', 'haircap_only'] = 'high', context: C = None, triangle_budget: Optional[int] = None) → bpy.types.Object

source

Convert the hair of this type to haircards.

Will generate a mesh object consisting of a haircap and haircards, skinned to the rig of the human. For eye systems only a haircap will be generated. The object follows the expressions of the human.

ParameterTypeDescription
qualityLiteral['ultra', 'high', 'medium', 'low', 'haircap_only']
default 'high'
Quality of the haircards, which sets the number of triangles of the generated object. Defaults to high.
contextC
default None
Blender context. bpy.context if not provided.
triangle_budgetOptional[int]
default None
Maximum number of triangles of the generated object, overrides the budget of the quality.

Returns bpy.types.Object — bpy.types.Object: Blender object of the haircap and haircards

Raises HumGenException — If this human has no hair of this type to convert.

Get an evaluated version of the particle systems of this hair type.

ParameterTypeDescription
contextC
default None
Blender context. bpy.context if not provided.

Returns PropCollection — PropCollection of evaluated particle systems

BaseHair.delete_all()

source

No description yet.

Randomize the color of the hair of this type.

Serialization: as_dict

BaseHair.as_dict() → dict[str, Any]

source

Return a dictionary representation of this hair type.

Contains information about material.

Returns dict[str, Any] — dict[str, Any]: Dictionary representation of this hair type