BaseHair
human/hair/basehair.pyBase 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 | ||
|---|---|---|
| lightness | NodeInput | — |
| redness | NodeInput | — |
| roughness | NodeInput | — |
| salt_and_pepper | NodeInput | — |
| roots | NodeInput | — |
| root_lightness | NodeInput | — |
| root_redness | NodeInput | — |
| roots_hue | NodeInput | — |
| fast_or_accurate | NodeInput | — |
| hue | NodeInput | — |
| particle_systems | PropCollection | Get propcollection of particle systems on the human used by this hair type. |
| modifiers | PropCollection | Modifiers associated with the particle systems of this hair type. |
| haircard_obj | Optional[bpy.types.Object] | Blender object of haircards IF generated. |
| materials | list[bpy.types.Material] | List of materials used for this type of hair. |
| nodes | PropCollection | PropCollection of nodes used in the materials for this type of hair. # noqa |
| Methods | ||
| convert_to_haircards() | bpy.types.Object | Convert the hair of this type to haircards. |
| get_evaluated_particle_systems() | PropCollection | Get 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.
BaseHair.salt_and_pepper: NodeInput
sourceNo description yet.
No description yet.
BaseHair.root_lightness: NodeInput
sourceNo description yet.
BaseHair.root_redness: NodeInput
sourceNo description yet.
No description yet.
BaseHair.fast_or_accurate: NodeInput
sourceNo description yet.
No description yet.
BaseHair.particle_systems: PropCollectionread-only
sourceGet propcollection of particle systems on the human used by this hair type.
BaseHair.modifiers: PropCollectionread-only
sourceModifiers associated with the particle systems of this hair type.
BaseHair.haircard_obj: Optional[bpy.types.Object]read-only
sourceBlender object of haircards IF generated.
List of materials used for this type of hair.
Usually singleton, but will contain multiple values if haircards are generated.
BaseHair.nodes: PropCollectionread-only
sourcePropCollection 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
sourceConvert 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.
| Parameter | Type | Description |
|---|---|---|
| quality | Literal['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. |
| context | C default None | Blender context. bpy.context if not provided. |
| triangle_budget | Optional[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.
BaseHair.get_evaluated_particle_systems(context: C = None) → PropCollection
sourceGet an evaluated version of the particle systems of this hair type.
| Parameter | Type | Description |
|---|---|---|
| context | C default None | Blender context. bpy.context if not provided. |
Returns PropCollection — PropCollection of evaluated particle systems
BaseHair.delete_all()
sourceNo description yet.
BaseHair.randomize_color()
sourceRandomize the color of the hair of this type.