On 21/08/2015 at 01:39, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R16
Platform: Mac OSX ;
Language(s) : C++ ;
---------
Hi,
I'm creating an XPresso file with several Condition Nodes in it.
I previously programmed Condition Nodes without a problem, but also without setting the inport values (by connecting them with other ports).
However, if I try to set the values of the ports, my Condition Node doesn't work anymore.
The Output stays at the same value, no matter if it's true or false.
Here is the code for one of my Condition Nodes:
// Create the First Condition Node
GvNode* firstConditionNode = footGoalNodeMaster->CreateNode(footGoalNodeMaster->GetRoot(), ID_OPERATOR_CONDITION, nullptr, 340, 160);
if (!firstConditionNode) return false;
firstConditionNode->SetName("First_Condition_Node");
firstConditionNode->SetParameter(GV_DYNAMIC_DATATYPE, ID_GV_DATA_TYPE_REAL, DESCFLAGS_SET_0);
GvPort* firstConditionSwitchInPort = firstConditionNode->GetInPort(0);
if (!firstConditionSwitchInPort) return false;
GvPort* firstConditionOutPort = firstConditionNode->GetOutPort(0);
if (!firstConditionOutPort) return false;
const DescID firstConditionFirstValueID = DescID(DescLevel(GV_CONDITION_INPUT, DTYPE_SUBCONTAINER, 0), DescLevel(1001, DTYPE_REAL, 0));
firstConditionNode->SetParameter(firstConditionFirstValueID, GeData(90), DESCFLAGS_SET_0);
const DescID firstConditionSecondValueID = DescID(DescLevel(GV_CONDITION_INPUT, DTYPE_SUBCONTAINER, 0), DescLevel(1002, DTYPE_REAL, 0));
firstConditionNode->SetParameter(firstConditionSecondValueID, GeData(0), DESCFLAGS_SET_0);
Is there something wrong with my code?
Thanks in advance for your help and time!