Added support for attaching assets from properties to locator bones in the World Editor

This commit is contained in:
parax0
2016-04-30 06:17:02 -06:00
parent 2655f9d3fd
commit cf84f9909a
42 changed files with 575 additions and 255 deletions

View File

@@ -311,6 +311,21 @@ void CTemplateWriter::SaveScriptTemplate(CScriptTemplate *pTemp)
pAssets->LinkEndChild(pAsset);
}
// Attachments
if (!pTemp->mAttachments.empty())
{
XMLElement *pAttachments = ScriptXML.NewElement("attachments");
pEditor->LinkEndChild(pAttachments);
for (auto it = pTemp->mAttachments.begin(); it != pTemp->mAttachments.end(); it++)
{
XMLElement *pAttachment = ScriptXML.NewElement("attachment");
pAttachment->SetAttribute("propertyID", *it->AttachProperty);
pAttachment->SetAttribute("locator", *it->LocatorName);
pAttachments->LinkEndChild(pAttachment);
}
}
// Preview Scale
if (pTemp->mPreviewScale != 1.f)
{