Go to: Synopsis. Return value. Keywords. Flags. MEL examples.

Synopsis

binMembership [-addToBin string] [-exists string] [-inheritBinsFromNodes name] [-isValidBinName string] [-listBins] [-makeExclusive string] [-notifyChanged] [-removeFromBin string]

binMembership is undoable, queryable, and NOT editable.

Command to assign nodes to bins.

Return value

boolean

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

Keywords

binMembership

Flags

addToBin, exists, inheritBinsFromNodes, isValidBinName, listBins, makeExclusive, notifyChanged, removeFromBin
Long name (short name) Argument types Properties
-addToBin(-add) string create
Add the nodes in a node list to a bin.
-removeFromBin(-rm) string create
Remove the nodes in a node list from a bin.
-exists(-ex) string create
Query if a node exists in a bin. The exists flag can take only one node.
-listBins(-lb) createquery
Query and return a list of bins a list of nodes belong to. If a bin contains any of the nodes in the selection list, then it should be included in the returned bin list.
-makeExclusive(-mke) string create
Make the specified nodes belong exclusively in the specified bin.
-inheritBinsFromNodes(-ibn) name create
Let the node in the flag's argument inherit bins from nodes in the specified node list. The node list is specified as the object of the command.
-notifyChanged(-nfc) create
This flag is used to notify that binMembership has been changed.
-isValidBinName(-ivn) string create
Query if the specified bin name is valid. If so, return true. Otherwise, return false.

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 be used more than once in a command.

MEL examples

// Add a given node to a bin.
//
binMembership -addToBin "wood" lambert1;
// Add a selection of nodes to a given bin.
//
string $newLambertNode = `createNode lambert`;
string $list[] = {"lambert1", $newLambertNode};
binMembership -addToBin "grass" $list;
// Check if a node exists in a bin.
//
binMembership -exists "wood" lambert1;
// Query and return all the nodes which belong to the bin.
//
string $newLambertNode = `createNode lambert`;
string $nodeList[] = {"lambert1", $newLambertNode};
binMembership -q -listBins $nodeList;
// Make the nodes belong exclusively in bin "wood".
//
string $newLambertNode = `createNode lambert`;
string $nodeList[] = {"lambert1", $newLambertNode};
binMembership -makeExclusive "wood" $nodeList;
// Let the dest node inherit bins from nodes in the src node list.
// The dest node is specified by the "inheritBinsFromNodes" flag's
// argument.
//
binMembership -addToBin "wood" lambert1;
string $node = `createNode lambert`;
binMembership -addToBin "grass" $node;
string $srcNodeList[] = {"lambert1", $node};
string $destNode = `createNode blinn`;
binMembership -inheritBinsFromNodes $destNode $srcNodeList;
// Notify that binMembership has been changed.
//
binMembership -notifyChanged;
// Check if a bin name is valid or not.  If valid, return true.
// Otherwise, return false.
//
binMembership -isValidBinName "wood";