Create a new job and copy/paste the code below. If you receive warning messages in your infolog you can safely ignore them. Our goal is to acquire the resources, not bother with warnings.
static void ExtractResources(Args _args)
{
ResourceNode resourceNode;
FilePath filePath;
#AOT
Treenode treeNode;
Treenode node;
str resourceName;
int i, nodeCount;
treeNode = treenode::findNode(#ResourcesPath);
nodeCount = treeNode.AOTchildNodeCount();
node = treeNode.AOTfirstChild();
for (i = 1; i <= nodeCount; ++i)
{
resourceName = node.AOTgetProperty(‘Name’);
resourceNode = SysResource::getResourceNode(resourceName);
if(resourceNode)
{
filePath = SysResource::saveToTempFile(resourceNode);
}
node = node.AOTnextSibling();
}
info(‘finished extracting the resources.’);
}
{
ResourceNode resourceNode;
FilePath filePath;
#AOT
Treenode treeNode;
Treenode node;
str resourceName;
int i, nodeCount;
treeNode = treenode::findNode(#ResourcesPath);
nodeCount = treeNode.AOTchildNodeCount();
node = treeNode.AOTfirstChild();
for (i = 1; i <= nodeCount; ++i)
{
resourceName = node.AOTgetProperty(‘Name’);
resourceNode = SysResource::getResourceNode(resourceName);
if(resourceNode)
{
filePath = SysResource::saveToTempFile(resourceNode);
}
node = node.AOTnextSibling();
}
info(‘finished extracting the resources.’);
}
Comments
Post a Comment