MMpy.Colour.serialise

Syntax

colour.serialise()

Description

Serialises the colour object to a string which can then be used in the MMpy.FormSet.set_field function.

Returns

Type
Description
str A string representation of the colour object.

Notes

This function is normally not used with newly recorded scripts in version 2020+ as form sets are now able to accept objects directly.

Examples

colour = MMpy.Colour(0, 0, 0)
formset = MMpy.FormSet(...)

# Older recorded scripts
formset.set_field('COLOUR', colour.serialise())

# Newer recorded scripts (v2020+)
formset.set_field(123, colour)

Resource ID

IDPH_COLOUR_SERIALISE