diff options
author | Alessio Monti di Sopra <a.monti> | 2019-06-21 19:22:53 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-06-21 19:29:24 +0300 |
commit | f9e4568550fff0ec28f4efe6f73f251e3e72afa8 (patch) | |
tree | 09a3e19e10d2b5504799855ffd1ae0fc26c955f1 | |
parent | 9bbd9d9b3bd7f54c33c69cdf2f07178ad5f4460d (diff) |
UI: use force icon for objects in outliner, fix missing redraw when changing type
Differential Revision: https://developer.blender.org/D5008
-rw-r--r-- | source/blender/editors/object/object_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/outliner_draw.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 4bda85b03a0..a390cf67cf5 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -869,6 +869,8 @@ static int forcefield_toggle_exec(bContext *C, wmOperator *UNUSED(op)) WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); + DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM); + return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index fed56f3d452..a151061ae64 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -31,6 +31,7 @@ #include "DNA_object_types.h" #include "DNA_scene_types.h" #include "DNA_sequence_types.h" +#include "DNA_object_force_types.h" #include "BLI_math.h" #include "BLI_blenlib.h" @@ -2207,6 +2208,9 @@ TreeElementIcon tree_element_get_icon(TreeStoreElem *tselem, TreeElement *te) else if (ob->empty_drawtype == OB_EMPTY_IMAGE) { data.icon = ICON_OUTLINER_OB_IMAGE; } + else if (ob->pd && ob->pd->forcefield) { + data.icon = ICON_OUTLINER_OB_FORCE_FIELD; + } else { data.icon = ICON_OUTLINER_OB_EMPTY; } |