#include "assemblyReference.h"
#include "assemblyDefinition.h"
#include "adskPrepareRenderGlobals.h"
#include "sceneAssemblyStrings.h"
#include "adskRepresentations.h"
#include "adskRepresentationCmd.h"
#include "adskSceneMetadataCmd.h"
#include <maya/MFnPlugin.h>
#include <maya/MGlobal.h>
#include <vector>
static MStatus registerMStringRes()
{
}
namespace {
template< class T >
{
T::typeName, T::id, T::creator, T::initialize, nodeType, classification
);
if (!status) {
}
return status;
}
template< class T >
{
MString assemblyClassification =
"drawdb/geometry/transform";
MStatus status = registerNode<T>(plugin, nodeType, &assemblyClassification);
return status;
}
template< class T >
{
if (!status) {
}
return status;
}
template< class T >
{
MStatus status = deregisterNode<T>(plugin);
return status;
}
{
errorString.
format(errorString, fmtString);
}
}
{
MFnPlugin plugin( obj, PLUGIN_COMPANY,
"1.0",
"Any");
"sceneAssemblyInitStrings");
if (!status) {
displayError(rRegisterUIStringError, status.
errorString());
return status;
}
if (!(status = registerAssemblyNode<AssemblyDefinition>(
return status;
}
if (!(status = registerAssemblyNode<AssemblyReference>(
return status;
}
if (!(status = registerNode<AdskPrepareRenderGlobals>(
return status;
}
}
if (!(status =
return status;
}
int isLoaded = false;
if (!isLoaded){
}
if (!status) {
displayError(rRegisterAssembliesError, status.
errorString());
}
std::vector<AdskRepresentationFactory*> factories;
factories.push_back(new CacheRepresentation::Factory());
factories.push_back(new SceneRepresentation::Factory());
factories.push_back(new LocatorRepresentation::Factory());
std::vector<AdskRepresentationFactory*>::const_iterator f;
for (f = factories.begin(); f != factories.end(); ++f) {
if (!AssemblyDefinition::registerRepresentationFactory(*f)) {
displayError(rRegisterRepFactoryError, (*f)->getType());
delete (*f);
}
}
status = plugin.
registerCommand(AdskRepresentationCmd::name(), AdskRepresentationCmd::creator, AdskRepresentationCmd::cmdSyntax );
if (!status) {
errorString.
format(errorString, AdskRepresentationCmd::name(), status.
errorString());
return status;
}
if (!status) {
displayError(rRegisterRepresentationsError, status.
errorString());
}
status =
MGlobal::executeCommand(
"filePathEditor -registerType \"assemblyReference\" -typeLabel \"AssemblyReference\" -temporary");
if (!status) {
}
status =
MGlobal::executeCommand(
"filePathEditor -registerType \"assemblyDefinition\" -typeLabel \"AssemblyDefinition\" -temporary");
if (!status) {
}
status = plugin.
registerCommand(AdskSceneMetadataCmd::name(), AdskSceneMetadataCmd::creator, AdskSceneMetadataCmd::cmdSyntax );
if (!status) {
errorString.
format(errorString, AdskRepresentationCmd::name(), status.
errorString());
return status;
}
}
{
return status;
}
return status;
}
std::vector<MString> factoryTypes;
factoryTypes.push_back(CacheRepresentation::type());
factoryTypes.push_back(SceneRepresentation::type());
factoryTypes.push_back(LocatorRepresentation::type());
std::vector<MString>::const_iterator fType;
for (fType = factoryTypes.begin(); fType != factoryTypes.end(); ++fType) {
if (!AssemblyDefinition::deregisterRepresentationFactory(*fType)) {
displayError(rDeregisterRepFactoryError, *fType);
}
}
if (!(status = deregisterNode<AdskPrepareRenderGlobals>(plugin))) {
return status;
}
if (!(status = deregisterAssemblyNode<AssemblyReference>(plugin))) {
return status;
}
if (!(status = deregisterAssemblyNode<AssemblyDefinition>(plugin))) {
return status;
}
if (!status) {
}
if (!status) {
}
}