/// <summary> /// Checks for and returns specific errors on node. /// </summary> /// <param name="nodeID">Node to check</param> /// <param name="errorsToCheck">Specific errors to check for</param> /// <returns>Errors found on node</returns> public virtual HAPI_ErrorCodeBits CheckForSpecificErrors(HAPI_NodeId nodeID, HAPI_ErrorCodeBits errorsToCheck) { return 0; }
/// <summary> /// Get the attribute string data. /// </summary> /// <param name="nodeID">The node ID</param> /// <param name="partID">The part ID</param> /// <param name="name">Attribute name</param> /// <param name="attributeInfo">Atttribute info</param> /// <param name="dataArray">Array to populate. Must be at least the size of length * HAPI_AttributeInfo::tupleSize</param> /// <param name="start">First index of range. Must be at least 0 and at most HAPI_AttributeInfo::count - 1</param> /// <param name="length">Must be at least 0 and at most HAPI_AttributeInfo::count - start</param> /// <returns>True if successfully queried the atttribute string data</returns> public virtual bool GetAttributeStringData(HAPI_NodeId nodeID, HAPI_PartId partID, string name, ref HAPI_AttributeInfo attributeInfo, [Out] HAPI_StringHandle[] dataArray, int start, int length) { return false; }
/// <summary> /// Gets the group names for given group type. /// </summary> /// <param name="nodeID">The node ID</param> /// <param name="groupType">The group type</param> /// <param name="names">Array to populate. Must at least be of size count</param> /// <param name="count">Should be less than or equal to size of names</param> /// <returns>True if successfully queried the group names</returns> public virtual bool GetGroupNames(HAPI_NodeId nodeID, HAPI_GroupType groupType, ref HAPI_StringHandle[] names, int count) { return false; }
/// <summary> /// Get the geometry info on a SOP node. /// </summary> /// <param name="nodeID">The SOP node ID</param> /// <param name="geoInfo">Geo info to populate</param> /// <returns>True if successfully queried the geo info</returns> public virtual bool GetGeoInfo(HAPI_NodeId nodeID, ref HAPI_GeoInfo geoInfo) { return false; }
/// <summary> /// Get the main geometry info struct. /// </summary> /// <param name="nodeID">The SOP node ID</param> /// <param name="partID">The part ID</param> /// <param name="name">Attribute name</param> /// <param name="owner">Attribute owner</param> /// <param name="attributeInfo">Info to populate</param> /// <returns>True if successfully queried the attribute info</returns> public virtual bool GetAttributeInfo(HAPI_NodeId nodeID, HAPI_PartId partID, string name, HAPI_AttributeOwner owner, ref HAPI_AttributeInfo attributeInfo) { return false; }
/// <summary> /// Set the transform of an OBJ node. /// </summary> /// <param name="nodeID">The object node ID</param> /// <param name="hapiTransform">The transform to set</param> /// <returns>True if successfully set the transform</returns> public virtual bool SetObjectTransform(HAPI_NodeId nodeID, ref HAPI_TransformEuler hapiTransform) { return false; }
/// <summary> /// Fill an array of HAPI_ObjectInfo list. /// </summary> /// <param name="nodeID">The parent node ID</param> /// <param name="objectInfos">Array to fill. Should atleast be size of length</param> /// <param name="start">At least 0 and at most object count returned by ComposeObjectList</param> /// <param name="length">Object count returned by ComposeObjectList. Should be at least 0 and at most object count - start</param> /// <returns>True if successfully queuried the object list</returns> public virtual bool GetComposedObjectList(HAPI_NodeId nodeID, [Out] HAPI_ObjectInfo[] objectInfos, int start, int length) { return false; }
/// <summary> /// Disconnect a node input /// </summary> /// <param name="nodeID">The node whom's input to disconnect</param> /// <param name="inputIndex">The input index should be between 0 and the node's input count</param> /// <param name="bLogError">Whether to log error</param> /// <returns>True if successful</returns> public virtual bool DisconnectNodeInput(HAPI_NodeId nodeID, int inputIndex, bool bLogError) { return false; }
/// <summary> /// Query which node is connected to another node's input. /// </summary> /// <param name="nodeID">The node to query</param> /// <param name="inputIndex">The input index should be between 0 and the node's input count</param> /// <param name="connectedNodeID">The node ID of the connected node to this input. -1 if no connection.</param> /// <param name="bLogError">True if error should be logged</param> /// <returns>True if successfully queried the node.</returns> public virtual bool QueryNodeInput(HAPI_NodeId nodeID, int inputIndex, out HAPI_NodeId connectedNodeID, bool bLogError) { connectedNodeID = HEU_Defines.HEU_INVALID_NODE_ID; return false; }
/// <summary> /// Rename an existing node. /// </summary> /// <param name="nodeID">ID of the node to rename</param> /// <param name="newName">New name</param> /// <returns>True if successful</returns> public virtual bool RenameNode(HAPI_NodeId nodeID, string newName) { return false; }
/// <summary> /// Connect two nodes together /// </summary> /// <param name="nodeID">Node whom's input to connect to</param> /// <param name="inputIndex">The input index should be between 0 and nodeIDToConnect's input count</param> /// <param name="nodeIDToConnect">The ndoe to connect to nodeID's input</param> /// <returns></returns> public virtual bool ConnectNodeInput(HAPI_NodeId nodeID, int inputIndex, HAPI_NodeId nodeIDToConnect) { return false; }
/// <summary> /// Cook the given node. This may trigger cooks on other nodes if connected. /// </summary> /// <param name="nodeID">ID of the node to cook</param> /// <param name="bCookTemplatedGeos">Whether to recursively cook all templated geos or not</param> /// <returns>True if successfully cooked the node</returns> public virtual bool CookNode(HAPI_NodeId nodeID, bool bCookTemplatedGeos) { return false; }
/// <summary> /// Delete specified Houdini Engine node. /// </summary> /// <param name="nodeID">Node to delete</param> public virtual void DeleteNode(HAPI_NodeId nodeID) { }
/// <summary> /// Creates a node inside a node network. /// </summary> /// <param name="parentNodeID">Parent node network's node ID or -1 if at top level</param> /// /// <param name="operatorName">Name of the node operator type</param> /// <param name="nodeLabel">Label for newly created node</param> /// <param name="bCookOnCreation">Whether should cook on creation or not</param> /// <param name="newNodeID">New node's ID</param> /// <returns>True if successfully created a new node</returns> public virtual bool CreateNode(HAPI_StringHandle parentNodeID, string operatorName, string nodeLabel, bool bCookOnCreation, out HAPI_NodeId newNodeID) { newNodeID = -1; return false; }
// OBJECTS ---------------------------------------------------------------------------------------------------- /// <summary> /// Get the object info on an OBJ node. /// </summary> /// <param name="nodeID">The node ID</param> /// <param name="objectInfo">Object info to populate</param> /// <returns>True if successfully queried object info</returns> public virtual bool GetObjectInfo(HAPI_NodeId nodeID, ref HAPI_ObjectInfo objectInfo) { return false; }
/// <summary> /// Get the name of the given node's input. This will return a string handle for the name /// which will persisst until the next call to this function. /// </summary> /// <param name="nodeID">Node's ID</param> /// <param name="inputIndex">Index of the input</param> /// <param name="nodeNameIndex">Input name string handle</param> /// <returns>True if successfully queried the node</returns> public virtual bool GetNodeInputName(HAPI_NodeId nodeID, int inputIndex, out HAPI_StringHandle nodeNameIndex) { nodeNameIndex = 0; return false; }
// <summary> /// Get the transform of an OBJ node. /// </summary> /// <param name="nodeID">The object node ID</param> /// <param name="relativeToNodeID">The object node ID of the object to which the returned transform will be relative to. -1 if want object's local transform</param> /// <param name="rstOrder">The transform order</param> /// <param name="hapiTransform">Transform info to populate</param> /// <returns>True if successfully queried transform info</returns> public virtual bool GetObjectTransform(HAPI_NodeId nodeID, HAPI_NodeId relativeToNodeID, HAPI_RSTOrder rstOrder, ref HAPI_Transform hapiTransform) { return false; }
/// <summary> /// Returns the asset info for the given node /// </summary> /// <param name="nodeID">The node to retrieve the asset info for</param> /// <param name="assetInfo">The asset info structure to populate</param> /// <returns>True if successfully queried the asset info</returns> public virtual bool GetAssetInfo(HAPI_NodeId nodeID, ref HAPI_AssetInfo assetInfo) { return false; }
/// <summary> /// Compose a list of child object nodes given a parent node ID. /// </summary> /// <param name="nodeID">The parent node ID</param> /// <param name="objectCount">The number of object nodes currently under the parent</param> /// <returns>True if successfully composed the list</returns> public virtual bool ComposeObjectList(HAPI_NodeId nodeID, out int objectCount) { objectCount = 0; return false; }
/// <summary> /// Returns the node info for the given node. /// </summary> /// <param name="nodeID">The node to retrieve the node info for</param> /// <param name="nodeInfo">The node info structure to populate</param> /// <param name="bLogError">True to log any error</param> /// <returns>True if successfully queried the node info</returns> public virtual bool GetNodeInfo(HAPI_NodeId nodeID, ref HAPI_NodeInfo nodeInfo, bool bLogError = true) { return false; }
/// <summary> /// Fill in array of HAPI_Transform list. /// </summary> /// <param name="nodeID">The parent node ID</param> /// <param name="rstOrder">Transform order</param> /// <param name="transforms">Array to fill. Should at least be size of length</param> /// <param name="start">At least 0 and at most object count returned by ComposeObjectList</param> /// <param name="length">Object count returned by ComposeObjectList. Should be at least 0 and at most object count - start</param> /// <returns>True if successfully queuried the transform list</returns> public virtual bool GetComposedObjectTransforms(HAPI_NodeId nodeID, HAPI_RSTOrder rstOrder, [Out] HAPI_Transform[] transforms, int start, int length) { return false; }
/// <summary> /// Get the node absolute path or relative path in the Houdini node network. /// </summary> /// <param name="nodeID">The ID of the node to query</param> /// <param name="relativeNodeID">The relative node. Set to -1 to get absolute.</param> /// <param name="path">The returned path string</param> /// <returns>True if successfully queried the node path</returns> public virtual bool GetNodePath(HAPI_NodeId nodeID, HAPI_NodeId relativeNodeID, out string path) { path = null; return false; }
/// <summary> /// Get the part info on a SOP node. /// </summary> /// <param name="nodeID">The SOP node ID</param> /// <param name="partID">The part ID</param> /// <param name="geoInfo">Part info to populate</param> /// <returns>True if successfully queried the part info</returns> public virtual bool GetPartInfo(HAPI_NodeId nodeID, HAPI_PartId partID, ref HAPI_PartInfo partInfo) { return false; }
/// <summary> /// Returns true if this node exists in the Houdini session. /// Allows host application to check if needed to repopulate in Houdini. /// </summary> /// <param name="nodeID">The node ID</param> /// <param name="uniqueNodeID">The unique node ID</param> /// <returns>True if the node exists</returns> public virtual bool IsNodeValid(HAPI_NodeId nodeID, int uniqueNodeID) { return false; }
/// <summary> /// Get the attribute names of all attributes having owner of the given part. /// </summary> /// <param name="nodeID">The SOP node ID</param> /// <param name="partID">The part ID</param> /// <param name="owner">Attributes must have this owner type</param> /// <param name="attributeNames">Result array of name strings. Must be atleast count size.</param> /// <param name="count">Expected number of attributes. Should be from HAPI_PartInfo.attributeCounts[owner].</param> /// <returns>True if successfully retrieved the names</returns> public virtual bool GetAttributeNames(HAPI_NodeId nodeID, HAPI_PartId partID, HAPI_AttributeOwner owner, ref string[] attributeNames, int count) { 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; }
/// <summary> /// Get the attribute int data. /// </summary> /// <param name="nodeID">The node ID</param> /// <param name="partID">The part ID</param> /// <param name="name">Attribut ename</param> /// <param name="attributeInfo">Should be same struct returned by HAPI_GetAttributeInfo</param> /// <param name="data">An int array at least the size of length * HAPI_AttributeInfo::tupleSize</param> /// <param name="start">First index of range. Must be at least 0 and at most HAPI_AttributeInfo::count - 1</param> /// <param name="length">Must be at least 0 and at most HAPI_AttributeInfo::count - start.</param> /// <returns>True if successfully queried the atttribute int data</returns> public virtual bool GetAttributeIntData(HAPI_NodeId nodeID, HAPI_PartId partID, string name, ref HAPI_AttributeInfo attributeInfo, [Out] int[] data, int start, int length) { return false; }
/// <summary> /// Get the composed list of child node IDs after calling ComposeChildNodeList. /// </summary> /// <param name="parentNodeID">Parent node ID</param> /// <param name="childNodeIDs">Array to store the child node IDs. If null, will create array of size count. If non-null, size must at least be count.</param> /// <param name="count">Number of children in the composed list. Must match the count returned by ComposeChildNodeList</param> /// <returns>True if successfully retrieved the child node list</returns> public virtual bool GetComposedChildNodeList(HAPI_NodeId parentNodeID, HAPI_NodeId[] childNodeIDs, int count) { return false; }
public virtual bool GetGroupMembership(HAPI_NodeId nodeID, HAPI_PartId partID, HAPI_GroupType groupType, string groupName, ref bool membershipArrayAllEqual, [Out] int[] membershipArray, int start, int length) { return false; }
public virtual bool GetHandleBindingInfo(HAPI_NodeId nodeID, int handleIndex, [Out] HAPI_HandleBindingInfo[] handleBindingInfos, int start, int length) { return false; }