|
HDK
|
#include <GU_AttributeSwap.h>
Public Types | |
| enum | SwapMethod { METHOD_SWAP, METHOD_COPY, METHOD_MOVE, NUM_METHODS } |
| enum | TypeInfo { TYPEINFO_USE_SOURCE, TYPEINFO_PRESERVE_DEST, NUM_TYPEINFOS } |
Static Public Member Functions | |
| static bool | swapAttribute (GU_Detail *gdp, SwapMethod method, TypeInfo typeinfo, GA_AttributeOwner owner, const UT_StringRef &srcname, const UT_StringRef &dstname) |
Definition at line 21 of file GU_AttributeSwap.h.
Operation to perform. Move will remove the source. Note the point attribute P cannot be moved so it will be instead silently copied. Swap exchanges the pair. If destination is missing, it is copied.
| Enumerator | |
|---|---|
| METHOD_SWAP | |
| METHOD_COPY | |
| METHOD_MOVE | |
| NUM_METHODS | |
Definition at line 28 of file GU_AttributeSwap.h.
What to do about typeinfos. When stashing attributes one often wants to clear the transform type so succeeding deformers don't also change your stashed values, this becomes the preserve-dest. OTOH, when duplicating, you want the copy to have the source typeinfo. This is ignored for swapping.
| Enumerator | |
|---|---|
| TYPEINFO_USE_SOURCE | |
| TYPEINFO_PRESERVE_DEST | |
| NUM_TYPEINFOS | |
Definition at line 41 of file GU_AttributeSwap.h.
|
static |
Does the method to the two named attributes. If swapping a missing attribute, will first create it. source attribute is assumed to exist. Returns false if failed for some reason; note there are special rules about how P can change. You must invoke gdp->refreshCachedAttributes() if there is a risk you changed the P attribute!