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

    how to differentiate object is joint?

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 270 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 21/08/2008 at 19:15, xxxxxxxx wrote:

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

      ---------
      I Want to differentiate object is joint or not in scene, 
      how Can I to Do by C++ sdk? 
               thank you advance!!!

      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 22/08/2008 at 01:28, xxxxxxxx wrote:

        Just check for Ojoint.

        > \> if(op->GetType() == Ojoint) \> { \>      //do something \> } \>

        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 27/08/2008 at 19:05, xxxxxxxx wrote:

          where is define Ojoint ? my code can't  be compiler passed, Ojoint is not define:
          void GetAllJoint(BaseDocument *doc, BaseObject *oJoints, int& iOutResult)
          {
           if (oJoints)
           {
            BaseObject *res = NULL;
            ModelingCommandData cd;
            cd.doc = doc;
            cd.op = oJoints;
            if(!SendModelingCommand(MCOMMAND_CURRENTSTATETOOBJECT, cd)) return;
            res = static_cast<BaseObject*>(cd.result->GetIndex(0));
            if(!res) return ;
            if(res->GetType() == Ojoint)
            {
             iOutResult = 1;
            }
            
               if(oJoints->GetDown())
            {
             GetAllJoint(doc, oJoints->GetDown());
            }
            
            if(oJoints->GetNext())
            {
             GetAllJoint(doc, oJoints->GetNext(), iOutResult);
            }
           }
          }
          bool IsJointed()
          {
           BaseDocument *doc=GetActiveDocument();
              BaseObject *obj = doc->GetFirstObject();
           int iRet = 0;
            
               if(obj)
               {
             GetAllJoint( doc,obj, iRet);
             if ( iRet > 0)
             {
              return true;
             }

          }
           return false;
          }

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