Viewport not updating after Adding a key



  • 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?



  • 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



  • 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



  • 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


Log in to reply