c4d.UnitScaleData

New in version R13.029.

Unit scale data type (CUSTOMDATATYPE_UNITSCALE) for use with the UnitScaleCustomGui GUI.

This type is called by value.

Inheritance

Members

UnitScaleData.__init__([v])
Parameters: v (UnitScaleData) – Copy constructor.
Return type: 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 Kilometre
    DOCUMENT_UNIT_M Metre
    DOCUMENT_UNIT_CM Centimetre
    DOCUMENT_UNIT_MM Millimetre
    DOCUMENT_UNIT_MICRO Micrometre
    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()
Parameters:
  • scale (float) – The unit scale.
  • unit (int) –

    One of the following unit:

    DOCUMENT_UNIT_UNDEF Undefined
    DOCUMENT_UNIT_KM Kilometre
    DOCUMENT_UNIT_M Metre
    DOCUMENT_UNIT_CM Centimetre
    DOCUMENT_UNIT_MM Millimetre
    DOCUMENT_UNIT_MICRO Micrometre
    DOCUMENT_UNIT_MILE Mile
    DOCUMENT_UNIT_YARD Yard
    DOCUMENT_UNIT_FOOT Foot
    DOCUMENT_UNIT_INCH Inch
Return type:

tuple of int

Returns:

The scale and unit data.

Table Of Contents