Merge branch 'master' into blender2.8
This commit is contained in:
@@ -7495,7 +7495,7 @@ static void lib_link_workspace_layout_restore(struct IDNameLib_Map *id_map, Main
|
|||||||
/* force recalc of list of channels (i.e. includes calculating F-Curve colors)
|
/* force recalc of list of channels (i.e. includes calculating F-Curve colors)
|
||||||
* thus preventing the "black curves" problem post-undo
|
* thus preventing the "black curves" problem post-undo
|
||||||
*/
|
*/
|
||||||
sipo->runtime.flag |= SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC;
|
sipo->runtime.flag |= SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC_COLOR;
|
||||||
}
|
}
|
||||||
else if (sl->spacetype == SPACE_BUTS) {
|
else if (sl->spacetype == SPACE_BUTS) {
|
||||||
SpaceButs *sbuts = (SpaceButs *)sl;
|
SpaceButs *sbuts = (SpaceButs *)sl;
|
||||||
|
|||||||
@@ -622,7 +622,7 @@ static void graph_listener(wmWindow *UNUSED(win), ScrArea *sa, wmNotifier *wmn,
|
|||||||
ED_area_tag_redraw(sa);
|
ED_area_tag_redraw(sa);
|
||||||
break;
|
break;
|
||||||
case NC_WINDOW:
|
case NC_WINDOW:
|
||||||
if (sipo->runtime.flag & SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC) {
|
if (sipo->runtime.flag & (SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC | SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC_COLOR)) {
|
||||||
/* force redraw/refresh after undo/redo - prevents "black curve" problem */
|
/* force redraw/refresh after undo/redo - prevents "black curve" problem */
|
||||||
ED_area_tag_refresh(sa);
|
ED_area_tag_refresh(sa);
|
||||||
}
|
}
|
||||||
@@ -785,6 +785,15 @@ static void graph_refresh(const bContext *C, ScrArea *sa)
|
|||||||
ED_area_tag_redraw(sa);
|
ED_area_tag_redraw(sa);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* We could check 'SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC_COLOR', but color is recalculated anyway. */
|
||||||
|
if (sipo->runtime.flag & SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC_COLOR) {
|
||||||
|
sipo->runtime.flag &= ~SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC_COLOR;
|
||||||
|
#if 0 /* Done below. */
|
||||||
|
graph_refresh_fcurve_colors(C);
|
||||||
|
#endif
|
||||||
|
ED_area_tag_redraw(sa);
|
||||||
|
}
|
||||||
|
|
||||||
/* init/adjust F-Curve colors */
|
/* init/adjust F-Curve colors */
|
||||||
graph_refresh_fcurve_colors(C);
|
graph_refresh_fcurve_colors(C);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -438,6 +438,8 @@ typedef enum eGraphEdit_Mode {
|
|||||||
typedef enum eGraphEdit_Runtime_Flag {
|
typedef enum eGraphEdit_Runtime_Flag {
|
||||||
/** Temporary flag to force channel selections to be synced with main. */
|
/** Temporary flag to force channel selections to be synced with main. */
|
||||||
SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC = (1 << 0),
|
SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC = (1 << 0),
|
||||||
|
/** Temporary flag to force fcurves to recalculate colors. */
|
||||||
|
SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC_COLOR = (1 << 1),
|
||||||
} eGraphEdit_Runtime_Flag;
|
} eGraphEdit_Runtime_Flag;
|
||||||
|
|
||||||
/** \} */
|
/** \} */
|
||||||
|
|||||||
Reference in New Issue
Block a user