Copy link to clipboard
Hi, I'm trying to get the text from a layer, my code is currently looking like that :
AEGP_StreamType streamType = AEGP_StreamType_TEXT_DOCUMENT;
result |= suites.StreamSuite5()->AEGP_GetLayerStreamValue(textLayer, AEGP_LayerStream_SOURCE_TEXT, AEGP_LTimeMode_CompTime, &AETime, false, &streamValue, &streamType);
result |= suites.LayerSuite8()->AEGP_GetLayerObjectType(textLayer, &layerType);
if (layerType != AEGP_ObjectType_TEXT)
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 ?
I was confused by the documentation too. I'm not sure if it's incorrect, but it seems instead of AEGP_GetLayerStreamValue you should use AEGP_GetNewStreamValue (as per the Text_Twiddler example), this worked for me.