THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/08/2009 at 19:04, xxxxxxxx wrote:
User Information:
Cinema 4D Version:
Platform:
Language(s) :
---------
Hello All,
I'm writing a custom GvOperatorData plugin and running into a problem where I could not read a FILENAME/STRING input port on my node.
Here is my code snippet:
> \> \> CONTAINER gvmynode \> { \> NAME gvmynode; \> INCLUDE GVbase; \> \> GROUP \> { \> FILENAME GV_MY_NODE_FILE { INPORT; } \> MATRIX GV_MY_NODE_MATRIX { OUTPORT; } \> } \> } \> \> \> Bool MyNode::InitCalculation (GvNode\* bn, GvCalc\* calc, GvRun\* run) \> { \> m_fileValue = bn->AllocCalculationHandler(GV_MY_NODE_FILE, calc, run, 0); \> if (!m_fileValue) \> return FALSE; \> \> return TRUE; \> } \> \> void MyNode::FreeCalculation (GvNode\* bn, GvCalc\* calc) \> { \> bn->FreeCalculationHandler(m_fileValue); \> } \> \> Bool MyNode::Calculate (GvNode\* bn, GvPort\* port, GvRun\* run, GvCalc\* calc) \> { \> if (!port) \> return TRUE; \> \> if (!m_fileValue->Calculate(bn, GV_PORT_INPUT, run, calc)) \> return FALSE; \> \> String file; \> if (!m_fileValue->GetPort()->GetString(&file;, run)) \> { \> return FALSE; \> } \> \> ... \> } \> \>
It seems the GetString call in Calculate always fails regardless the the file input port is connected or not. Am I missing something here? I would appreciate any help very much!
Thanks,
WQiao