Commit: 6df397bcb243182639fec8628aae7fd1ce588da1 Author: Lukas Tönne Date: Sun Sep 23 14:13:47 2018 +0100 Branches: hair_object https://developer.blender.org/rB6df397bcb243182639fec8628aae7fd1ce588da1
Tag the object data block instead of the object to ensure correct updates after selection. =================================================================== M source/blender/editors/hair/edithair_select.c M source/blender/editors/hair/edithair_test.c =================================================================== diff --git a/source/blender/editors/hair/edithair_select.c b/source/blender/editors/hair/edithair_select.c index c9d30caaf58..b2f903dbbad 100644 --- a/source/blender/editors/hair/edithair_select.c +++ b/source/blender/editors/hair/edithair_select.c @@ -144,8 +144,8 @@ static int hair_select_all_exec(bContext *C, wmOperator *op) } BKE_hair_batch_cache_dirty(hsys, BKE_HAIR_BATCH_DIRTY_SELECT); - DEG_id_tag_update(&obedit->id, DEG_TAG_SELECT_UPDATE); - WM_event_add_notifier(C, NC_OBJECT|ND_DATA|NA_SELECTED, obedit); + DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE); + WM_event_add_notifier(C, NC_GEOM|ND_SELECT|NA_SELECTED, obedit); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/hair/edithair_test.c b/source/blender/editors/hair/edithair_test.c index a19499f1bc7..6975d99f922 100644 --- a/source/blender/editors/hair/edithair_test.c +++ b/source/blender/editors/hair/edithair_test.c @@ -42,6 +42,8 @@ #include "BKE_hair.h" #include "BKE_mesh_sample.h" +#include "DEG_depsgraph.h" + #include "ED_hair.h" #include "ED_screen.h" #include "ED_view3d.h" @@ -123,6 +125,8 @@ static int add_test_hair_exec(bContext *C, wmOperator *op) // hsys->flag |= HAIR_SYSTEM_UPDATE_FOLLICLE_BINDING; BKE_hair_batch_cache_dirty(hsys, BKE_HAIR_BATCH_DIRTY_ALL); + DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE); + WM_event_add_notifier(C, NC_GEOM|ND_DRAW, obedit); return OPERATOR_FINISHED; } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs