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

    GetLayerData() for Xref

    Cinema 4D SDK
    r20 python
    2
    3
    530
    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

      How can I set / Get the Xref setting in the layerdata.

      When doing layer_data = layer.GetLayerData(doc), I get:

      {'solo': False, 'locked': False, 'render': False, 'color': Vector(0.189, 0.513, 0.789), 'manager': True, 'animation': False, 'generators': False, 'deformers': False, 'expressions': False, 'view': False}
      
      1 Reply Last reply Reply Quote 0
      • M
        m_adam
        last edited by

        Hi @pim unfortunately, as you figured it out, GetLayerData does not return the information relative to Xref.
        But these information can be queried like so

        layer = op[c4d.ID_LAYER_LINK]
        print layer.GetNBit(c4d.NBIT_REF)
        

        Cheers,
        Maxime.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

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

          Hi @pim, does the solution provided is ok for you?

          EDIT: I turned it into solved but please feel free to open it again if you need to.

          MAXON SDK Specialist

          Development Blog, MAXON Registered Developer

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