Skip to content

Commit

Permalink
Merge pull request #51 from yannci/fixVariationNameClash
Browse files Browse the repository at this point in the history
AtomsCrowdGenerator: Fix clashing agent variation names
  • Loading branch information
andrewkaufman authored Feb 17, 2022
2 parents 422537b + e703145 commit 2c7dba8
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/AtomsGaffer/AtomsCrowdGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1008,20 +1008,27 @@ void AtomsCrowdGenerator::hashBranchChildNames( const ScenePath &parentPath, con
else if( branchPath.size() == 1 )
{
// "/agents"
BranchCreator::hashBranchChildNames( parentPath, branchPath, context, h );
agentChildNamesHash( parentPath, context, h );
}
else if( branchPath.size() == 2 )
{
// "/agents/<agentType>"
BranchCreator::hashBranchChildNames( parentPath, branchPath, context, h );
agentChildNamesHash( parentPath, context, h );
h.append( branchPath.back() );
}
else if( branchPath.size() <= 3 )
else if( branchPath.size() == 3 )
{
// "/agents/<agentType>" or "/agents/<agentType>/<variation>"
// "/agents/<agentType>/<variation>"
BranchCreator::hashBranchChildNames( parentPath, branchPath, context, h );
agentChildNamesHash( parentPath, context, h );
h.append( branchPath[1] );
h.append( branchPath.back() );
}
else
{
// "/agents/<agentName>/<id>/..."
// "/agents/<agentType>/<variation>/<id>/..."
AgentScope scope( context, branchPath );
h = variationsPlug()->childNamesPlug()->hash();
}
Expand Down

0 comments on commit 2c7dba8

Please sign in to comment.