bool AlembicWriteJob::ObjectExists(const MObject &in_Ref)
{
  ESS_PROFILE_SCOPE("AlembicWriteJob::ObjectExists");

  std::string fullName(getFullNameFromRef(in_Ref).asChar());
  return mapObjects.find(fullName) != mapObjects.end();
}
Exemple #2
0
std::string getIdentifierFromRef(const MObject & in_Ref)
{
   std::string result;
   MString fullName = getFullNameFromRef(in_Ref);
   MStringArray parts;
   fullName.split('|',parts);
   for(unsigned int i=0;i<parts.length();i++)
   {
      result.append("/");
      result.append(parts[i].asChar());
   }
   return result;
}
bool AlembicWriteJob::AddObject(AlembicObjectPtr in_Obj)
{
  ESS_PROFILE_SCOPE("AlembicWriteJob::AddObject");
  if (!in_Obj) {
    return false;
  }
  const MObject &in_Ref = in_Obj->GetRef();
  if (in_Ref.isNull()) {
    return false;
  }

  const std::string fullName(getFullNameFromRef(in_Ref).asChar());
  mapObjects.insert(
      pairStrAbcObj(fullName, in_Obj));  // add it in the multi map!
  return true;
}