Condition Node Bugs
-
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! -
On 24/08/2015 at 06:49, xxxxxxxx wrote:
Hi,
Did really nobody have this problem?
-
On 24/08/2015 at 08:38, xxxxxxxx wrote:
Hi Casimir,
you configured a float datatype (ID_GV_DATA_TYPE_REAL) for the Condition Node. But then you set integer value for the inputs. Simply use GeData(90.0) and GeData(0.0) for your inputs and it will work.
-
On 24/08/2015 at 08:45, xxxxxxxx wrote:
Hi Andreas,
Thanks for your answer!
It's one of those moments again, if you know what I mean