THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/04/2006 at 12:01, xxxxxxxx wrote:
Cinema 4D Version: 9.102
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
Thought it was time to start a new topic on this. Most of this is copied from my previous topic. Setting this one value is critical to a major feature of my plugin - amazing.
The docs state that for GV_OP_SET: (The constant node uses this.). Okay. But since GV_CONST_VALUE is a GvDynamic type, I'm still not certain about how to set it even with OperatorSetData(). Maybe it wants a GvDynamicData in the void* argument?
There is no GvRun returning from GvNodeMaster so use of GvSetPortGeData() seems to be out (for now).
I've tried everything! And I mean everything:
opbc->SetReal() - good for crashing C4D
constNode->SetParameter() - also can be coaxed into crashing C4D
assorted GvSetPortData()-like setups
I've printed the OperatorBaseContainer (which does point to the DA_REAL value, but will not set). I've printed the entire GvDynamicData struct (include GvDataInfo). Nothing of use there. ConvertGeDataToGv() never succeeds when attempting to use that, unless I use the ConstNode OutPort - but the data cannot be set without GvRun. And I cannot get a GvRun. Even tried InitCalculate/Calculate/FreeCalculate on the nodeMaster to see if it came into existence - nope.
Using OperatorIsSetDataAllowed() on the Constant Node returns FALSE. So no GvRun for setting the GvPort (not that this is a definite solution) and no way to set the GvOperatorData even if the code is correct.
On 06/04/2006 at 12:45, xxxxxxxx wrote:
The following methods all seem to work:
GvNode* n3 = m->CreateNode(m->GetRoot(), ID_OPERATOR_CONST, NULL, 100, 100);
n3->SetParameter(DescLevel(GV_DYNAMIC_DATATYPE), ID_GV_DATA_TYPE_VECTOR, 0);
n3->SetParameter(DescLevel(GV_CONST_VALUE), GeData(Vector(1,2,3)), 0);
GvNode* n4 = m->CreateNode(m->GetRoot(), ID_OPERATOR_CONST, NULL, 200, 100);
n4->SetParameter(DescLevel(GV_DYNAMIC_DATATYPE), ID_GV_DATA_TYPE_REAL, 0);
n4->SetParameter(DescLevel(GV_CONST_VALUE), GeData(2.0), 0);
GvNode* n5 = m->CreateNode(m->GetRoot(), ID_OPERATOR_CONST, NULL, 300, 100);
n5->SetParameter(DescLevel(GV_CONST_VALUE), GeData(2.0), 0);
GvNode* n6 = m->CreateNode(m->GetRoot(), ID_OPERATOR_CONST, NULL, 400, 100);
n6->SetParameter(DescLevel(GV_CONST_VALUE), GeData(2), 0);
On 06/04/2006 at 16:03, xxxxxxxx wrote:
Yes, I think you are right, Mikael. It seems that the 'slavedial' type is coming out incorrectly and using another value, which happens to be 0.0. I must have tried the SetParameter() after implementing the type check (which wasn't being done until maybe Sunday). So the type check is incorrect, setting the value to 0.0, and then everything, including SetParameter() was setting the darn thing to 0.0.
Doh! to me on that one.
Back to my insanity!
P.S.: How many characters in "valueOp"? 6 right? That was it. A: 7