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

    Surface Deformer

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 315 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 11/02/2014 at 18:50, xxxxxxxx wrote:

      Is it possible to run the initialize button in the object properties of the surface deformer using python?

      Thanks in advance!

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

        On 12/02/2014 at 10:57, xxxxxxxx wrote:

        The file with the ID's for the Surface deformer are found here:
        C:\Program Files\MAXON\YOUR VERSION\resource\modules\ca\res\description\ocasurfacedeformer.h

        You can execute any button. On any deformer. The same way.
        You just have to find the IDs for the deformer and the specific button you want to execute.
        Then change the ID in the code.

        The IDs for the other deformers are stored in .h files inside of this folder:
        C:\Program Files\MAXON\YOUR VERSION\resource\modules\ca\res\description folder.

        #This is how to execute the Initialize button on the Surface deformer object  
          
        import c4d  
        def main() :  
          
          sd = doc.SearchObject("Surface")  
          
          #Executes the "Initialize" button  
          c4d.CallButton(sd, c4d.ID_CA_SURFACE_DEFORMER_OBJECT_INITIAL)  
          
          c4d.EventAdd()  
          
        if __name__=='__main__':  
          main()
        

        -ScottA

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

          On 12/02/2014 at 11:09, xxxxxxxx wrote:

          Very much appreciated, thank you ScottA!

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