c4d.modules.hair.HairObject

class c4d.modules.hair.HairObject

The hair object.

Parent Class:

Overview

Guide And Strand Generation

HairObject.GenerateHair()

Generates hair for the hair object.

HairObject.GetDynamicGuides()

Gets the dynamic guides of this hair object.

HairObject.GetGuides()

Gets the guides of this hair object.

HairObject.RemoveGuides()

Removes the guides of this hair object.

HairObject.SetGuides()

Sets guides for this hair object.

Object Lifecycle

HairObject.GetRootObject()

Gets the root object and tag!

HairObject.IsLocked()

Checks if the hair object is locked.

HairObject.Lock()

Locks the hair object.

HairObject.Unlock()

Unlocks the hair object.

HairObject.Update()

Updates this hair object.

Members

Guide And Strand Generation

HairObject.GenerateHair(self, flags, count, segments)

Generates hair for the hair object.

Parameters
  • flags (int) –

    The generate flags:

    Symbol ID

    Description

    HAIR_GENERATE_FLAGS_NONE

    None

    HAIR_GENERATE_FLAGS_NO_MATERIAL

    No material.

    HAIR_GENERATE_FLAGS_NO_DYNAMICS

    No dynamics.

    HAIR_GENERATE_FLAGS_NO_TRANSFORM

    No transformation.

    HAIR_GENERATE_FLAGS_NO_DEFORMERS

    No deformers.

  • count (int) – The hair count.

  • segments (int) – The segments.

HairObject.GetDynamicGuides(self)

Gets the dynamic guides of this hair object.

Return type

c4d.modules.hair.HairGuides

Returns

The dynamic guides.

HairObject.GetGuides(self)

Gets the guides of this hair object.

Return type

c4d.modules.hair.HairGuides

Returns

The guides.

HairObject.RemoveGuides(self)

Removes the guides of this hair object.

HairObject.SetGuides(self, guides, clone)

Sets guides for this hair object.

Parameters

Object Lifecycle

HairObject.GetRootObject(self)

Gets the root object and tag!

root = ho.GetRootObject()
if not root: return

print(root["pObject"], root["pTag"])
Return type

Optional[Dict[“pObject”: c4d.BaseObject, “pTag”: c4d.BaseTag]]

Returns

The root object and tag or None.

HairObject.IsLocked(self)

Checks if the hair object is locked.

Return type

bool

Returns

True if the hair object is locked, otherwise False.

HairObject.Lock(self, pDoc, pThread, bValidate=True, flags=0)

Locks the hair object.

Parameters
  • pDoc (c4d.documents.BaseDocument) – The document.

  • pThread (c4d.threading.BaseThread) – The thread.

  • bValidate (bool) – Validate the lock.

  • flags (int) –

    Lock flags

    Symbol ID

    Description

    HAIR_LOCK_FLAGS_ANIMATING

    Animating.

    HAIR_LOCK_FLAGS_FULL_UPDATE

    Full update.

    HAIR_LOCK_FLAGS_NO_TRANSFORM

    No transformation.

Return type

bool

Returns

True if successful, otherwise False.

HairObject.Unlock(self)

Unlocks the hair object.

HairObject.Update(self)

Updates this hair object.

Return type

bool

Returns

True if successful, otherwise False.