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
    • Recent
    • Tags
    • Users
    • Login
    The Maxon SDK Team is currently short staffed due to the winter holidays. No forum support is being provided between 15/12/2025 and 5/1/2026. For details see Maxon SDK 2025 Winter Holidays.

    Viewport not updating after Adding a key

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 914 Views
    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 Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 02/04/2011 at 16:09, xxxxxxxx wrote:

      I have this little bit of code:

      curKeyDict=curve _.AddKey(doc.GetTime())
                    curKey=curKeyDict["key"]
                    curKey.SetValue(curve _, curValue)
                    curKey.SetTime(curve _, doc.GetTime())

      Which just basically adds a key to a curve, sets the value and the time. However, the viewport does not update. The Key gets added properly and I see it, but I still have to press A to refresh the view to show the changes on the object. Does anyone know what I need so I don't have to refresh it? I've tried EventAdd() but that's not doing it. I also tried DrawViews() but that too didn't work.

      Can anyone help me out here?

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 02/04/2011 at 18:57, xxxxxxxx wrote:

        Two methods off the top of my head:

        c4d.EventAdd(c4d.EVENT_ANIMATE)
        or
        c4d.CallCommand(12147)# Redraw

        -ScottA

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 03/04/2011 at 01:59, xxxxxxxx wrote:

          Cheers Scott,

          The EVENT_ANIMATE method seems to work. I don't know why I didn't use that one, I think I thought it would make the thing start playing...which in retrospect was pretty stupid of me. Shoulda thought of just calling the Redraw command, doh!

          Thanks mate

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 03/04/2011 at 07:07, xxxxxxxx wrote:

            You're welcome.

            Thanks for posting your custom GUI example. I learned something new with that one.

            -ScottA

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