I've had a similar issue when playing with "daily did-you-know quick tips" as an addon [1]. The idea was to have a button with a random tip from a collection on startup, which works fine. Except that having buttons to browse through tips there doesn't work due to missing redraws.
[1] https://github.com/lukastoenne/addon_quick_tips/blob/master/ui.py On Sat, May 31, 2014 at 4:15 AM, Campbell Barton <[email protected]> wrote: > On Sat, May 31, 2014 at 5:00 AM, Andrew Peel <[email protected]> > wrote: > > For the Fluid Designer Project we utilize Operator Dialog Boxes a lot. > They > > provide a quick and intuitive way of accessing properties. I am curious > to > > know how I would go about allowing the interface to redraw. Unlike Panels > > the draw function only gets called once. So if I wanted to have a > checkbox > > that changes the way the dialog box is displayed I need to cancel the > > operator then reopen the dialog box. In the API there is a check(context) > > function that checks the operators settings and returns True to signal a > > change to redraw. I believe this only redraws the editor space. Would it > be > > possible to have this redraw the dialog box interface as well, or would > it > > be possible to allow the operator dialog to redraw the same way panels > do. > > > > > > I am still learning how to navigate and modify Blenders Source, but I can > > typically find what I need if I am pointed in the right direction. Any > > information on this would be greatly appreciated. > > > > > > Also I have never used the Bf-committers mailing list, so if I should be > > asking these types of questions somewhere else then please let me know. > > Thanks. > > This has come up a few times before, IIRC Ton wasn't keen on supporting > this. > The current popups are designed around menus which are meant to be static. > > In fact in 2.4x it was possible to do this. > Though the method used wasn't so great, the popup was removed and > re-created each time - but from user point-of-view it was OK. > > If you want to look into it,search for uiBlockCreateFunc, > uiBlockHandleCreateFunc - and see how they're used. > > Id suggest to do this by keeping the popup region (ARegionType - > RGN_TYPE_TEMPORARY). and re-run the creation function > (uiBlockCreateFunc), but this will need a bit of refactoring. > _______________________________________________ > Bf-committers mailing list > [email protected] > http://lists.blender.org/mailman/listinfo/bf-committers > _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
