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
    • Register
    • Login

    Xref object Make it Editable

    Cinema 4D SDK
    2024 python
    2
    3
    507
    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.
    • chuanzhenC
      chuanzhen
      last edited by chuanzhen

      Hi,
      There are several XRF objects in the document, and I want to implement the Make it Editable like in the XRF manager or in Object manager.This is the method I used, but the result is incorrect

      res = c4d.utils.SendModelingCommand(
                      command=c4d.MCOMMAND_MAKEEDITABLE,
                      list=xref_objs,
                      mode=c4d.MODELINGCOMMANDMODE_ALL,
                      bc=c4d.BaseContainer(),
                      doc=backup_doc)
      for obj in res:
          backup_doc.InsertObject(obj)
      

      b84de1c6-8c71-43d6-a495-a2dcc3d63923-image.png
      6021bfbc-098c-4d0b-be6f-dea58c6c0dd6-image.png

      Thanks for any help!

      相信我,可以的!

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @chuanzhen
        last edited by ferdinand

        Hey @chuanzhen,

        Thank you for reaching out to us. These two, "Make Editable" the command as for example exposed by the context menu of the Object Manager, and "Make Editable" the Xref Manager menu entry, are entirely different things.

        Moreover, we do not expose GUIs and their functionalities (e.g., there are no "ObjectManager" or "MaterialManager" classes) but the APIs behind them. This usually means that some finer details of a niche-feature-manager remain unexposed. This is here the case, the XRef Manager functionalities are not exposed.

        To emulate this function, you would have to traverse the object tree yourself and then for each XRef read the Reference field, load the referenced document, grab its object content and place it in your scene, e.g., replace the Xref with it.
        d1c2fb90-669c-425b-884e-f5245aed5e4a-image.png

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

        chuanzhenC 1 Reply Last reply Reply Quote 0
        • chuanzhenC
          chuanzhen @ferdinand
          last edited by

          @ferdinand Thanks for your reply!

          相信我,可以的!

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