private void DisconnectInputAssetActor(HEU_SessionBase session) { if (!IsInputAssetConnected()) { return; } if (session != null) { //Debug.LogWarningFormat("Disconnecting Node Input for _nodeID={0} with type={1}", _nodeID, _inputNodeType); if (_inputNodeType == InputNodeType.PARAMETER) { HEU_ParameterData paramData = _parentAsset.Parameters.GetParameter(_paramName); if (paramData == null) { Debug.LogErrorFormat("Unable to find parameter with name {0}!", _paramName); } else if (!session.SetParamStringValue(_nodeID, "", paramData.ParmID, 0)) { Debug.LogErrorFormat("Unable to clear object path parameter for input node!"); } } else if (_nodeID != HEU_Defines.HEU_INVALID_NODE_ID) { session.DisconnectNodeInput(_nodeID, _inputIndex, false); } } ClearConnectedInputAsset(); // Must clear this and not delete as this points to existing asset node. // If _inputObjectType changes to MESH, node with this ID will get deleted. _connectedNodeID = HEU_Defines.HEU_INVALID_NODE_ID; }
private void DisconnectInputAssetActor(HEU_SessionBase session) { if (!_inputAssetConnected) { return; } if (_inputNodeType == InputNodeType.PARAMETER) { HEU_ParameterData paramData = _parentAsset.Parameters.GetParameter(_paramName); if(paramData == null) { Debug.LogErrorFormat("Unable to find parameter with name {0}!", _paramName); } else if (!session.SetParamStringValue(_nodeID, "", paramData.ParmID, 0)) { Debug.LogErrorFormat("Unable to clear object path parameter for input node!"); } } else if(session != null && _nodeID != HEU_Defines.HEU_INVALID_NODE_ID) { session.DisconnectNodeInput(_nodeID, _inputIndex, false); } HEU_HoudiniAssetRoot inputAssetRoot = _inputAsset != null ? _inputAsset.GetComponent<HEU_HoudiniAssetRoot>() : null; if (inputAssetRoot != null) { _parentAsset.DisconnectFromUpstream(inputAssetRoot._houdiniAsset); } // Must clear this and not delete as this points to existing asset node. // If _inputObjectType changes to MESH, node with this ID will get deleted. _connectedNodeID = HEU_Defines.HEU_INVALID_NODE_ID; _inputAssetConnected = false; }
private void DisconnectConnectedMergeNode(HEU_SessionBase session) { if (session != null) { //Debug.LogWarningFormat("Disconnecting Node Input for _nodeID={0} with type={1}", _nodeID, _inputNodeType); if (_inputNodeType == InputNodeType.PARAMETER) { HEU_ParameterData paramData = _parentAsset.Parameters.GetParameter(_paramName); if (paramData == null) { Debug.LogErrorFormat("Unable to find parameter with name {0}!", _paramName); } else if (!session.SetParamStringValue(_nodeID, "", paramData.ParmID, 0)) { Debug.LogErrorFormat("Unable to clear object path parameter for input node!"); } } else if (_nodeID != HEU_Defines.HEU_INVALID_NODE_ID) { session.DisconnectNodeInput(_nodeID, _inputIndex, false); } } }