/// <summary> /// Get the composed list of child node IDs. /// </summary> /// <param name="parentNodeID">Parent node ID</param> /// <param name="nodeTypeFilter">Node type by which to filter the children</param> /// <param name="nodeFlagFilter">Node flags by which to filter the children</param> /// <param name="bRecursive">Whether or not to compose the list recursively</param> /// <param name="childNodeIDs">Array to store the child node IDs. /// <returns>True if successfully retrieved the child node list</returns> public static bool GetComposedChildNodeList(HEU_SessionBase session, HAPI_NodeId parentNodeID, HAPI_NodeTypeBits nodeTypeFilter, HAPI_NodeFlagsBits nodeFlagFilter, bool bRecursive, out HAPI_NodeId[] childNodeIDs) { childNodeIDs = null; // First compose the internal list and get the count, then get the actual list. int count = -1; bool bResult = session.ComposeChildNodeList(parentNodeID, nodeTypeFilter, nodeFlagFilter, bRecursive, ref count); if (bResult) { childNodeIDs = new HAPI_NodeId[count]; if (count > 0) { return session.GetComposedChildNodeList(parentNodeID, childNodeIDs, count); } else { return true; } } return false; }
/// <summary> /// Compose a list of child nodes based on given filters. /// </summary> /// <param name="parentNodeID">Parent node ID</param> /// <param name="nodeTypeFilter">Node type by which to filter the children</param> /// <param name="nodeFlagFilter">Node flags by which to filter the children</param> /// <param name="bRecursive">Whether or not to compose the list recursively</param> /// <param name="count">Number of child nodes composed</param> /// <returns>True if successfully composed the child node list</returns> public virtual bool ComposeChildNodeList(HAPI_NodeId parentNodeID, HAPI_NodeTypeBits nodeTypeFilter, HAPI_NodeFlagsBits nodeFlagFilter, bool bRecursive, ref int count) { return false; }