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 ...

Properties:

.density Float default: 1.0 -- float

Get/Set the Density value.

.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.

.preserve BooleanClass default: true -- boolean

Get/Set the state of the Preserve checkbox.

.'output type' 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

.figure UndefinedClass default: undefined -- node

Get/Set the Figure object.

.stretchMapping BooleanClass default: true -- boolean; Stretch_Mapping

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

?

.striptexturescale Float default: 0.1 -- float; Stip_Texture_Scale

Get/Set the strip texture scale value.

.stripwidth Float default: 0.5 -- float; Strip_Width

Get/Set the strip width value.

Garment Maker Interfaces:

Interface: gmakerOps

Methods:

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

setDensity density

Sets the cloth density.

getDensity()

Returns the cloth density.

meshIT()

Corresponds to pressing the "Mesh It!" button.

meshItPreserve()

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

?

Panels Rollout

setPanelParams <index>panel density deform_type curvature axis MatID

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

getPanelDeformType <index>panel

Returns the deformation type of the indexed panel.

Possible values are:

0 - None

1 - Curved

setPanelDeformType <index>panel deform_type

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

Possible values are:

0 - None

1 - Curved

getPanelDensity <index>panel

Returns the density of the indexed panel.

setPanelDensity <index>panel density

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

getPanelMatID <index>panel

Returns the Material ID of the indexed panel.

setPanelMatID <index>panel MatID

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

getPanelCurvature <index>panel

Returns the Curvature of the indexed panel.

setPanelCurvature <index>panel curvature

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

getPanelAxis <index>panel

Returns the Axis of the indexed panel.

Possible values are:

0 - X-axis

1 - Y-axis

setPanelAxis <index>panel 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.

getPanelMatrix <index>panel

Returns the matrix of the indexed panel.

setPanelMatrix <index>panel matrix

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

getFlatPanelMatrix <index>panel

Returns the matrix of the indexed flat panel.

setFlatPanelMatrix <index>panel matrix

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

Curves and Seams Rollouts

setSeamParamsByIndex <index>seam bend_angle bend_stiffness enabled sewing_stiffness

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

ButtonCreateSeam()

Corresponds to pressing the "Create Seam" button.

selectSplines 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

?

createSeamFromSplines <index>spline1 <index>spline2 orientation

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

makeMultiSegmentFromSplines indices

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

getSeamTolerance()

Returns the seam tolerance value.

setSeamTolerance 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