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

    Deformed Objects

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 326 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 28/07/2010 at 05:01, xxxxxxxx wrote:

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

      ---------
      Hi, how can I find out if an object is being affected by a deformer or not.

      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/07/2010 at 08:27, xxxxxxxx wrote:

        Check this out:

        BaseObject* BaseObject::GetDeformCache();
        

        I'd say if it's not NULL, there has been some deformation going on 😉

        Cheers,
        Jack

        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/07/2010 at 08:49, xxxxxxxx wrote:

          While that is correct, GetDeformCache() may return NULL for other reasons (and the object in question still be affected by a deformer) such as cache not yet built.

          A better approach might be to see if the object's children are deformers as an additional test:

          Bool deformed = (obj->GetDeformCache() != NULL);  
          if (!deformed)  
          {  
            LONG info;  
            for (BaseObject* child = obj->GetDown(); child; child = child->GetNext())  
            {  
                info = child->GetInfo();  
                if (child->GetDeformMode() && ((info == OBJECT_MODIFIER) || (info == OBJECT_HIERARCHYMODIFIER)))  
                {  
                    deformed = TRUE;  
                    break;  
                }  
            }  
          }  
          
          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/07/2010 at 09:30, xxxxxxxx wrote:

            Thanks all. The only problem with checking for deformers as children is that a deformer can affect it's parent object and the hierarchy below that parent, which means I will have to traverse the whole hierarchy from the top level parent, which I was trying to avoid.

            Cheers,
                   JDP

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