I got confused when requiring a node using ReferenceRole.
As far as I know about the scene file, one NodeReferenceRole seems to appear only once in a node description.
How can we add the 2nd NodeReference into a node using the same ReferenceRole?
And when (at what kind of circumstance) should we call node.GetNumberOfNodeReferences(refRole)?
You can assign multiple nodes to the same reference role. For example, a model node node can have multiple display nodes, each using the “display” role.
Most commonly you can use convenience methods that get/set the first node for a role (such as SetNodeReferenceID, GetNodeReference). In case you may have multiple nodes for a role, you can use GetNumberOfNodeReferences/GetNthNodeReference.../SetNthNodeReference... methods.