ApplyDeformByCage
 
 
 

ApplyDeformByCage

Introduced

v2.0

Description

Applies a deformation by cage. Cage deformations allow you to use a low-resolution geometry to drive the deformation of a high-resolution object. They are similar to arbitrarily shaped lattices.

Each point on the deformed object is weighted to the points or polygons on the cage, similarly to how an envelope's points are weighted to its deformers. However, you cannot paint the weight assignments nor adjust them manually. You can also have multiple cage deformations on the same object, unlike envelopes.

This is the equivalent of using the ApplyOp command with the CageDeform operator.

Scripting Syntax

oReturn = ApplyDeformByCage( [ConnectionSet], [ConstructionMode] );

Return Value

Returns an XSICollection that contains the CageAutoAssignOp and CageDeformOp operators created.

Parameters

Parameter Type Description
ConnectionSet ConnectionSet Specifies the objects connected to an operator.

The first group of the ConnectionSet contains vertex based objects. The second group of the ConnectionSet contains the deformer (cage) objects.

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.

ConstructionMode siConstructionMode The mode indicating the purpose of the deformations.

Default Value: Current construction mode.

Examples

VBScript Example

'This example creates a cage deformer (cube) over a sphere and a torus.
'Then, the cube is deformed by a taper, and the deformation is reflected
'on the sphere and the torus because of the DeformByCage operator.
NewScene
dim obj, obj1, cage
set obj = CreatePrim( "Sphere", "MeshSurface" )
set obj1 = CreatePrim( "Torus", "MeshSurface" )
set cage = CreatePrim( "Cube", "MeshSurface" )
ApplyDeformByCage obj & "," & obj1 & ";" & cage
'If we deform the cage, it will deform obj and obj1:
ApplyOp "Taper", cage, 3, siPersistentOperation