c4d.UnitScaleData

Unit scale data type (CUSTOMDATATYPE_UNITSCALE).

This type is called by value.

Inheritance

Members

UnitScaleData.__init__(v)
Parameters:v (c4d.UnitScaleData) – Copy constructor.
Return type:c4d.UnitScaleData
Returns:The new unit scale data.
UnitScaleData.SetUnitScale(scale, unit)

Sets the values for the unit scale data type.

Parameters:
  • scale (float) – The unit scale.
  • unit (int) –

    One of the following unit:

    DOCUMENT_UNIT_UNDEF 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()

Retrieves the values of the unit scale data type:

scale, unit = data.GetUnitScale()
Return type:tuple(float, int)
Returns:The scale and unit data.