c4d.modules.hair.HairLibrary

Hair library class.

Definition

class c4d.modules.hair. HairLibrary

Members

HairLibrary. SetMode ( doc , mode )

Set hair mode.

Parameters:
  • doc ( c4d.documents.BaseDocument ) – Document.
  • mode ( int ) –

    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 ( c4d.documents.BaseDocument ) – Document.
Return type: int
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 )

Blend colors.

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

c4d.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 ( c4d.Vector ) – First point value.
  • pb ( c4d.Vector ) – Second point value.
  • pc ( c4d.Vector ) – Third point value.
  • pd ( c4d.Vector ) – Fourth point value.
  • bQuad ( bool ) – True means quadrangle, False means triangle.
Return type:

tuple(float, float)

Returns:

The s and t coordinates.

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

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

Parameters:
Return type:

tuple(float, float)

Returns:

The s and t coordinates.

HairLibrary. GetHairVersion ( )

Get the hair version.

Return type: int
Returns: Hair version number.

Table Of Contents