AL_USDMaya  0.29.4
USD to Maya Bridge
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
AL::usdmaya::nodes::SelectionUndoHelper Struct Reference

A helper class to store the state that is modified during a change to the current selection within a proxy shape. The state it maintains includes: More...

#include <ProxyShape.h>

Public Types

typedef TfHashSet< SdfPath,
SdfPath::Hash > 
SdfPathHashSet
 a hash set of SdfPaths
 

Public Member Functions

 SelectionUndoHelper (nodes::ProxyShape *proxy, const SdfPathHashSet &paths, MGlobal::ListAdjustment mode, bool internal=false)
 Construct with the arguments to select / deselect nodes on a proxy shape. More...
 
void doIt ()
 performs the selection changes
 
void undoIt ()
 will undo the selection changes
 

Friends

class ProxyShape
 

Detailed Description

A helper class to store the state that is modified during a change to the current selection within a proxy shape. The state it maintains includes:

  • The USD paths to be selected / deselected
  • The Dag modifiers needed to create/destroy the associated maya nodes
  • The maya selection list prior to the selection
  • The maya selection list after the selection change
  • The internal transformation references before and after the selection change

This class is intended to exist as a member variable on a MEL selection command. Once constructed, the class should be passed to the ProxyShape::doSelect method to construct the internal state changes. At that point, you may call doIt() to perform the changes, undoIt() to revert the changes.

Constructor & Destructor Documentation

AL::usdmaya::nodes::SelectionUndoHelper::SelectionUndoHelper ( nodes::ProxyShape proxy,
const SdfPathHashSet paths,
MGlobal::ListAdjustment  mode,
bool  internal = false 
)

Construct with the arguments to select / deselect nodes on a proxy shape.

Parameters
proxypointer to the maya node on which the selection operation will be performed.
pathsthe USD paths to be selected / toggled / unselected
modethe selection mode (add, remove, xor, etc)
internalif the internal flag is set, then modifications to Maya's selection list will NOT occur.

The documentation for this struct was generated from the following file: