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

    Parameters

    Scheduled Pinned Locked Moved SDK Help
    16 Posts 0 Posters 1.2k 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 29/06/2011 at 06:45, xxxxxxxx wrote:

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

      ---------
      Hi,

      In the c4d interface you can drag an attribute (property name) from the objects attribute manager into the commandline to see the description ID.
      How can i do this programmatically and find (also programmatically) :
      -the object in question
      -the variable type
      -the variables value
      -if it is animatable
      etc

      Best,

      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 29/06/2011 at 07:15, xxxxxxxx wrote:

        Most of this is definitely available through the parameter Description information.  Check out the Description class and container retrieval of configuration options (DESC_ANIMATE et al) using GetParameterI().

        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 29/06/2011 at 07:32, xxxxxxxx wrote:

          Maybe but how.
          I have found how to step an object and list all props, but how to catch a dragged interface name and pick up from there. I need a starter for this. The description stuff is complicated.

          Best

          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 29/06/2011 at 10:20, xxxxxxxx wrote:

            If you are dropping these A.M. descriptions into a GeDialog/GeUserArea, then you will need to utilize the "Drag and Drop" interface (as described in the documentation under the quoted search term given).  This information is received via the Message() method.  In the docs you will see DRAGTYPE_DESCID which appears to be what you want to be checking for.

            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 29/06/2011 at 15:44, xxxxxxxx wrote:

              Thanks for that.
              I implemented the drag and drop code and thanks to you and M.Sterner I know now how to get a DescPropertyDragData. And from that the ID. There's an array and an DescID in the dpdd.
              Now how do I get to the object of the attribute manager. It does not have to be the active object, does it?
              I would like to make use of the found ID (creating keys as goal).

              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 29/06/2011 at 16:54, xxxxxxxx wrote:

                I would assume that you simply get the first object in the AtomArray (sort of like the result of SendModelingCommand()) like:

                DescPropertyDragData* dpdd = static_cast<DescPropertyDragData*>(object);  
                C4DAtom*    ca =    dpdd->arr->GetIndex(0L);  
                if (ca)  
                {  
                  LONG    type =    ca->GetType();  
                  GePrint("Type = "+LongToString(type)); // just to see the value during development :)  
                }
                
                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 30/06/2011 at 09:02, xxxxxxxx wrote:

                  Got the datatype also from the dpdd->did[0].
                  Then i have some additional questions.

                  -I found the datatype, for example a vector, but i cannot find which component of this vector. There seems to be no sub?

                  -Where's the min and max for that attribute (property)? (not for the datatype itself).

                  -How can i find out if a long is maybe a cycle? I read something about that on this forum, but it seems to be a bug?

                  -And last but not least, where's the current value of te property itself?

                  Best,

                  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 01/07/2011 at 09:13, xxxxxxxx wrote:

                    All of this information should be in the description container.  DESC_MIN, DESC_MAX, DESC_CYCLE (list of options as strings).  To see if it is a cycle, you migh check the customgui from DESC_CUSTOMGUI and see if it is a CUSTOMGUI_CYCLE.  The value is stored directly in the container.

                    Get the BaseContainer to get the value using the LONG id (using dpdd->did[0].id to resolve the DescID to a DescLevel and get at the LONG id - yeah, gotta luv C4D).  To do this you will either need to get the BaseContainer of the C4DAtom up-casted (bc = ((GeListNode* )ca)->GetDataInstance()) or get the Description and then use GetParameterI() to get the container (desc = ca->GetDescription(); bc = desc->GetParameterI(dpdd->did[0], array); )

                    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 01/07/2011 at 15:29, xxxxxxxx wrote:

                      Hey thanks 🙂 Now all OK except the value itself and some pain with the cycle.

                      I do:

                      BaseContainer *d = ((BaseList2D* )ca)->GetDataInstance();
                      GePrint(RealToString(d->GetReal(dpdd->did[0].id,-1)));

                      But i always get -1.

                      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 01/07/2011 at 16:03, xxxxxxxx wrote:

                        Have you checked the dpdd->did[0].id number against the expected id number.  It should be correct but it never hurts to verify.  As long as the object 'ca' and the description id match it should work.  I've been getting the description value out of the BaseContainer for the 'object' like that forever.  Is the value really a Real value?  If you are looking at a CYCLE description, you should use GetLong().

                        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 02/07/2011 at 08:10, xxxxxxxx wrote:

                          Yes, i checked. What worked though is from one of your posts, januari 8, but in the getter variant:

                          GeData da;
                          (BaseLists2D* )ca->GetParameter(DesID(dpdd->did[0].id), da, DESCFLAGS_GET_0);
                          GePrint(RealToString(da.GetReal());

                          Now the interesting thing is how to get the variable programmatically out of the GeData when i know the dtype:
                          LONG dType = dpdd->did[0].dtype.

                          Should i use a switch case for all known dtypes ?

                          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 03/07/2011 at 05:40, xxxxxxxx wrote:

                            OK i used a switch plus all variants for getters and setters.

                            But there is one thing, as Columbo said 😞
                            How to get the min and max for that property (not for the properties datatype)

                            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 03/07/2011 at 09:43, xxxxxxxx wrote:

                              DESC_MIN and DESC_MAX are the settings for the property instance - or at least they should be.  These are what are set in the BaseContainer when creating them dynamically in GetDDescription().  Remember that there are another set of min/max settings: DESC_MINSLIDER/DESC_MAXSLIDER.  These control the min/max of the slider control not just the value that the attribute can take.

                              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 05/07/2011 at 15:57, xxxxxxxx wrote:

                                Still have a problem to find out if an AM property is a LONG or a CYCLE.
                                Got no clue, can you spell it out?

                                And...
                                If i drag a vector prop, say a rotation vector, it seems a complete vector.
                                Altough when i click in the AM on the RRR part it lits up as a unity, while the HPB lit seperately.
                                It arrives in my drag code as a whole vector.

                                I cannot drag one vector component only?

                                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 05/07/2011 at 16:33, xxxxxxxx wrote:

                                  Have you tried checking the LONG DESC_CUSTOMGUI setting to be either CUSTOMGUI_CYCLE or CUSTOMGUI_CYCLEBUTTON?  At the moment, I cannot find any other way that this might be done.

                                  No, you cannot drag only a vector component as the vector is seen as a description type in itself.

                                  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 06/07/2011 at 03:29, xxxxxxxx wrote:

                                    Robert,

                                    Years ago you mentioned a magic 'DescriptionPropertyCustomGui', could that be helpfull to gather info about AM properties, like vectors and subselections? It's in the SDK, but I cannot find much info?

                                    Could you be a bit more specific about how to get to these cycle ID's ?

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