Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2019-03-04 13:51:11 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2019-03-04 15:04:41 +0300
commitbaee9b014ab0950db4730439098f35df6ea80291 (patch)
tree247b8fb7f10be3b89a486906babfe314f8e09729 /source
parenta53dccb2a9cabd0141cb7efb7959acfd4ea24dad (diff)
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
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/sculpt_paint/paint_curve.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_intern.h2
-rw-r--r--source/blender/editors/space_outliner/space_outliner.c5
-rw-r--r--source/blender/windowmanager/WM_types.h2
5 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_curve.c b/source/blender/editors/sculpt_paint/paint_curve.c
index bd2fea78a99..6e43c0ab492 100644
--- a/source/blender/editors/sculpt_paint/paint_curve.c
+++ b/source/blender/editors/sculpt_paint/paint_curve.c
@@ -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;
}
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index fba5b70392a..044ab8f1b7b 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -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;
}
diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h
index 0e215c595c1..0851d5ce9f4 100644
--- a/source/blender/editors/space_outliner/outliner_intern.h
+++ b/source/blender/editors/space_outliner/outliner_intern.h
@@ -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 {
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index 3d79a15a5a0..822f9ec61ac 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -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;
}
}
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 7d1e13bb1e4..0f799448561 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -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)