AL_USDMaya  0.16.6
USD to Maya Bridge
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
AL::usdmaya::nodes::SchemaNodeRefDB Class Reference

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>

Classes

struct  value_compare
 comparison utility (for sorting array of pointers to node references based on their path) More...
 

Public Member Functions

 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::TranslatorManufacturetranslatorManufacture ()
 access the current translator factory for the schema prims More...
 
nodes::ProxyShapeproxy () const
 returns the proxy shape node associated with the schema prims in this DB More...
 

Detailed Description

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.

Constructor & Destructor Documentation

AL::usdmaya::nodes::SchemaNodeRefDB::SchemaNodeRefDB ( nodes::ProxyShape *const  proxy)

constructor

Parameters
proxythe owning proxy shape of this object

Member Function Documentation

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
primPaththe prim path that was being translated by a custom translator, and resulted in a Maya node being created.
primObjthe 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
paththe path to the prim to query
typethe 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
osthe 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
primPaththe path to the prim that triggered the variant switch
itemsToRemovethe returned list of items that need to be removed
nodes::ProxyShape* AL::usdmaya::nodes::SchemaNodeRefDB::proxy ( ) const
inline

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
itemsToRemovethe prims that need to be removed from the DB. tearDown will be called on each prim
fileio::translators::TranslatorManufacture& AL::usdmaya::nodes::SchemaNodeRefDB::translatorManufacture ( )
inline

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: