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

    Modifying timeline marker's attributes

    Cinema 4D SDK
    3
    5
    926
    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
      heilei
      last edited by m_adam

      Hello all,

      C4D's Python SDK has method c4d.documents.AddMarker(), which only allows you to enter the marker's name and time position. What about other marker attributes, such as length, color, note etc.: is it possible to modify them after the new marker has been created?

      With kind regards,
      HeiLei

      1 Reply Last reply Reply Quote 0
      • P
        PluginStudent
        last edited by

        AddMarker() returns a BaseList2D object. The timeline marker settings are just parameters of this object, that can be set like any other parameter.

        now = doc.GetTime()
        marker = c4d.documents.AddMarker(doc, None ,now, "New Marker")
        marker[c4d.TLMARKER_TEXT] = "test text"
        c4d.EventAdd()
        

        See tlmarker.h File Reference

        1 Reply Last reply Reply Quote 1
        • H
          heilei
          last edited by

          Thanks PluginStudent, that was a lot easier than I thought!

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

            And to add on top of @PluginStudent, there is an example in basedocument_creates_marker_r17.py which define the time.

            Note to know each parameter you can also use the console as described in Python Console - Drag and Drop

            Cheers,
            Maxime.

            MAXON SDK Specialist

            Development Blog, MAXON Registered Developer

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

              Thanks for the drag'n'drop tip Maxime, that feature is extremely useful!

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