Mesh Defofmer Cages



  • 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...



  • 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



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

    Thanks ScottA!


Log in to reply