Question
TextDocumentSuite1()->AEGP_GetNewText returning null handle
Hi, I'm trying to get the text from a layer, my code is currently looking like that :
AEGP_StreamVal2 streamValue;
AEGP_StreamType streamType = AEGP_StreamType_TEXT_DOCUMENT;
result |= suites.StreamSuite5()->AEGP_GetLayerStreamValue(textLayer, AEGP_LayerStream_SOURCE_TEXT, AEGP_LTimeMode_CompTime, &AETime, false, &streamValue, &streamType);
AEGP_ObjectType layerType;
result |= suites.LayerSuite8()->AEGP_GetLayerObjectType(textLayer, &layerType);
if (layerType != AEGP_ObjectType_TEXT)
return;
AEGP_MemHandle textHandle;
result |= suites.TextDocumentSuite1()->AEGP_GetNewText(m_AEGPID, streamValue.text_documentH, &textHandle);
AEGP_GetNewText return A_Err_PARAMETER and textHandle is null.
According to the documentation, I should get the StreamValue using streamType = AEGP_StreamType_TEXT_DOCUMENT, but It doesn't not provide the AEGP_LayerStream value that I should get.
Any advice on that ?