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
    • Recent
    • Tags
    • Users
    • Login

    Getting Data from xPresso Nodes

    Scheduled Pinned Locked Moved SDK Help
    13 Posts 0 Posters 1.0k Views
    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 Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 13/01/2012 at 12:29, xxxxxxxx wrote:

      Hi,

      Originally posted by xxxxxxxx

      GeData tData = new GeData();
      node.GetParameter(new DescID(C4dApi.XXX), tData, C4d.DESCFLAGS_GET.DESCFLAGS_GET_0)
      Datatype something = tData.Get"Datatype"();
      

      Here's how to make this works (C++ code) :

      #include "..\modules\gv\expressiontag\res\description\gvdynamic.h"
      #include "gvbase.h"
        
      const String title = node->GetTitle(); // Get node name
        
      GeData data;
      // Get dynamic type
      node->GetParameter(DescID(GV_DYNAMIC_DATATYPE), data, DESCFLAGS_GET_0);
      LONG type = data.GetLong();
      bool res = type == ID_GV_DATA_TYPE_REAL;
        
      // Get comment text
      node->GetParameter(DescID(ID_GVBASE_REMARK), data, DESCFLAGS_GET_0);
      const String remark = data.GetString();
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 13/01/2012 at 12:40, xxxxxxxx wrote:

        Thanks for your fast reply! šŸ™‚ Very very big thanks!

        One additional question, is there a list or table or something to look up this "GV_DYNAMIC_DATATYPE" relations?
        I cannot find anything about his in the documentation šŸ˜• ...
        Perhaps im just blind ? šŸ˜‰

        cheers!

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 13/01/2012 at 13:01, xxxxxxxx wrote:

          Originally posted by xxxxxxxx

          One additional question, is there a list or table or something to look up this "GV_DYNAMIC_DATATYPE" relations?
          I cannot find anything about his in the documentation šŸ˜• ...
          Perhaps im just blind ? šŸ˜‰

          The GV data types are documented in the ID_GV_DATA_TYPEs enum.

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 14/01/2012 at 05:04, xxxxxxxx wrote:

            Thansk Yannick, have a nice weekend!

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

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 20/01/2012 at 07:12, xxxxxxxx wrote:

              Hey,Ā 
              i got another question šŸ™‚

              Is it also possible to go from an xPresso Node back to the object in the c4d scene the xPresso Node is related to?Ā 
              For example something like if i have 3 cubes in my scene i can determine with the xpresso node which cube as a BaseObject im working on with the xPresso Node?

              Cheers

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

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 20/01/2012 at 13:36, xxxxxxxx wrote:

                Originally posted by xxxxxxxx

                Is it also possible to go from an xPresso Node back to the object in the c4d scene the xPresso Node is related to?Ā 
                For example something like if i have 3 cubes in my scene i can determine with the xpresso node which cube as a BaseObject im working on with the xPresso Node?

                Yes, retrieving the node's parameter with DescID(GV_OBJECT_OBJECT_ID) as explained in this post.
                In your case you would just call GetParameter() instead.

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

                  THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                  On 21/01/2012 at 13:28, xxxxxxxx wrote:

                  Hey thanks, šŸ™‚
                  i already checked this post out. will let you know if this works! šŸ™‚

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

                    THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                    On 07/02/2012 at 06:13, xxxxxxxx wrote:

                    Hey Yannick,

                    so you meant its done like this:

                      
                    GeData data;  
                    data.SetBaseList2D(pRefObject); <- (expresso node object?)  
                    pNode->GetParameter(DescID(GV_OBJECT_OBJECT_ID), data, DESCFLAGS_GET_0);  
                    pNode.... ? -> Whats here to retrieve the node?   
                    

                    Sorry for asking again but i think documentation is not very helpful here šŸ˜ž

                    1. There is no method "SetBaseList2D" existing - nowhere. I checked documentation and source code and api code.
                    2. How can i retrieve the node object when i only get an id from the GetParameter method?

                    Cheers,
                    Oukie

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

                      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                      On 07/02/2012 at 08:50, xxxxxxxx wrote:

                      Originally posted by xxxxxxxx

                      1. There is no method "SetBaseList2D" existing - nowhere. I checked documentation and source code and api code.
                      2. How can i retrieve the node object when i only get an id from the GetParameter method?

                      SetBaseList2D() is new in R13, SetBaseLink() was used before. But in your case you don't need this method; you just want to get the parameter data. It's used to set the data before calling SetParameter().

                      GetParameter() returns a state boolean if it succeed or not. The parameter data is assigned to t_data argument.
                      Here's how to retrieve the node object:

                      node->GetParameter(DescID(GV_OBJECT_OBJECT_ID), data, DESCFLAGS_GET_0);
                      BaseLink* link = data.GetBaseLink();
                      if (link)
                      Ā  Ā  BaseList2D* obj = link->GetLink(doc); // Get node object
                      
                      1 Reply Last reply Reply Quote 0
                      • H Offline
                        Helper
                        last edited by

                        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                        On 08/02/2012 at 01:33, xxxxxxxx wrote:

                        Thanks a lot Yannick.
                        This works like a charm šŸ˜„
                        Ah thats why i like the maxon guys šŸ˜‰ You are so quick and competent.

                        Cheers.

                        PS: I think there should be a mailer list that notes you when functions like this changed in the api. 😃

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

                          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                          On 08/02/2012 at 01:42, xxxxxxxx wrote:

                          Originally posted by xxxxxxxx

                          PS: I think there should be a mailer list that notes you when functions like this changed in the api. 😃

                          This is listed for each new release in a "API changes" page in the documentation. šŸ™‚

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

                            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                            On 08/02/2012 at 01:48, xxxxxxxx wrote:

                            Ah oke than my failure šŸ˜‰ ... Will check this more often.

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