We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to test the Asynchronous Attribute API in Houdini Engine 7.0, but I encounter an error immediately upon calling these asynchronous APIs.
Here is a sample of my test code:
all test_code.zip
bool SetHEAttrByAsyncApi(const HAPI_Session* Session, int PointCount, HAPI_NodeId NodeId2, TArray<float> StaticMeshVertices) { TRACE_CPUPROFILER_EVENT_SCOPE(SetHEAttr) // Create point attribute info. HAPI_AttributeInfo AttributeInfoPoint; FHoudiniApi::AttributeInfo_Init(&AttributeInfoPoint); //FMemory::Memzero< HAPI_AttributeInfo >( AttributeInfoPoint ); AttributeInfoPoint.count = PointCount; AttributeInfoPoint.tupleSize = 3; AttributeInfoPoint.exists = true; AttributeInfoPoint.owner = HAPI_ATTROWNER_POINT; AttributeInfoPoint.storage = HAPI_STORAGETYPE_FLOAT; AttributeInfoPoint.originalOwner = HAPI_ATTROWNER_INVALID; HOUDINI_CHECK_ERROR_RETURN(FHoudiniApi::AddAttribute( Session, NodeId2, 0, HAPI_UNREAL_ATTRIB_POSITION, &AttributeInfoPoint), false); int cnt = StaticMeshVertices.Num() / 3; int job1 = 0; int job2 = 0; HOUDINI_CHECK_ERROR_RETURN(FHoudiniApi::SetAttributeFloatDataAsync( FHoudiniEngine::Get().GetSession(), NodeId2, 0, HAPI_UNREAL_ATTRIB_POSITION, &AttributeInfoPoint, StaticMeshVertices.GetData(), 0 , cnt / 2, &job1), false); HOUDINI_CHECK_ERROR_RETURN(FHoudiniApi::SetAttributeFloatDataAsync( FHoudiniEngine::Get().GetSession(), NodeId2, 0, HAPI_UNREAL_ATTRIB_POSITION, &AttributeInfoPoint, StaticMeshVertices.GetData() + (cnt /2) * 3, cnt / 2, cnt - cnt / 2, &job2), false); int ready_cnt = 0; TRACE_CPUPROFILER_EVENT_SCOPE(SetHEAttr_sleep) while (true) { if (ready_cnt == 2) { break; } HAPI_JobStatus JobStatus; FHoudiniApi::GetJobStatus(Session, job1, &JobStatus); if (JobStatus == HAPI_JobStatus::HAPI_JOB_STATUS_IDLE) { ready_cnt++; } FHoudiniApi::GetJobStatus(Session, job2, &JobStatus); if (JobStatus == HAPI_JobStatus::HAPI_JOB_STATUS_IDLE) { ready_cnt++; } FPlatformProcess::Sleep(0.005f); } return true; }
SetAttributeFloatDataAsync returns HAPI_RESULT_FAILURE without any error message or indication.
SetAttributeFloatDataAsync
HAPI_RESULT_FAILURE
Env:
git checkout v2.2.2
Could you please help me investigate this issue?
I have raised another related issue in the Houdini forum: How to use async api in HAPI 7.0 ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am trying to test the Asynchronous Attribute API in Houdini Engine 7.0, but I encounter an error immediately upon calling these asynchronous APIs.
Here is a sample of my test code:
all test_code.zip
SetAttributeFloatDataAsync
returnsHAPI_RESULT_FAILURE
without any error message or indication.Env:
git checkout v2.2.2
Could you please help me investigate this issue?
The text was updated successfully, but these errors were encountered: