Go to: Synopsis. Return value. Flags. Python examples.

Synopsis

proximityWrap( [objects] , [addDrivers=string], [applyUserDefaults=boolean], [canBeAdded=string], [driverIndices=boolean], [dumpInfo=boolean], [freeDriverIndex=boolean], [removeDrivers=string])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

proximityWrap is undoable, queryable, and editable.

This command creates a proximityWrap deformer, which deforms geometry based on the distance from its drivers.

Return value

string[](the proximityWrap node name)

In query mode, return type is based on queried flag.

Flags

addDrivers, applyUserDefaults, canBeAdded, driverIndices, dumpInfo, freeDriverIndex, removeDrivers
Long name (short name) Argument types Properties
addDrivers(ad) string editmultiuse
Add connect new drivers to the proximityWrap node
applyUserDefaults(aud) boolean edit
Flag used in with the addDriver flag. When set, new drivers will set the user default attributes from the option var settings. When the flag is not set, the user default attributes will not be set. Default is on.
canBeAdded(cba) string querymultiuse
Returns true if all listed shapes can be added as drivers. The reason for an item returning false would be that it is already connected as a driver, it is connected as the deformed geometry or it represents in invalid object.
driverIndices(di) boolean query
List connected driver indices
dumpInfo(dui) boolean query
Return a python dictionary containing information relating to the proximityWrap node. Some information is returned in string form in mel but the flag is meant to be used in python.
freeDriverIndex(fdi) boolean query
Returns the first index which has no driver connected
removeDrivers(rd) string editmultiuse
Remove connected drivers

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

# Add drivers to the proximityWrap
cmds.proximityWrap('proximityWrap1', edit=True, addDrivers=['driverShape1', 'driverShape2'])

# Add driver to the proximityWrap and skip setting the initial attributes
cmds.proximityWrap('proximityWrap1', edit=True, applyUserDefaults=True, addDrivers=['driverShape2'])

# Remove drivers
cmds.proximityWrap('proximityWrap1', edit=True, removeDrivers=['driverShape1', 'driverShape2')

# List driver indices (returns [0, 1])
cmds.proximityWrap('proximityWrap1', query=True, driverIndices=True)

# List free driver index (returns 2)
cmds.proximityWrap('proximityWrap1', query=True, freeDriverIndex=True)

# Query can be added
cmds.proximityWrap('proximityWrap1', query=True, canBeAdded=['driverShape1'])

# Dump info
cmds.proximityWrap('proximityWrap1', query=True, dumpInfo= proximityWrap1)