mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-17 08:57:09 +00:00
Added support for attaching assets from properties to locator bones in the World Editor
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user