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

    Checknames option

    Cinema 4D SDK
    python r20
    2
    3
    839
    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.
    • P
      pim
      last edited by m_adam

      The InsertObject api has a "checknames" option.

      BaseDocument.InsertObject(op[, parent=None, pred=None, checknames=False])
      

      I am missing this option with for example "InsertUnderLast()"

      GeListNode.InsertUnderLast(obj)
      

      What is the best way to get unique names for an object?

      -Pim

      1 Reply Last reply Reply Quote 0
      • M
        m_adam
        last edited by

        Hi @Pim,

        InsertObject allows you to achieve the same things with parent and pred parameter.
        You can get the last child of an object with GeListNode.GetDownLast.

        Now according to your request, keep in mind a GeListNode is not something related to a document, so it can be in a document but it's not mandatory, and it's why InsertObject get the Checknames parameter since it can check for all objects within the document.

        Hope it answers to your question,
        Cheers,
        Maxime.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        1 Reply Last reply Reply Quote 2
        • P
          pim
          last edited by

          Works great, thanks.

          -Pim

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