c4d.modules.hair.HairLibrary

Hair library class.

Inheritance

  • c4d.modules.hair.HairLibrary

Members

HairLibrary.SetMode(doc, mode)

Set hair mode.

Parameters:
  • doc (BaseDocument) – Document.
  • mode (long) –

    New hair mode:

    HAIR_MODE_LOCKED Locked mode
    HAIR_MODE_HIDDEN Hidden mode.
    HAIR_MODE_TIPS Tips mode.
    HAIR_MODE_POINTS Points mode.
    HAIR_MODE_GUIDES Guides mode.
    HAIR_MODE_ROOTS Roots mode.
    HAIR_MODE_VERTEX Vertex mode.
HairLibrary.GetMode(doc)

Get hair mode.

Parameters: doc (BaseDocument) – Document.
Return type: long
Returns: Hair mode:
HAIR_MODE_LOCKED Locked mode
HAIR_MODE_HIDDEN Hidden mode.
HAIR_MODE_TIPS Tips mode.
HAIR_MODE_POINTS Points mode.
HAIR_MODE_GUIDES Guides mode.
HAIR_MODE_ROOTS Roots mode.
HAIR_MODE_VERTEX Vertex mode.
HairLibrary.BlendColors(mode, colA, colB)

Gets the number of guides.

Parameters:
  • mode (int) – Blend mode. (See mhairmaterial.h for modes, e.g. HAIRMATERIAL_BLENDMODE_AVERAGE.)
  • colA (Vector) – First color
Return type:

Vector

Returns:

Resulting color.

HairLibrary.MixST(s, t, pa, pb, pc, pd, bQuad)

Mix by the s and t coordinates among pa, pb, pc and pd.

Parameters:
  • s (float) – S coordinate.
  • t (float) – T coordinate.
  • pa (Vector) – First point value.
  • pb (Vector) – Second point value.
  • pc (Vector) – Third point value.
  • pd (Vector) – Fourth point value.
  • bQuad (bool) – True means quadrangle, False means triangle.
Return type:

tuple(2) of float

Returns:

The s and t coordinates.

HairLibrary.GetPolyPointST(p, pa, pb, pc, pd, bQuad)

New in version R13.029.

Calculate the s and t coordinates of the point p in the polygon described by pa, pb, pc and pd.

Parameters:
  • p (Vector) – Point to get the coordinates for.
  • pa (Vector) – First point value.
  • pb (Vector) – Second point value.
  • pc (Vector) – Third point value.
  • pd (Vector) – Fourth point value.
  • bQuad (bool) – True means quadrangle, False means triangle.
Return type:

tuple(2) of float

Returns:

The s and t coordinates.

HairLibrary.GetHairVersion()

Get the hair version.

Return type: int
Returns: Hair version number.

Table Of Contents