Small improvement in detecting which previews need update in Blender.
Now you can have multiple buttons windows open, for example one showing only a larger material preview, and have it updated correctly. Nice for setups where you can keep preview shown while scrolling buttons.
This commit is contained in:
@@ -341,17 +341,30 @@ void BIF_all_preview_changed(void)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* signal all previews in current screen of current type */
|
||||
void BIF_preview_changed(SpaceButs *sbuts)
|
||||
{
|
||||
/* can be called when no buttonswindow visible */
|
||||
if(sbuts) {
|
||||
sbuts->cury= 0;
|
||||
addafterqueue(sbuts->area->win, RENDERPREVIEW, 1);
|
||||
ScrArea *sa;
|
||||
short mainb= sbuts->mainb;
|
||||
short tab= sbuts->tab[mainb];
|
||||
|
||||
sa= G.curscreen->areabase.first;
|
||||
while(sa) {
|
||||
if(sa->spacetype==SPACE_BUTS) {
|
||||
sbuts= sa->spacedata.first;
|
||||
if(sbuts->mainb==mainb && sbuts->tab[mainb]==tab) {
|
||||
sbuts->cury= 0;
|
||||
addafterqueue(sbuts->area->win, RENDERPREVIEW, 1);
|
||||
}
|
||||
}
|
||||
sa= sa->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* is supposed to be called with correct panel offset matrix */
|
||||
/* is panel callback, supposed to be called with correct panel offset matrix */
|
||||
void BIF_previewdraw(void)
|
||||
{
|
||||
SpaceButs *sbuts= curarea->spacedata.first;
|
||||
|
||||
Reference in New Issue
Block a user