## RemoveFlexEnvDeformer

### Introduced

v1.0

### Description

Removes deformers from an envelope. Every point in an envelope is assigned to one or more deformers. For each point, weights control the relative influence of its deformers.
Deformers are the objects that control the shape of the envelope. You pick the deformers when you first create an envelope deformation, but you can still add and remove deformers later if necessary.
Although it is common to use skeletons as deformers, you can actually use any object. The geometry of a deformer does not matter because the points of the envelope are assigned to its center. (Bones are the exception--points are deformed by the whole length of a bone.)
Whether you use a cube, a sphere, or a null, all transformations of the surrounding envelope are relative in size, orientation, and position to the deformer's center, not its shape. Nulls and implicit objects are good choices because they do not render.

### Scripting Syntax

    RemoveFlexEnvDeformer( [ConnectionSet], [Interactive] );

### Parameters

Parameter | Type | Description
--- | --- | ---
ConnectionSet | ConnectionSet | Specifies the envelope and the deformer objects to remove. See OpPreset for details on the connection set required for this operator. Default Value: Currently selected objects are used as the main group. Warning: An error occurs if the connection set is invalid. Please verify the connection set required for this operator to avoid breaking your scripts.
Interactive | Boolean | True to prompt user to pick objects. Default Value: False

### Examples

#### VBScript Example

    'This example builds an envelope made of 2 skeleton objects on a sphere
    'and a cylinder. Then, it removes individual deformers from the cylinder,
    'and all envelope components from the shere.
    '
    'The deformers removed from the cylinder are outputted in the log.
    NewScene
    Set Sphere = CreatePrim("Sphere", "MeshSurface")
    Set Cylinder = CreatePrim("Cylinder", "MeshSurface")
    SetValue Cylinder & ".polymsh.geom.subdivu", 16
    SetValue Cylinder & ".polymsh.geom.subdivv", 16
    SetValue Cylinder & ".cylinder.height", 7.325
    Create2DSkeleton 0.1, 0.7, 0, 0, 3.6, 0, 0, 0, 0, 4
    Create2DSkeleton 0.0, -0.3, 0, -0.2, -3.6, 0, 0, 0, 0, 4
    ApplyFlexEnv Sphere & "," & Cylinder & ";bone1,bone", False
    Translate "eff", 2.5, -2.0, 0, siRelative, siView, siObj, siXYZ
    Translate "eff1", 3.7, 1.8, 0, siRelative, siView, siObj, siXYZ
    SelectDeformersFromEnvelope Cylinder
    Set Bones = SIFilter(, "Chain_Element")
    'Remove 1 by 1 all deformers of the cylinder.
    'However, the envelope and the envelope weight property remain.
    For i = 0 to Bones.Count - 1
    logmessage "Removing " & Bones(i) & " from the deformers of " & Cylinder
            RemoveFlexEnvDeformer Cylinder & ";" & Bones(i)
    next
    'Call RemoveFlexEnv: removes deformers of the sphere.
    'The envelope and the envelope weight property are removed too.
    RemoveFlexEnv Sphere
    'This example outputs the following:
    '
    'INFO : "Removing bone1 from the deformers of cylinder"
    'INFO : "Removing bone from the deformers of cylinder"
    'INFO : "Removing eff1 from the deformers of cylinder"
    'INFO : "Removing eff from the deformers of cylinder"

### See Also

ApplyFlexEnv