#include "sceneAssemblyStrings.h"
#include "adskRepresentations.h"
#include "assemblyDefinition.h"
#include <maya/MGlobal.h>
#include <maya/MDagModifier.h>
#include <maya/MFnContainerNode.h>
#include <maya/MFnAssembly.h>
#include <maya/MExternalContentInfoTable.h>
#include <maya/MExternalContentLocationTable.h>
#include <cassert>
namespace {
const char CACHE_TYPE[] = "Cache";
const char SCENE_TYPE[] = "Scene";
const char LOCATOR_TYPE[] = "Locator";
{
}
}
return components[components.
length()-1];
}
{
return pathSep(path, '/');
}
}
) const
{
return new CacheRepresentation(assembly, name);
}
MString CacheRepresentation::Factory::creationName(
) const
{
return pathTail(input);
}
MString CacheRepresentation::Factory::creationLabel(
) const
{
return creationName(assembly, input);
}
MString CacheRepresentation::Factory::creationData(
) const
{
return input;
}
) const
{
return new SceneRepresentation(assembly, name);
}
MString SceneRepresentation::Factory::creationName(
) const
{
return pathTail(input);
}
MString SceneRepresentation::Factory::creationLabel(
) const
{
return creationName(assembly, input);
}
MString SceneRepresentation::Factory::creationData(
) const
{
return input;
}
) const
{
return new LocatorRepresentation(assembly, name, data);
}
MString LocatorRepresentation::Factory::creationName(
) const
{
}
MString LocatorRepresentation::Factory::creationLabel(
) const
{
return creationName(assembly, input);
}
MString LocatorRepresentation::Factory::creationData(
) const
{
return input;
}
CacheRepresentation::CacheRepresentation(
) : BaseClass(assembly, name)
{
assert( dynamic_cast< AssemblyDefinition* >( getAssembly() ) != 0 );
}
CacheRepresentation::~CacheRepresentation()
{}
bool CacheRepresentation::activate()
{
AssemblyDefinition* const assembly =
dynamic_cast< AssemblyDefinition* >( getAssembly() );
if ( assembly == 0 ) {
return false;
}
MString(
"gpuCache"), assembly->thisMObject(), &status);
int isLoaded = false;
if(!isLoaded){
}
return false;
}
return false;
}
MPlug fileName = cache.findPlug(
MString(
"cacheFileName"),
true, &status);
return false;
}
fileName.
setValue(assembly->getRepData(getName()));
}
MString CacheRepresentation::type()
{
return CACHE_TYPE;
}
MString CacheRepresentation::getType()
const
{
return type();
}
void CacheRepresentation::getExternalContent(
) const
{
const AssemblyDefinition* const assembly =
dynamic_cast< AssemblyDefinition* >( getAssembly() );
if ( assembly == 0 ) {
return;
}
}
void CacheRepresentation::setExternalContent(
)
{
AssemblyDefinition* const assembly =
dynamic_cast< AssemblyDefinition* >( getAssembly() );
if ( assembly == 0 ) {
return;
}
assembly->setRepData( getName(), path );
}
SceneRepresentation::SceneRepresentation(
) : BaseClass(assembly, name)
{
assert( dynamic_cast< AssemblyDefinition* >( getAssembly() ) != 0 );
}
SceneRepresentation::~SceneRepresentation()
{}
bool SceneRepresentation::activate()
{
AssemblyDefinition* const assembly =
dynamic_cast< AssemblyDefinition* >( getAssembly() );
if ( assembly == 0 ) {
return false;
}
assembly->getRepData(getName()) ,
NULL , true , NULL ,
fileIgnoreVersion);
}
MString SceneRepresentation::type()
{
return SCENE_TYPE;
}
MString SceneRepresentation::getType()
const
{
return type();
}
bool SceneRepresentation::canApplyEdits() const
{
return true;
}
void SceneRepresentation::getExternalContent(
) const
{
const AssemblyDefinition* const assembly =
dynamic_cast< AssemblyDefinition* >( getAssembly() );
if ( assembly == 0 ) {
return;
}
}
void SceneRepresentation::setExternalContent(
)
{
AssemblyDefinition* const assembly =
dynamic_cast< AssemblyDefinition* >( getAssembly() );
if ( assembly == 0 ) {
return;
}
assembly->setRepData( getName(), path );
}
LocatorRepresentation::LocatorRepresentation(
) : BaseClass(assembly, name), fAnnotation(data)
{}
LocatorRepresentation::~LocatorRepresentation()
{}
bool LocatorRepresentation::activate()
{
return false;
}
return false;
}
if (fAnnotation.numChars() > 0) {
return false;
}
MString annotationName =
"annotation";
MString transformName = annotationName +
"#";
return false;
}
MString(
"annotationShape"), transformObj, &status);
return false;
}
return false;
}
MPlug text = annotation.findPlug(
MString(
"text"),
true, &status);
return false;
}
annotation.findPlug(
MString(
"displayArrow"),
true, &status);
return false;
}
}
}
MString LocatorRepresentation::type()
{
return LOCATOR_TYPE;
}
MString LocatorRepresentation::getType()
const
{
return type();
}