Outliner: better support for paintcurves ('Blender File' view)
- paintcurves were hitting an assert in outliner_add_element() - missing outliner update when adding a paintcurve - paintcurves were not showing an icon [they dont have a dedicated icon, took the one used elsewhere] Reviewers: brecht Differential Revision: https://developer.blender.org/D4445
This commit is contained in:
parent
a53dccb2a9
commit
baee9b014a
|
@ -166,6 +166,8 @@ static int paintcurve_new_exec(bContext *C, wmOperator *UNUSED(op))
|
|||
p->brush->paint_curve = BKE_paint_curve_add(bmain, "PaintCurve");
|
||||
}
|
||||
|
||||
WM_event_add_notifier(C, NC_PAINTCURVE | NA_ADDED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
|
|
|
@ -1438,6 +1438,8 @@ TreeElementIcon tree_element_get_icon(TreeStoreElem *tselem, TreeElement *te)
|
|||
data.icon = ICON_MOD_MASK; break;
|
||||
case ID_MC:
|
||||
data.icon = ICON_SEQUENCE; break;
|
||||
case ID_PC:
|
||||
data.icon = ICON_CURVE_BEZCURVE; break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ typedef struct TreeElementIcon {
|
|||
(ELEM(GS((_id)->name), ID_SCE, ID_LI, ID_OB, ID_ME, ID_CU, ID_MB, ID_NT, ID_MA, ID_TE, ID_IM, ID_LT, ID_LA, ID_CA) || \
|
||||
ELEM(GS((_id)->name), ID_KE, ID_WO, ID_SPK, ID_GR, ID_AR, ID_AC, ID_BR, ID_PA, ID_GD, ID_LS, ID_LP) || \
|
||||
/* Only in 'blendfile' mode ... :/ */ \
|
||||
ELEM(GS((_id)->name), ID_SCR, ID_WM, ID_TXT, ID_VF, ID_SO, ID_CF, ID_PAL, ID_MC, ID_WS, ID_MSK))
|
||||
ELEM(GS((_id)->name), ID_SCR, ID_WM, ID_TXT, ID_VF, ID_SO, ID_CF, ID_PAL, ID_MC, ID_WS, ID_MSK, ID_PC))
|
||||
|
||||
/* TreeElement->flag */
|
||||
enum {
|
||||
|
|
|
@ -224,6 +224,11 @@ static void outliner_main_region_listener(
|
|||
ED_region_tag_redraw(ar);
|
||||
}
|
||||
break;
|
||||
case NC_PAINTCURVE:
|
||||
if (ELEM(wmn->action, NA_ADDED)) {
|
||||
ED_region_tag_redraw(ar);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -246,7 +246,7 @@ typedef struct wmNotifier {
|
|||
#define NC_GEOM (16<<24)
|
||||
#define NC_NODE (17<<24)
|
||||
#define NC_ID (18<<24)
|
||||
/* (19<<24) is free */
|
||||
#define NC_PAINTCURVE (19<<24)
|
||||
#define NC_MOVIECLIP (20<<24)
|
||||
#define NC_MASK (21<<24)
|
||||
#define NC_GPENCIL (22<<24)
|
||||
|
|
Loading…
Reference in New Issue