c4d.HandleInfo

class c4d.HandleInfo

Attributes

HandleInfo.position

The current handle position.

Type: Vector

HandleInfo.direction

The normal used for the handle travel. For linear handle constraints it is the line on which a handle can travel. For planar and radial constraints it is the normal of the plane/disc. Otherwise it is not needed.

Type: Vector

HandleInfo.center

Handle constraint center, for radial and spherical handle constraints.

Type: Vector

HandleInfo.radius

Handle constraint radius, for radial and spherical handle constraints.

Type: float

HandleInfo.type

Handle constraint type. One of these types:

HANDLECONSTRAINTTYPE_INVALID

Invalid handle constraint type, used to temporarily ignore handles (e.g. in the Camera Object with the Front/Back DOF handles).

HANDLECONSTRAINTTYPE_LINEAR

Linear handle constraint.

HANDLECONSTRAINTTYPE_PLANAR

Planar handle constraint.

HANDLECONSTRAINTTYPE_FREE

No constraint.

HANDLECONSTRAINTTYPE_RADIAL

Radial handle constraint.

HANDLECONSTRAINTTYPE_SPHERICAL

Spherical handle constraint.

Methods Signatures

HandleInfo.__init__()

Constructor.

HandleInfo.CalculateNewPosition()

Calculates a handle position for a given mouse position.

Methods Documentation

HandleInfo.__init__(self)

Constructor.

HandleInfo.CalculateNewPosition(self, bd, mg, mouse_pos)

Calculates a handle position for a given mouse position.

Parameters
  • bd (c4d.BaseDraw) – The active viewport.

  • mg (c4d.Matrix) – The global matrix of the handle’s parent object.

  • mouse_pos (c4d.Vector) – The mouse coordinates for which to calculate the handle position.