Animation WIP merge #321
|
@ -33,7 +33,6 @@ namespace SHADE
|
|||
}
|
||||
|
||||
// Do a recursive depth first traversal to populate the rig
|
||||
nodeCount = 0;
|
||||
rootNode = recurseCreateNode(asset, asset.root);
|
||||
}
|
||||
|
||||
|
@ -60,7 +59,7 @@ namespace SHADE
|
|||
|
||||
int SHRig::GetNodeCount() const noexcept
|
||||
{
|
||||
return nodeCount;
|
||||
return static_cast<int>(nodes.size());
|
||||
}
|
||||
|
||||
int SHRig::GetNodeIndex(Handle<Node> node) const noexcept
|
||||
|
@ -80,7 +79,6 @@ namespace SHADE
|
|||
{
|
||||
// Construct the node
|
||||
auto newNode = nodeStore.Create();
|
||||
++nodeCount;
|
||||
|
||||
// Fill the node with data
|
||||
const auto& NODE_DATA = asset.nodeDataCollection.at(sourceNode->idRef);
|
||||
|
@ -91,9 +89,9 @@ namespace SHADE
|
|||
{
|
||||
nodeNames.emplace(newNode, NODE_DATA.name);
|
||||
nodesByName.emplace(NODE_DATA.name, newNode);
|
||||
nodeIndexMap.emplace(newNode, nodes.size());
|
||||
nodes.emplace_back(newNode);
|
||||
}
|
||||
nodeIndexMap.emplace(newNode, sourceNode->idRef);
|
||||
nodes.emplace_back(newNode);
|
||||
|
||||
// Fill child nodes
|
||||
for (const auto& child : sourceNode->children)
|
||||
|
|
|
@ -94,7 +94,6 @@ namespace SHADE
|
|||
std::unordered_map<std::string, Handle<Node>> nodesByName;
|
||||
std::vector<Handle<Node>> nodes;
|
||||
std::unordered_map<Handle<Node>, int> nodeIndexMap;
|
||||
int nodeCount = 0;
|
||||
SHResourceLibrary<Node> nodeStore;
|
||||
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
|
|
Loading…
Reference in New Issue