SetDefault & UpdateCurrentGlyphView

  • Hi,

    I think I found a bug. When setting a default for the GlyphView and UpdateCurrentGlyphView, it won't be visible until I reopen the GlyphView.
    For now all I want is to set the grid. Maybe it can be done more simple? Here is my code.

    from import getDefault, setDefault
    from mojo.UI import UpdateCurrentGlyphView
    print getDefault('glyphViewGridx')
    print getDefault('glyphViewGridy')
    setDefault('glyphViewGridx', 32)
    setDefault('glyphViewGridy', 32)

    Thanks, Thom

  • That does the trick like it should be ;)

    Thanks again Frederik!

  • admin

    he Thom

    UpdateCurrentGlyphView() just refreshes the glyph view, it ask to redraw. It will not update defaults / preferences

    You can update the defaults in all views by posting an preferences changed notification.

    from import PostNotification

    similar to the ShapeTool see

    good luck

Log in to reply