AL_USDMaya  0.16.6
USD to Maya Bridge
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
TranslatorTestPlugin.h
1 #pragma once
2 
3 #include "AL/usdmaya/fileio/translators/TranslatorBase.h"
4 #include "AL/usdmaya/fileio/translators/TranslatorContext.h"
5 #include "AL/usdmaya/fileio/translators/TranslatorTestType.h"
6 
7 #include "maya/MStatus.h"
8 
9 #include "pxr/base/tf/type.h"
10 
11 namespace AL {
12 namespace usdmaya {
13 namespace fileio {
14 namespace translators {
15 
16 //----------------------------------------------------------------------------------------------------------------------
17 #ifndef AL_GENERATING_DOCS
19  : public TranslatorBase
20 {
21 public:
22  typedef TranslatorTestPlugin This;
23  typedef TfRefPtr<This> RefPtr;
24  typedef TfWeakPtr<This> Ptr;
25 
26  virtual ~TranslatorTestPlugin() {}
27 
28  static RefPtr create(TranslatorContextPtr context);
29 
30  MStatus initialize() override;
31  MStatus import(const UsdPrim& prim, MObject& parent) override;
32  MStatus postImport(const UsdPrim& prim) override;
33  MStatus preTearDown(UsdPrim& path) override;
34  MStatus tearDown(const SdfPath& path) override;
35 };
36 #endif
37 
38 //----------------------------------------------------------------------------------------------------------------------
39 } // translators
40 } // fileio
41 } // usdmaya
42 } // AL
43 //----------------------------------------------------------------------------------------------------------------------
The base class interface of all translator plugins. The absolute minimum a translator plugin must imp...
Definition: TranslatorBase.h:53
MStatus tearDown(const SdfPath &path) override
If your plugin creates any nodes within Maya, then this method should be overridden to remove those n...
TfRefPtr< This > RefPtr
the type of a reference this type
Definition: TranslatorBase.h:58
MStatus postImport(const UsdPrim &prim) override
If your node needs to set up any relationships after import (for example, adding the node to a set...
MStatus preTearDown(UsdPrim &path) override
This method will be called prior to the tear down process taking place. This is the last chance you h...
TfWeakPtr< This > Ptr
weak pointer to this type
Definition: TranslatorBase.h:59
virtual TranslatorContextPtr context() const
returns the context currently being used to translate the USD prims. The context can be used to add r...
Definition: TranslatorBase.h:152
Base class for maya translator usd plugins. The TfType of these plugins has to be derived from the ba...
Definition: TranslatorBase.h:135
Definition: TranslatorTestPlugin.h:18
MStatus initialize() override
Override this to do a one time initialization of your translator. Primarily this is to allow you to e...