diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-12-12 12:43:21 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-12-12 12:44:39 +0300 |
commit | adaadb2fa0a4fde53f5f09bc05f6758926e71f44 (patch) | |
tree | b401182a665599eae7a1b734c53e962ba54c7bbb /source/blender/editors/space_view3d/view3d_gizmo_lamp.c | |
parent | f2796da2e5b594368d6ef1e92b59cef75bcd819c (diff) |
Fix T59133: Area light size not updating from viewport gizmo.
When we are directly affecting DNA, we need to handle update ourself...
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_gizmo_lamp.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_gizmo_lamp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_lamp.c b/source/blender/editors/space_view3d/view3d_gizmo_lamp.c index 3eaddce582b..b50f69950fb 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_lamp.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_lamp.c @@ -30,6 +30,8 @@ #include "BKE_context.h" #include "BKE_object.h" +#include "DEG_depsgraph.h" + #include "DNA_object_types.h" #include "DNA_lamp_types.h" @@ -154,6 +156,9 @@ static void gizmo_area_lamp_prop_matrix_set( else { la->area_size = len_v3(matrix[0]); } + + DEG_id_tag_update(&la->id, ID_RECALC_COPY_ON_WRITE); + WM_main_add_notifier(NC_LAMP | ND_LIGHTING_DRAW, la); } static bool WIDGETGROUP_lamp_area_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt)) |