Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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
    1. Maxon Developers Forum
    2. wadams
    3. Posts
    W
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 1
    • Best 1
    • Controversial 0
    • Groups 0

    Posts made by wadams

    • RE: Python Cloner/Scatter plugin

      Here's a great place to get started:

      https://github.com/PluginCafe/cinema4d_py_sdk

      There are tons of examples to use. As for the specifics of what you're trying to do:

      The cloner is a BaseObject. You pass in the integer ID to the BaseObject class to create one:

      cloner = c4d.BaseObject(1018544) <--- That number is for cloner. It is not in the documentation however.

      The console window in C4D is a great resource for finding out all the names of parameters for anything in C4D. It's located in Extensions -> Console Window or Shift + F10. Click on the python tab on the leftside of the window. No you can drag anything into this console and it will tell you what it is. For instance if i drag a Cloner into the console window it will say Cloner. Now press enter inside the console window and it will print out the following:

      <c4d.BaseObject object called Cloner/Cloner with ID 1018544 at 2984230868544>

      This tells me that the object is a BaseObject and the ID for it is 1018544 (which is the ID from my code example from above). You can do the same thing with parameters. For instance, you can click and drag any of the parameter titles into the console and it will tell you their ID names as well. Clicking and dragging on 'Mode' in object properties for the cloner into the console window prints this:

      Cloner[c4d.ID_MG_MOTIONGENERATOR_MODE]

      Hitting enter will give the the value that it is set to.

      Cloner[c4d.ID_MG_MOTIONGENERATOR_MODE]
      3

      Using this method plus referring to the Python documentation is your best bet for doing things you haven't been able to find exampels of.

      Hope that was helpful.

      posted in Cinema 4D SDK
      W
      wadams