Share

Conform : Modifier

Exposes the conform modifier functionality to MAXScript.

Conformmodifier(Conform) : modifier {b00,57da4442}

Constructor

ConformModifier ...

Example

-- conform example

resetMaxFile #noprompt
b = box width:100 length:100 height:5
t = teapot pos:[0,0,4]
c = ConformModifier()
addModifier t c
c.appendTarget b
c.method = 1 -- shrink wrap
c.shrinkDirection = 4 -- closest point
c.strength = 50 -- 50%
el = Ellipse length:100 width:80
pc = Path_Constraint()
t.position.controller = pc
pc.path = el
playAnimation ()

Properties

<Conformmodifier>.AdoptNormal     Float    default: 0.0   --  animatable; float

Get/set the percentage of the target normal to adopt.

<Conformmodifier>.ApplyToWholeObject     BooleanClass    default: false   --  boolean

Get/set whether to apply the modifier to all vertices regardless of the stack selection.

<Conformmodifier>.axisDirection     Integer    default: 2   --  integer

When the projection method is "volume", specifies the axis direction, where:

  • 0 = X
  • 1 = Y
  • 2 = Z
<Conformmodifier>.axisSign     Integer    default: 0   --  integer

The axis direction sign, where:

  • 0 = Negative
  • 1 = Positive
  • 2 = Closest
<Conformmodifier>.BetterNormals     BooleanClass    default: true   --  boolean

When true, the conform object uses interpolated normals from the surface for more accurate deformation.

<Conformmodifier>.BlendNormals     BooleanClass    default: false   --  boolean

Specifies whether to blend normals.

<Conformmodifier>.clearSpecifiedNormals     BooleanClass    default: true   --  boolean

When true, clears the existing normals on the surface object.

<Conformmodifier>.ignoreSelectionMisses     BooleanClass    default: false   --  boolean

When true, if a selection misses the target, vertices are moved back to the original position.

<Conformmodifier>.lookAtHelper     UndefinedClass    default: undefined   --  node

Get/set the lookat helper object, used when the Projection Direction is "Helper Origin".

<Conformmodifier>.     BooleanClass    default: false   --  boolean

Get/set whether to move vertices back to their original positions if a selection misses its targets.

<Conformmodifier>.method     Integer    default: 0   --  integer

The conform method to use, where:

  • 0 = Volume
  • 1 = Shrink Wrap
<Conformmodifier>.MoveMissesToClosest     BooleanClass    default: false   --  boolean

When true, moves missed projections to the closest point on the target object.

<Conformmodifier>.normalizeSelection     BooleanClass    default: true   --  boolean

When true, normalizes the selection normals from 0 to 1.

<Conformmodifier>.Offset     Float    default: 0.0   --  animatable; float

The offset to apply. This is the amount to move the object relative to the surface along the projection normal.

<Conformmodifier>.OffsetBlended     BooleanClass    default: true   --  boolean

Specifies whether the offset direction should be the projection direction (true) or the blended normal.

<Conformmodifier>.selectionAmount     Float    default: 25.0   --  animatable; float

Get/set the percentage of the object that will conform with the target surface, when the conform method is "Volume". This is the Influence setting in the UI.

<Conformmodifier>.selectionFalloff     Float    default: 25.0   --  animatable; float

Get/set the percentage of additional soft-selection of the object that will conform with the target surface.

<Conformmodifier>.SelectionOutput     Integer    default: 0   --  integer

Get/set the selection output, where:

  • 0 = Existing
  • 1 = Selection
  • 2 = Missed
  • 3 = Ray Distance
  • 4 = Min/Max Hit Distance
<Conformmodifier>.ShrinkDirection     Integer    default: 3   --  integer

Get/set the projection direction when the Projection Method is Shrink Wrap, where:

  • 0 = Axis
  • 1 = Target Direction
  • 2 = Helper Direction
  • 3 = Vertex Normal
  • 4 = Closest Point
<Conformmodifier>.strength     Float    default: 100.0   --  animatable; float

Get/set the strength of the conform in relation to the original object position, as a percent.

<Conformmodifier>.Targets     ArrayParameter    default: #()   --  paramBlock2 array; SubAnim

Contains an array of objects which are the targets for the conformed object.

Note:

This array is read-only, and cannot be modified directly. To add, remove, and enable/disable target objects, see the Conform interface methods below.

<Conformmodifier>.UseCache     BooleanClass    default: false   --  boolean

Specifies whether to use the cache, which caches the deformation result at the frame it is enabled on.

<Conformmodifier>.VolumeAmount     Float    default: 100.0   --  animatable; float

Get/set the volume of the conform, where 0 will project all vertices to the surface and at 100 the confirmed object retains its full volume.

<Conformmodifier>.VolumeDirection     Integer    default: 0   --  integer

Get/set the volume projections direction, where:

  • 0 = Axis
  • 1 = Surface Direction
  • 2 = Helper Origin

Interface Conform Methods

<integer>version()

Returns the ConformModifier version.

<integer>targetCount()

Returns the number of targets in the targets array.

<boolean>appendTarget <node>target

Adds the specified target to the targets array. Targets are added in an enabled state by default.

<node>getTarget <index>index

Returns the target node in the target array at the specified index, or undefined if there is no target at that index.

<boolean>removeTarget <index>index

Removes the target at the specified index from the targets array, returning true on success or false on failure.

<void>removeAllTargets()

Removes all targets from the targets array.

<boolean>enableTarget <index>index

Enables the target at the specified index, returning true on success or false on failure.

<boolean>disableTarget <index>index

Disables the target at the specified index, returning tru on success or false on failure.

<boolean>isTargetEnabled <index>index

Returns the enabled state of the target at the specified index. Note that this method also returns false if there is no target at the specified index.

Was this information helpful?