Splinetext object does not refresh in viewport



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

    On 13/04/2011 at 07:29, xxxxxxxx wrote:

    I'm creating a splinetext object and want to change its heigh, text etc after the fact. Here's a short version:

      
    o = c4d.BaseObject(c4d.Osplinetext)  
      
    ...  
      
    o = doc.SearchObject("Text")  
    bc = o.GetData()  
    bc[c4d.PRIM_TEXT_HEIGHT]  = 100  
    bc[c4d.PRIM_TEXT_TEXT]  = "xyz"  
    o.SetData(bc)  
    c4d.EventAdd()  
    

    This technically seems to work, the object is being created and when I later call the changes, they are written correctly and appear changed in the attribute editor. However, these changes are not represented in the Viewport, the spline text just stays as it was - until I manually change any value in the attribure editor, then all the changes are shown at once. I also tried CallCommand(12147) with no better result. Am I missing a specific refresh command?

    Thanks



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

    On 13/04/2011 at 07:39, xxxxxxxx wrote:

    Ok, for the moment I've found a not very elegant workaround... it appears the of all the commands, Scale actually triggers the redraw, so this works:

    o.Scale(2)
    o.Scale(0.5)



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

    On 13/04/2011 at 12:06, xxxxxxxx wrote:

    Just tell the Object that something has changed.

    o.Message(c4d.MSG_UPDATE)
    

    cheers, Niklas



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

    On 13/04/2011 at 12:10, xxxxxxxx wrote:

    Cheers mate, that works.


Log in to reply