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

    Creating a fracture Object in COFFEE [SOLVED]

    SDK Help
    0
    5
    409
    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
      Helper
      last edited by

      On 03/01/2015 at 03:54, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R16 
      Platform:      Mac OSX  ; 
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      Hi everybody,
      first of all, happy new year to all.

      I have been trying to find something about the fracture object in the SDK, basically how to create one in COFFEE, but there seems to be nothing at all.

      Could you point me to the right direction?
      BTW, I don't want to use a CallCommand.

      Cheerio
      T

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

        On 03/01/2015 at 06:45, xxxxxxxx wrote:

        Hi T 😉

        A happy new year to you as well.

        Basically, you use the ID you would use in a CallCommand to create the object. So if the Script Log
        gives you

        CallCommand(1018791); // Fracture
        

        You can use this code instead to create the object without a CallCommand() and insert it manually.

        var obj = AllocObject(1018791);
        doc->InsertObject(obj, NULL, NULL);
        

        And in Python

        import c4d
        obj = c4d.BaseObject(1018791)
        doc.InsertObject(obj)
        

        Best,
        -Niklas

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

          On 03/01/2015 at 06:56, xxxxxxxx wrote:

          Hey Niklas, thanks for the reply.
          I was hoping that something like "Omograph_fracture" would do it.

          The ID way is helpful but it always worries me that that number can change some day and then it won't work.
          Any idea why mograph objects can't be created by name? (although I guess it's not only Mograph)

          Anyway, thanks again.
          T

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

            On 03/01/2015 at 07:06, xxxxxxxx wrote:

            Most likely it will not change because that would break compatibility of scene files. But I agree that a 
            symbolic name would be much nicer to use instead of the number.

            I don't know why there is no ID for it. Interestingly there are  IDs for the parameters (eg.
            MGFRACTUREOBJECT_MODE). The IDs seem to be gathered dynamically, so I can't tell why it
            is not included. 🙂

            -Niklas

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

              On 03/01/2015 at 07:31, xxxxxxxx wrote:

              Thank you again...
              🙂

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