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

    Read User Data

    Scheduled Pinned Locked Moved SDK Help
    7 Posts 0 Posters 505 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 27/05/2010 at 04:47, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   11.5 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hello,

      I try to read the user data from base objects with the BrowseGetNext(..) function.
      I get back the DescID and a basecontainer with the data.
      But now i don't know how i can access to this data. Which IDs should i using?
      I get only the name of the "User Data" with following function.

      ...
      while ( pUserData->BrowseGetNext(handle, &id, &data) )
      {
        uid = id[1].id;
        uType = id[1].dtype;
        GeData att_name;

      att_name = data->GetData(1);
      }

      But i need also the value of it and some furter informations like min and max values or so.
      Has anyone an idea?

      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 28/05/2010 at 01:44, xxxxxxxx wrote:

        ok, now i get the additional attibutes like min and max value with the BrowseContainer class.
        But i don't get the value of the user data. Only the information, that a DA_CUSTOMDATATYPE is delivered.

        BrowseContainer brw(data);
                      LONG lid = 0;
                      GeData *att = NULL;

        while (brw.GetNext(&lid, &att)) {...

        How can i read the data value ???

        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 28/05/2010 at 02:12, xxxxxxxx wrote:

          What kind of user data type do you want to access?

          cheers,
          Matthias

          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 28/05/2010 at 02:17, xxxxxxxx wrote:

            hi,

            every type. I add the User data in the attribute manager and choosen one type from the list. (Boolean, Integer, Real...). And with a plugin i like to export this data into an external file.

            regards
            Markus

            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 28/05/2010 at 02:18, xxxxxxxx wrote:

              Maybe you can show me an example for a LONG value ?

              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 28/05/2010 at 03:30, xxxxxxxx wrote:

                Originally posted by xxxxxxxx

                every type...

                Ah, ok. That's actually quite simple.

                Here is an example how to determine the data type and value of the user data entries:

                  
                Bool MenuTest::Execute(BaseDocument *doc)  
                {  
                  BaseObject *op = doc->GetActiveObject();  
                  if (!op) return FALSE;  
                  
                  DynamicDescription *dd = op->GetDynamicDescription();  
                  if (!dd) return FALSE;  
                  
                  void *dhandle = dd->BrowseInit();  
                  
                  DescID id;  
                  const BaseContainer *bc = NULL;  
                  
                  while (dd->BrowseGetNext(dhandle, &id, &bc))  
                  {  
                      GeData data;  
                  
                      if (op->GetParameter(id, data, 0))  
                      {  
                          //data contains the user data data; the data type of the user data  
                          switch (data.GetType())  
                          {  
                              case DA_REAL:  
                                  GePrint("Real: "+RealToString(data.GetReal()));  
                                  break;  
                              case DA_LONG:  
                                  GePrint("LONG: "+LongToString(data.GetLong()));  
                                  break;  
                          }  
                      }  
                  }  
                  
                  dd->BrowseFree(dhandle);  
                  
                  return TRUE;  
                }  
                

                cheers,
                Matthias

                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 28/05/2010 at 04:07, xxxxxxxx wrote:

                  oh i see,

                  thanks a lot... it works

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