MAXScript Extensions > MAXScript Extensions for Cloth >

# Garment_Maker : Modifier

    Garment_Maker-SuperClass:modifier; super-superclass:MAXWrapper -classID:#(940967468, 1610249612)

The Garment_Maker modifier turns a shape into a garment panel to be used in cloth simulations. It provides optimal meshing for achieving wrinkles and cloth-like behavior.

Constructor:

    Garment_Maker... Garmentize2 ...

Properties:

    <Garment_Maker>.density Float default: 1.0 -- float

Get/Set the Density value.

    <Garment_Maker>.autoMesh BooleanClass default: true -- boolean

Get/Set the state of the Auto mesh checkbox. When true (default), the meshing will be performed automatically. When false, the meshing will be performed manually by either pressing the Mesh It button in the UI or by calling the gmakerOps.meshit() method documented below.

    <Garment_Maker>.preserve BooleanClass default: true -- boolean

Get/Set the state of the Preserve checkbox.

    <Garment_Maker>.relax BooleanClassdefault: false -- boolean

    <Garment_Maker>.outputType Integer default: 0 -- integer; Output_Type

Get/Set the output type radio buttons state. Possible values are:

0 - Arranged Panels

1 - Preserved Surface

2 - Flat Panels

    <Garment_Maker>.figure UndefinedClassdefault: undefined -- node

Get/Set the Figure object.

    <Garment_Maker>.stretchMapping BooleanClass default: true -- boolean; Stretch_Mapping

Get/Set the state of the Stretch Mapping Coordinates checkbox.

    <Garment_Maker>.striptexturescale Float default: 0.1 -- float; Stip_Texture_Scale

Get/Set the strip texture scale value.

    <Garment_Maker>.stripwidth Float default: 0.5 -- float; Strip_Width

Get/Set the strip width value.

    <Garment_Maker>.showMesh BooleanClass default: false -- boolean; Show_Mesh

Get/set whether to show the mesh.

    <Garment_Maker>.showSeams BooleanClass default: true -- boolean; Show_Seams

Get/set whether to show the seams.

## Garment Maker Interfaces:

    Interface: gmakerOps

Methods:

    <void>generateDescription()

Generates a new MAXScript description of the currently selected object and outputs it to a new MAXScript Editor window.

SAMPLE OUTPUT CAN LOOK LIKE:
    $.modifiers[#garmentmaker].setDensity 0.364000
    $.modifiers[#garmentmaker].setSeamTolerance 0.060000
    $.modifiers[#garmentmaker].setPanelMatrix 1 (matrix3 [1.000000, 0.000000, 0.000000] [0.000000, 1.000000, 0.000000] [0.000000, 0.000000, 1.000000] [0.000000, 0.000000, 0.000000] )
    $.modifiers[#garmentmaker].setFlatPanelMatrix 1 (matrix3 [1.000000, 0.000000, 0.000000] [0.000000, 1.000000, 0.000000] [0.000000, 0.000000, 1.000000] [0.000000, 0.000000, 0.000000] )
    $.modifiers[#garmentmaker].setPanelParams 1 1.000000 0 0.001000 0 1
    $.modifiers[#garmentmaker].meshIt()

### Object Rollout

    <void> setDensity <float>density

Sets the cloth density.

    <float> getDensity()

Returns the cloth density.

    <void> meshIT()

Corresponds to pressing the "Mesh It!" button.

    <void> meshItPreserve()

Corresponds to pressing the "Mesh It and Preserve" button.

### Panels Rollout

    <void>setPanelParams<index>panel <float>density <integer>deform_type <float>curvature <integer>axis <integer>MatID

Sets all parameters of the indexed panel to the specified values.

    <integer> getPanelDeformType <index>panel

Returns the deformation type of the indexed panel.

Possible values are:

0 - None

1 - Curved

    <void> setPanelDeformType <index> panel <integer> deform_type

Sets the deformation type of the indexed panel to the specified value.

Possible values are:

0 - None

1 - Curved

    <float> getPanelDensity <index> panel

Returns the density of the indexed panel.

    <void> setPanelDensity <index> panel <float> density

Sets the density of the indexed panel to the specified value.

    <integer> getPanelMatID <index> panel

Returns the Material ID of the indexed panel.

    <void> setPanelMatID <index> panel <integer> MatID

Sets the Material ID of the indexed panel to the specified ID.

    <float> getPanelCurvature <index> panel

Returns the Curvature of the indexed panel.

    <void> setPanelCurvature <index> panel <float> curvature

Sets the Curvature of the indexed panel to the specified value.

    <integer> getPanelAxis <index> panel

Returns the Axis of the indexed panel.

Possible values are:

0 - X-axis

1 - Y-axis

    <void>setPanelAxis <index> panel <integer> axis

Sets the Axis of the indexed panel.

Possible values are:

0 - X-axis

1 - Y-axis

    <index>getPanelFromSpline <index> spline

Returns the index of the panel defined by the supplied indexed spline.

    <matrix3>getPanelMatrix <index> panel

Returns the matrix of the indexed panel.

    <void> setPanelMatrix <index> panel <matrix3> matrix

Sets the matrix of the indexed panel to the supplied matrix3 value.

    <matrix3>getFlatPanelMatrix <index> panel

Returns the matrix of the indexed flat panel.

    <void> setFlatPanelMatrix <index> panel <matrix3> matrix

Sets the matrix of the indexed flat panel to the supplied matrix3 value.

### Curves andSeams Rollouts

    <void>setSeamParamsByIndex <index>seam <float>bend_angle <float>bend_stiffness <boolean>enabled <float>sewing_stiffness

Set all parameters of the indexed seam to the supplied values.

    <void>ButtonCreateSeam()

Corresponds to pressing the "Create Seam" button.

    <void>selectSplines <bitArray>sel

Selects the splines specified by bits set in the supplied bitArray.

FOR EXAMPLE:
    theSpline = Donut()
    addModifiers theSpline (Garment_Maker())
    select theSpline
    subObjectLevel = 1--change to Spline SO mode
    theSpline.Garment_Maker.selectSplines #{1}--select the outer spline
    sleep 1--wait a second
    theSpline.Garment_Maker.selectSplines #{2}--select the inner spline
    sleep 1--wait another second
    theSpline.Garment_Maker.selectSplines #{1,2}--select both splines

    <integer>createSeamFromSplines <index> spline1 <index> spline2 <integer>orientation

Creates a seam from the supplied two indexed splines with the given orientation.

    <string>makeMultiSegmentFromSplines<int array>indices

Corresponds to pressing the "Make MultiSegment" button for the indexed splines specified in the supplied array.

    <float>getSeamTolerance()

Returns the seam tolerance value.

    <void>setSeamTolerance <float> tolerance

Sets the seam tolerance to the specified value.

#### See Also

- Cloth : Modifier

- MAXScript Extensions for Cloth

- Modifier Common Properties, Operators, and Methods

- MAXWrapper Common Properties, Operators, and Methods

- Value Common Properties, Operators, and Methods