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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Mesh Defofmer Cages

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 408 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

      On 17/09/2014 at 10:06, xxxxxxxx wrote:

      I seem to be stuck on adding a cage to the mesh deformer.

      I am using:

      MeshDeformer[c4d.ID_CA_MESH_DEFORMER_OBJECT_CAGE_INCLUDE] = CageMesh
      

      This does not work. Is there a special way to add objects to a InExcludeData field? InsertObject() does not work either. but will return True...

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 17/09/2014 at 12:46, xxxxxxxx wrote:

        import c4d  
        def main() :  
           
          mDeformer = doc.SearchObject("Mesh")      
          cages = mDeformer[c4d.ID_CA_MESH_DEFORMER_OBJECT_CAGE_INCLUDE]  
            
          #The object you want to put into the "Cages" object list  
          targetobj = doc.SearchObject("Cube")      
          cages.InsertObject(targetobj,0)  
            
          #After inserting the object we have to update the deformer to see them   
          mDeformer[c4d.ID_CA_MESH_DEFORMER_OBJECT_CAGE_INCLUDE] = cages  
          
          c4d.EventAdd()  
          
        if __name__=='__main__':  
          main() 
        

        -ScottA

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          On 18/09/2014 at 12:04, xxxxxxxx wrote:

          Thanks ScottA!

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