Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Condition Node Bugs

    SDK Help
    0
    4
    286
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      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!

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 24/08/2015 at 06:49, xxxxxxxx wrote:

        Hi,

        Did really nobody have this problem?

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            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 😄

            1 Reply Last reply Reply Quote 0
            • First post
              Last post