The proxy shape node needs to store a mapping of all the schema nodes it has brought into the Maya scene. This class holds this mapping.
More...
#include <VariantDB.h>
|
struct | value_compare |
| comparison utility (for sorting array of pointers to node references based on their path) More...
|
|
|
| SchemaNodeRefDB (nodes::ProxyShape *const proxy) |
| constructor More...
|
|
| ~SchemaNodeRefDB () |
| dtor
|
|
void | lock () |
| When adding new schema node entries into this DB, rather than forcing a sort after each entry is added, it makes more sense to add all the node refs we need to, and then sort at the end. To this end, you should call lock on the DB prior to adding any entries, and unlock when you have finished adding refs.
|
|
bool | hasEntry (const SdfPath &path, const TfToken &type) |
| This method is used to determine whether this DB has an entry for the specified prim path and the given type. This is used within a variant switch to determine if a node can be updated, or whether it needs to be imported. More...
|
|
void | addEntry (const SdfPath &primPath, const MObject &primObj) |
| create a mapping between the prim path, and the MObject that was created by a translator plugin when importing it. More...
|
|
void | unlock () |
| call this method after adding some entries into the DB
|
|
void | preRemoveEntry (const SdfPath &primPath, SdfPathVector &itemsToRemove) |
| This is called during a variant switch to determine whether the variant switch will allow Maya nodes to be updated, or whether they need to be deleted. More...
|
|
void | removeEntries (const SdfPathVector &itemsToRemove) |
| call this to remove a prim from the DB (you do not need to lock/unlock here). More...
|
|
void | outputPrims (std::ostream &os) |
| debugging util - prints a list of the schema nodes that currently exist within maya More...
|
|
fileio::translators::TranslatorContextPtr | context () |
| access the current translator context for the schema prims More...
|
|
fileio::translators::TranslatorManufacture & | translatorManufacture () |
| access the current translator factory for the schema prims More...
|
|
nodes::ProxyShape * | proxy () const |
| returns the proxy shape node associated with the schema prims in this DB More...
|
|
The proxy shape node needs to store a mapping of all the schema nodes it has brought into the Maya scene. This class holds this mapping.
AL::usdmaya::nodes::SchemaNodeRefDB::SchemaNodeRefDB |
( |
nodes::ProxyShape *const |
proxy | ) |
|
constructor
- Parameters
-
proxy | the owning proxy shape of this object |
void AL::usdmaya::nodes::SchemaNodeRefDB::addEntry |
( |
const SdfPath & |
primPath, |
|
|
const MObject & |
primObj |
|
) |
| |
create a mapping between the prim path, and the MObject that was created by a translator plugin when importing it.
- Parameters
-
primPath | the prim path that was being translated by a custom translator, and resulted in a Maya node being created. |
primObj | the maya node that was created by a custom translator plug-in. |
fileio::translators::TranslatorContextPtr AL::usdmaya::nodes::SchemaNodeRefDB::context |
( |
| ) |
|
access the current translator context for the schema prims
- Returns
- the current translator context associated with this DB
bool AL::usdmaya::nodes::SchemaNodeRefDB::hasEntry |
( |
const SdfPath & |
path, |
|
|
const TfToken & |
type |
|
) |
| |
|
inline |
This method is used to determine whether this DB has an entry for the specified prim path and the given type. This is used within a variant switch to determine if a node can be updated, or whether it needs to be imported.
- Parameters
-
path | the path to the prim to query |
type | the type of prim |
- Returns
- true if an entry is found that matches, false otherwise
void AL::usdmaya::nodes::SchemaNodeRefDB::outputPrims |
( |
std::ostream & |
os | ) |
|
debugging util - prints a list of the schema nodes that currently exist within maya
- Parameters
-
os | the output stream to write to |
void AL::usdmaya::nodes::SchemaNodeRefDB::preRemoveEntry |
( |
const SdfPath & |
primPath, |
|
|
SdfPathVector & |
itemsToRemove |
|
) |
| |
This is called during a variant switch to determine whether the variant switch will allow Maya nodes to be updated, or whether they need to be deleted.
- Parameters
-
primPath | the path to the prim that triggered the variant switch |
itemsToRemove | the returned list of items that need to be removed |
returns the proxy shape node associated with the schema prims in this DB
- Returns
- the proxy shape associated with this DB
void AL::usdmaya::nodes::SchemaNodeRefDB::removeEntries |
( |
const SdfPathVector & |
itemsToRemove | ) |
|
call this to remove a prim from the DB (you do not need to lock/unlock here).
- Parameters
-
itemsToRemove | the prims that need to be removed from the DB. tearDown will be called on each prim |
access the current translator factory for the schema prims
- Returns
- the current translator manufacture associated with this DB
The documentation for this class was generated from the following file: