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
    • Register
    • Login

    More info on DESC_ASKOBJECT, please?

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 240 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/08/2005 at 19:36, xxxxxxxx wrote:

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

      ---------
      What exactly does this mean?

      And the reason that I ask involves the real question. I am trying to find a way to directly link one PluginTag's description into another's (which gathers them) so that the data being operated on is of the former (somewhat like a GV with Xpresso). Or, barring that, some way to get the selected Dynamic Description items and perform an operation on them.

      The one problem with AM Descriptions is that whenever something is done, the only response you get is a MSG_DESCRIPTION_CHECKUPDATE and/or MSG_DESCRIPTION_VALIDATE message which contain no identification to the AM 'gadget' that was altered. If there is another way to get this identification, I'd assuredly be pleased to know. I don't even know how to determine if a Description is selected (highlighted) in the AM or not.

      Thanks,

      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 15/08/2005 at 04:13, xxxxxxxx wrote:

        Ahhhhh!! 🙂 So, this is how it's done. GetDParameter() is useless and these two are misnamed. SetDParameter() actually returns the description item altered in the AM. Here's some code for posterity (and posteriors) :

          
        // NodeData.SetDParameter  
        Bool IPPObject::SetDParameter(GeListNode* node, const DescID& id, const GeData& t_data, LONG& flags)  
        {  
             ULONG lbits;  
             BaseTag* pt;  
             BaseContainer* bc;  
             BaseDocument* baseDoc;  
             BaseObject* orig;  
          
             if (!(baseDoc = node->GetDocument())) return FALSE;  
             if (!(orig = ((BaseObject* )node)->GetDown())) return FALSE;  
             if (!(bc = ((BaseObject* )node)->GetDataInstance())) return FALSE;  
             AutoAlloc<Description> desc;  
             if (!(desc && node->GetDescription(desc,0))) return FALSE;  
             if (!(bc = desc->GetParameterI(id, NULL))) return FALSE;  
             if (!(pt = GetIPPTag(baseDoc, orig, orig->GetDown(), bc->GetString(DESC_NAME)))) return FALSE;  
             bc = pt->GetDataInstance();  
             lbits = (ULONG)bc->GetLong(IPP_BITS);  
             // Show Polygon Selection in Editor  
             if (t_data.GetLong()) lbits |= PBASE_BITS_VISIBLE;  
             // Hide Polygon Selection in Editor  
             else lbits &= ~PBASE_BITS_VISIBLE;  
             bc->SetLong(IPP_BITS, (LONG)lbits);  
             return SUPER::SetDParameter(node, id, t_data, flags);  
        }  
        

        This gets the plugin tag that matches DESC_NAME and it's stored link to a PolygonSelection tag when a DTYPE_BOOL is clicked. When unchecked the polygons are 'hidden', when checked they are 'visible'. I plan to update all of my plugin objects to do this instead of relying upon the MSG_DESCRIPTION_CHECKUPDATE and MSG_DESCRIPTION_VALIDATE messages.

        Enjoy!

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