Tomáš Pastýřík

tpastyrik2k

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Null string. Should never see this! When getting detail attr Nov. 11, 2020, 11:08 a.m.

Hi,

I am enumerating all the detail attribs names like this:
UE_ASSERT(0xad0cf41, E_HOUDINI_ATTROWNER_INVALID < attributeOwner && attributeOwner < E_HOUDINI_ATTROWNER_MAX);
int attributeCnt = m_PartInfo->attributeCounts[attributeOwner];
			
std::vector<T_HoudiniStringHandle> stringHandles;
stringHandles.resize(attributeCnt);
HAPI_Result res = HAPI_GetAttributeNames(m_Session->GetPtr(), m_GeoId, m_PartInfo->id, HAPI_ATTROWNER_DETAIL, &stringHandles[0], attributeCnt);

UE_ASSERT(0xd7a0f3ff, res == HAPI_RESULT_SUCCESS);

uestd::vector<C_String> attributeNames;
attributeNames.reserve(attributeCnt);

for (auto handle : stringHandles)
{
	int buffer_length = 0;
	HAPI_Result res = HAPI_GetStringBufLength(m_Session, handle, &buffer_length);
	UE_ASSERT(0xe9c3b2e7, res == HAPI_RESULT_SUCCESS);

	uestd::string str;
	str.resize(buffer_length);

	res = HAPI_GetString(m_Session, handle, &str[0], buffer_length);
	UE_ASSERT(0xde863b29, res == HAPI_RESULT_SUCCESS);

	attributeNames.push_back(str.c_str());
}

And I am getting only “Null string. Should never see this!” in all the values, whats wrong? This approach works for anything but detail attribs in my usecase. Under which circumstances can this happen?

Number of detail attribs is ok, the values nope.

Please help!
Thanks
Tom

HOUDINI_PACKAGE_DIR Ignored when using HAPI July 3, 2020, 6:17 a.m.

Thanks Seelan!

Your advises has led to a successful load of the package along with all the variables needed!

Cheers!
Tom

HOUDINI_PACKAGE_DIR Ignored when using HAPI July 2, 2020, 7:42 a.m.

Here is some more details:

I am setting up the variable as:

HOUDINI_PACKAGE_DIR = D:\mypath\packages;&;

I have also tried using hapi:
HAPI_SetServerEnvString(m_Session, “HOUDINI_PACKAGE_DIR”, “D:\mypath\packages;&;”);

When cooking I can print the HOUDINI_PACKAGE_DIR variable, its there. But ignored.

If I copy the package file to C:\Users\user\Documents\houdini18.0\packages, it all starts working, however does not meet my requirement of loading the packages from some other location.