c4d.UnitScaleData

class c4d.UnitScaleData

Unit scale data type (CUSTOMDATATYPE_UNITSCALE).

This type is called by value.

Methods Signatures

UnitScaleData.__init__(self, v)

type v

c4d.UnitScaleData

UnitScaleData.SetUnitScale(self, scale, unit)

Sets the values for the unit scale data type.

UnitScaleData.GetUnitScale(self)

Retrieves the values of the unit scale data type.

Inheritance

Parent Class:

Methods Documentation

UnitScaleData.__init__(self, v)
Parameters

v (c4d.UnitScaleData) – Copy constructor.

UnitScaleData.SetUnitScale(self, scale, unit)

Sets the values for the unit scale data type.

Parameters
  • scale (float) – The unit scale.

  • unit (int) –

    One of the following unit:

    Symbol ID

    Description

    DOCUMENT_UNIT_UNDEFINED

    Undefined.

    DOCUMENT_UNIT_KM

    Kilometer.

    DOCUMENT_UNIT_M

    Meter.

    DOCUMENT_UNIT_CM

    Centimeter.

    DOCUMENT_UNIT_MM

    Millimeter.

    DOCUMENT_UNIT_MICRO

    Micrometer.

    DOCUMENT_UNIT_MILE

    Mile.

    DOCUMENT_UNIT_YARD

    Yard.

    DOCUMENT_UNIT_FOOT

    Foot.

    DOCUMENT_UNIT_INCH

    Inch.

Return type

bool

Returns

True if successful, otherwise False

UnitScaleData.GetUnitScale(self)

Retrieves the values of the unit scale data type.

scale, unit = data.GetUnitScale()
Return type

Tuple[float, int]

Returns

The scale and unit data