c4d.modules.hair.HairGuides

Helper class for guides/hair.

Members

HairGuides.GetCount()

Gets the number of guides.

Return type:int
Returns:Guide count.
HairGuides.GetSegmentCount()

Gets the number of segments per guide (number of points is one more than this).

Return type:int
Returns:Number of segments per guide.
HairGuides.GetPointCount()

Gets the number of points per guide. (One more than segments.)

Return type:int
Returns:Number of points per guide.
HairGuides.GetGuidePointCount()

Gets the number of points per segment.

Return type:int
Returns:Number of points per segment.
HairGuides.GetPoints()

Gets a list of points for the guides.

Return type:list of Vector
Returns:Point list.
HairGuides.SetPoint(id, p)

Set the point p at index id.

Parameters:
  • id (int) – The point index.
  • p (Vector) – The point.
Raises IndexError:
 

If the point index id is out of range : 0<=id<GetPointCount().

HairGuides.GetMg()

Gets the global matrix.

Return type:Matrix
Returns:Global matrix.
HairGuides.SetMg(mg)

Sets the global matrix.

Parameters:mg (Matrix) – New global matrix.
HairGuides.GetObject()

Gets the corresponding hair object.

Return type:HairObject
Returns:Hair object.
HairGuides.GetSelected(mode)

Gets the selection state.

Parameters:mode (int) –

Selection 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.
Return type:BaseSelect
Returns:The selection or None.
HairGuides.SetSelected(mode, select)

Sets the selection state.

Parameters:
  • mode (int) –

    Selection 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.
  • select (BaseSelect) – The selection.
Return type:

bool

Returns:

True if successful, otherwise False.

HairGuides.ConvertSelection(from_mode, to_mode, from_select, to_select)

Converts the selection state.

Parameters:
  • from_mode (int) –

    Selection 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.
  • to_mode (int) –

    To 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.
  • from_select (BaseSelect) – From selection.
  • to_select (BaseSelect) – To selection.
HairGuides.CopyFrom(src)

Copies the guide data from src to this instance.

Parameters:src (BaseSelect) – Source.
Return type:bool
Returns:True if successful, otherwise False.
HairGuides.GetTangent(guide, segment, t)

Gets the tangend of guide at segment and t.

Parameters:
  • guide (int:) – Guide index.
  • segment (int) – Segment index.
  • t (float) – T coordinate.
HairGuides.CreateSpline()

Create splines from the guides.

Return type:SplineObject
Returns:Created splines.
HairGuides.ToLocal()

Changes all the points for the guides into a local coordinate system.

HairGuides.ToWorld()

Changes all the points for the guides into the world coordinate system.

HairGuides.GetRootUV(index)

Gets the root UV at index.

Parameters:index (int) – Guide index.
Return type:Vector
HairGuides.GetTransformMatrix(index)

Gets the transformation matrix list.

Return type:list of Matrix
Returns:The transformation matrix list.
HairGuides.GetFlags()

Gets the flags.

Return type:int
Returns:Flags:
HAIR_GUIDE_FLAGS_LOCAL Chains are in local object space.
HAIR_GUIDE_FLAGS_AS_GUIDES Special case guides.
HAIR_GUIDE_FLAGS_INITIAL Chains are in their original initial space (like a sticktexturetag)
HAIR_GUIDE_FLAGS_HAIRS Created for hairs.
HAIR_GUIDE_FLAGS_INITIALAXIS Initial space and root axis aligned.
HairGuides.SetFlags(flags)

Sets the flags.

Parameters:flags (int) –

New flags:

HAIR_GUIDE_FLAGS_LOCAL Chains are in local object space.
HAIR_GUIDE_FLAGS_AS_GUIDES Special case guides.
HAIR_GUIDE_FLAGS_INITIAL Chains are in their original initial space (like a sticktexturetag)
HAIR_GUIDE_FLAGS_HAIRS Created for hairs.
HAIR_GUIDE_FLAGS_INITIALAXIS Initial space and root axis aligned.
Return type:int
Returns:Old flags.

Table Of Contents