Merge remote-tracking branch 'origin/master' into blender2.8
[blender.git] / source / blender / editors / render / render_shading.c
index 49d74c2563364cf3106477fbef031985863756f6..270ba2a7947abedf8fb3c808990945909fbb6d84 100644 (file)
 #include "BKE_animsys.h"
 #include "BKE_context.h"
 #include "BKE_curve.h"
-#include "BKE_depsgraph.h"
 #include "BKE_font.h"
 #include "BKE_global.h"
 #include "BKE_image.h"
+#include "BKE_layer.h"
 #include "BKE_library.h"
 #include "BKE_linestyle.h"
 #include "BKE_main.h"
@@ -65,7 +65,8 @@
 #include "BKE_world.h"
 #include "BKE_editmesh.h"
 
-
+#include "DEG_depsgraph.h"
+#include "DEG_depsgraph_build.h"
 
 #ifdef WITH_FREESTYLE
 #  include "BKE_freestyle.h"
@@ -83,6 +84,7 @@
 #include "ED_mesh.h"
 #include "ED_node.h"
 #include "ED_render.h"
+#include "ED_scene.h"
 #include "ED_screen.h"
 
 #include "RNA_define.h"
@@ -153,7 +155,7 @@ static int material_slot_remove_exec(bContext *C, wmOperator *op)
                WM_event_add_notifier(C, NC_SCENE | ND_TOOLSETTINGS, NULL);
        }
        
-       DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
+       DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
        WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
        WM_event_add_notifier(C, NC_OBJECT | ND_OB_SHADING, ob);
        WM_event_add_notifier(C, NC_MATERIAL | ND_SHADING_PREVIEW, ob);
@@ -219,7 +221,7 @@ static int material_slot_assign_exec(bContext *C, wmOperator *UNUSED(op))
                }
        }
 
-       DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
+       DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
        WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
        
        return OPERATOR_FINISHED;
@@ -359,7 +361,7 @@ static int material_slot_copy_exec(bContext *C, wmOperator *UNUSED(op))
                        
                        if (ob_iter->totcol == ob->totcol) {
                                ob_iter->actcol = ob->actcol;
-                               DAG_id_tag_update(&ob_iter->id, OB_RECALC_DATA);
+                               DEG_id_tag_update(&ob_iter->id, OB_RECALC_DATA);
                                WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob_iter);
                        }
                }
@@ -424,7 +426,7 @@ static int material_slot_move_exec(bContext *C, wmOperator *op)
 
        MEM_freeN(slot_remap);
 
-       DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
+       DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
        WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
        WM_event_add_notifier(C, NC_OBJECT | ND_DATA, ob);
 
@@ -623,56 +625,58 @@ void WORLD_OT_new(wmOperatorType *ot)
 
 /********************** render layer operators *********************/
 
-static int render_layer_add_exec(bContext *C, wmOperator *UNUSED(op))
+static int view_layer_add_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Scene *scene = CTX_data_scene(C);
 
-       BKE_scene_add_render_layer(scene, NULL);
-       scene->r.actlay = BLI_listbase_count(&scene->r.layers) - 1;
+       BKE_view_layer_add(scene, NULL);
+       scene->active_view_layer = BLI_listbase_count(&scene->view_layers) - 1;
 
-       DAG_id_tag_update(&scene->id, 0);
-       WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
+       DEG_id_tag_update(&scene->id, 0);
+       DEG_relations_tag_update(CTX_data_main(C));
+       WM_event_add_notifier(C, NC_SCENE | ND_LAYER, scene);
        
        return OPERATOR_FINISHED;
 }
 
-void SCENE_OT_render_layer_add(wmOperatorType *ot)
+void SCENE_OT_view_layer_add(wmOperatorType *ot)
 {
        /* identifiers */
-       ot->name = "Add Render Layer";
-       ot->idname = "SCENE_OT_render_layer_add";
-       ot->description = "Add a render layer";
+       ot->name = "Add View Layer";
+       ot->idname = "SCENE_OT_view_layer_add";
+       ot->description = "Add a view layer";
        
        /* api callbacks */
-       ot->exec = render_layer_add_exec;
+       ot->exec = view_layer_add_exec;
 
        /* flags */
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 }
 
-static int render_layer_remove_exec(bContext *C, wmOperator *UNUSED(op))
+static int view_layer_remove_exec(bContext *C, wmOperator *UNUSED(op))
 {
+       Main *bmain = CTX_data_main(C);
        Scene *scene = CTX_data_scene(C);
-       SceneRenderLayer *rl = BLI_findlink(&scene->r.layers, scene->r.actlay);
+       ViewLayer *view_layer = BKE_view_layer_from_scene_get(scene);
 
-       if (!BKE_scene_remove_render_layer(CTX_data_main(C), scene, rl))
+       if (!ED_scene_view_layer_delete(bmain, scene, view_layer, NULL)) {
                return OPERATOR_CANCELLED;
+       }
 
-       DAG_id_tag_update(&scene->id, 0);
        WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
-       
+
        return OPERATOR_FINISHED;
 }
 
-void SCENE_OT_render_layer_remove(wmOperatorType *ot)
+void SCENE_OT_view_layer_remove(wmOperatorType *ot)
 {
        /* identifiers */
-       ot->name = "Remove Render Layer";
-       ot->idname = "SCENE_OT_render_layer_remove";
-       ot->description = "Remove the selected render layer";
+       ot->name = "Remove View Layer";
+       ot->idname = "SCENE_OT_view_layer_remove";
+       ot->description = "Remove the selected view layer";
        
        /* api callbacks */
-       ot->exec = render_layer_remove_exec;
+       ot->exec = view_layer_remove_exec;
 
        /* flags */
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
@@ -769,9 +773,9 @@ static int freestyle_active_module_poll(bContext *C)
 static int freestyle_module_add_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Scene *scene = CTX_data_scene(C);
-       SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
+       ViewLayer *view_layer = BLI_findlink(&scene->view_layers, scene->active_view_layer);
 
-       BKE_freestyle_module_add(&srl->freestyleConfig);
+       BKE_freestyle_module_add(&view_layer->freestyle_config);
 
        WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
 
@@ -795,13 +799,13 @@ void SCENE_OT_freestyle_module_add(wmOperatorType *ot)
 static int freestyle_module_remove_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Scene *scene = CTX_data_scene(C);
-       SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
+       ViewLayer *view_layer = BLI_findlink(&scene->view_layers, scene->active_view_layer);
        PointerRNA ptr = CTX_data_pointer_get_type(C, "freestyle_module", &RNA_FreestyleModuleSettings);
        FreestyleModuleConfig *module = ptr.data;
 
-       BKE_freestyle_module_delete(&srl->freestyleConfig, module);
+       BKE_freestyle_module_delete(&view_layer->freestyle_config, module);
 
-       DAG_id_tag_update(&scene->id, 0);
+       DEG_id_tag_update(&scene->id, 0);
        WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
 
        return OPERATOR_FINISHED;
@@ -825,13 +829,13 @@ void SCENE_OT_freestyle_module_remove(wmOperatorType *ot)
 static int freestyle_module_move_exec(bContext *C, wmOperator *op)
 {
        Scene *scene = CTX_data_scene(C);
-       SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
+       ViewLayer *view_layer = BLI_findlink(&scene->view_layers, scene->active_view_layer);
        PointerRNA ptr = CTX_data_pointer_get_type(C, "freestyle_module", &RNA_FreestyleModuleSettings);
        FreestyleModuleConfig *module = ptr.data;
        int dir = RNA_enum_get(op->ptr, "direction");
 
-       if (BKE_freestyle_module_move(&srl->freestyleConfig, module, dir)) {
-               DAG_id_tag_update(&scene->id, 0);
+       if (BKE_freestyle_module_move(&view_layer->freestyle_config, module, dir)) {
+               DEG_id_tag_update(&scene->id, 0);
                WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
        }
 
@@ -867,11 +871,11 @@ static int freestyle_lineset_add_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Main *bmain = CTX_data_main(C);
        Scene *scene = CTX_data_scene(C);
-       SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
+       ViewLayer *view_layer = BLI_findlink(&scene->view_layers, scene->active_view_layer);
 
-       BKE_freestyle_lineset_add(bmain, &srl->freestyleConfig, NULL);
+       BKE_freestyle_lineset_add(bmain, &view_layer->freestyle_config, NULL);
 
-       DAG_id_tag_update(&scene->id, 0);
+       DEG_id_tag_update(&scene->id, 0);
        WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
 
        return OPERATOR_FINISHED;
@@ -894,21 +898,21 @@ void SCENE_OT_freestyle_lineset_add(wmOperatorType *ot)
 static int freestyle_active_lineset_poll(bContext *C)
 {
        Scene *scene = CTX_data_scene(C);
-       SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
+       ViewLayer *view_layer = BLI_findlink(&scene->view_layers, scene->active_view_layer);
 
-       if (!srl) {
+       if (!view_layer) {
                return false;
        }
 
-       return BKE_freestyle_lineset_get_active(&srl->freestyleConfig) != NULL;
+       return BKE_freestyle_lineset_get_active(&view_layer->freestyle_config) != NULL;
 }
 
 static int freestyle_lineset_copy_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Scene *scene = CTX_data_scene(C);
-       SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
+       ViewLayer *view_layer = BLI_findlink(&scene->view_layers, scene->active_view_layer);
 
-       FRS_copy_active_lineset(&srl->freestyleConfig);
+       FRS_copy_active_lineset(&view_layer->freestyle_config);
 
        return OPERATOR_FINISHED;
 }
@@ -931,11 +935,11 @@ void SCENE_OT_freestyle_lineset_copy(wmOperatorType *ot)
 static int freestyle_lineset_paste_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Scene *scene = CTX_data_scene(C);
-       SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
+       ViewLayer *view_layer = BLI_findlink(&scene->view_layers, scene->active_view_layer);
 
-       FRS_paste_active_lineset(&srl->freestyleConfig);
+       FRS_paste_active_lineset(&view_layer->freestyle_config);
 
-       DAG_id_tag_update(&scene->id, 0);
+       DEG_id_tag_update(&scene->id, 0);
        WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
 
        return OPERATOR_FINISHED;
@@ -959,11 +963,11 @@ void SCENE_OT_freestyle_lineset_paste(wmOperatorType *ot)
 static int freestyle_lineset_remove_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Scene *scene = CTX_data_scene(C);
-       SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
+       ViewLayer *view_layer = BLI_findlink(&scene->view_layers, scene->active_view_layer);
 
-       FRS_delete_active_lineset(&srl->freestyleConfig);
+       FRS_delete_active_lineset(&view_layer->freestyle_config);
 
-       DAG_id_tag_update(&scene->id, 0);
+       DEG_id_tag_update(&scene->id, 0);
        WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
 
        return OPERATOR_FINISHED;
@@ -987,11 +991,11 @@ void SCENE_OT_freestyle_lineset_remove(wmOperatorType *ot)
 static int freestyle_lineset_move_exec(bContext *C, wmOperator *op)
 {
        Scene *scene = CTX_data_scene(C);
-       SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
+       ViewLayer *view_layer = BLI_findlink(&scene->view_layers, scene->active_view_layer);
        int dir = RNA_enum_get(op->ptr, "direction");
 
-       if (FRS_move_active_lineset(&srl->freestyleConfig, dir)) {
-               DAG_id_tag_update(&scene->id, 0);
+       if (FRS_move_active_lineset(&view_layer->freestyle_config, dir)) {
+               DEG_id_tag_update(&scene->id, 0);
                WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
        }
 
@@ -1027,8 +1031,8 @@ static int freestyle_linestyle_new_exec(bContext *C, wmOperator *op)
 {
        Main *bmain = CTX_data_main(C);
        Scene *scene = CTX_data_scene(C);
-       SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
-       FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&srl->freestyleConfig);
+       ViewLayer *view_layer = BLI_findlink(&scene->view_layers, scene->active_view_layer);
+       FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&view_layer->freestyle_config);
 
        if (!lineset) {
                BKE_report(op->reports, RPT_ERROR, "No active lineset to add a new line style to");
@@ -1041,7 +1045,7 @@ static int freestyle_linestyle_new_exec(bContext *C, wmOperator *op)
        else {
                lineset->linestyle = BKE_linestyle_new(bmain, "LineStyle");
        }
-       DAG_id_tag_update(&lineset->linestyle->id, 0);
+       DEG_id_tag_update(&lineset->linestyle->id, 0);
        WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle);
 
        return OPERATOR_FINISHED;
@@ -1065,8 +1069,8 @@ void SCENE_OT_freestyle_linestyle_new(wmOperatorType *ot)
 static int freestyle_color_modifier_add_exec(bContext *C, wmOperator *op)
 {
        Scene *scene = CTX_data_scene(C);
-       SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
-       FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&srl->freestyleConfig);
+       ViewLayer *view_layer = BLI_findlink(&scene->view_layers, scene->active_view_layer);
+       FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&view_layer->freestyle_config);
        int type = RNA_enum_get(op->ptr, "type");
 
        if (!freestyle_linestyle_check_report(lineset, op->reports)) {
@@ -1077,7 +1081,7 @@ static int freestyle_color_modifier_add_exec(bContext *C, wmOperator *op)
                BKE_report(op->reports, RPT_ERROR, "Unknown line color modifier type");
                return OPERATOR_CANCELLED;
        }
-       DAG_id_tag_update(&lineset->linestyle->id, 0);
+       DEG_id_tag_update(&lineset->linestyle->id, 0);
        WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle);
 
        return OPERATOR_FINISHED;
@@ -1105,8 +1109,8 @@ void SCENE_OT_freestyle_color_modifier_add(wmOperatorType *ot)
 static int freestyle_alpha_modifier_add_exec(bContext *C, wmOperator *op)
 {
        Scene *scene = CTX_data_scene(C);
-       SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
-       FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&srl->freestyleConfig);
+       ViewLayer *view_layer = BLI_findlink(&scene->view_layers, scene->active_view_layer);
+       FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&view_layer->freestyle_config);
        int type = RNA_enum_get(op->ptr, "type");
 
        if (!freestyle_linestyle_check_report(lineset, op->reports)) {
@@ -1117,7 +1121,7 @@ static int freestyle_alpha_modifier_add_exec(bContext *C, wmOperator *op)
                BKE_report(op->reports, RPT_ERROR, "Unknown alpha transparency modifier type");
                return OPERATOR_CANCELLED;
        }
-       DAG_id_tag_update(&lineset->linestyle->id, 0);
+       DEG_id_tag_update(&lineset->linestyle->id, 0);
        WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle);
 
        return OPERATOR_FINISHED;
@@ -1145,8 +1149,8 @@ void SCENE_OT_freestyle_alpha_modifier_add(wmOperatorType *ot)
 static int freestyle_thickness_modifier_add_exec(bContext *C, wmOperator *op)
 {
        Scene *scene = CTX_data_scene(C);
-       SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
-       FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&srl->freestyleConfig);
+       ViewLayer *view_layer = BLI_findlink(&scene->view_layers, scene->active_view_layer);
+       FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&view_layer->freestyle_config);
        int type = RNA_enum_get(op->ptr, "type");
 
        if (!freestyle_linestyle_check_report(lineset, op->reports)) {
@@ -1157,7 +1161,7 @@ static int freestyle_thickness_modifier_add_exec(bContext *C, wmOperator *op)
                BKE_report(op->reports, RPT_ERROR, "Unknown line thickness modifier type");
                return OPERATOR_CANCELLED;
        }
-       DAG_id_tag_update(&lineset->linestyle->id, 0);
+       DEG_id_tag_update(&lineset->linestyle->id, 0);
        WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle);
 
        return OPERATOR_FINISHED;
@@ -1185,8 +1189,8 @@ void SCENE_OT_freestyle_thickness_modifier_add(wmOperatorType *ot)
 static int freestyle_geometry_modifier_add_exec(bContext *C, wmOperator *op)
 {
        Scene *scene = CTX_data_scene(C);
-       SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
-       FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&srl->freestyleConfig);
+       ViewLayer *view_layer = BLI_findlink(&scene->view_layers, scene->active_view_layer);
+       FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&view_layer->freestyle_config);
        int type = RNA_enum_get(op->ptr, "type");
 
        if (!freestyle_linestyle_check_report(lineset, op->reports)) {
@@ -1197,7 +1201,7 @@ static int freestyle_geometry_modifier_add_exec(bContext *C, wmOperator *op)
                BKE_report(op->reports, RPT_ERROR, "Unknown stroke geometry modifier type");
                return OPERATOR_CANCELLED;
        }
-       DAG_id_tag_update(&lineset->linestyle->id, 0);
+       DEG_id_tag_update(&lineset->linestyle->id, 0);
        WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle);
 
        return OPERATOR_FINISHED;
@@ -1238,8 +1242,8 @@ static int freestyle_get_modifier_type(PointerRNA *ptr)
 static int freestyle_modifier_remove_exec(bContext *C, wmOperator *op)
 {
        Scene *scene = CTX_data_scene(C);
-       SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
-       FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&srl->freestyleConfig);
+       ViewLayer *view_layer = BLI_findlink(&scene->view_layers, scene->active_view_layer);
+       FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&view_layer->freestyle_config);
        PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", &RNA_LineStyleModifier);
        LineStyleModifier *modifier = ptr.data;
 
@@ -1264,7 +1268,7 @@ static int freestyle_modifier_remove_exec(bContext *C, wmOperator *op)
                        BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier");
                        return OPERATOR_CANCELLED;
        }
-       DAG_id_tag_update(&lineset->linestyle->id, 0);
+       DEG_id_tag_update(&lineset->linestyle->id, 0);
        WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle);
 
        return OPERATOR_FINISHED;
@@ -1288,8 +1292,8 @@ void SCENE_OT_freestyle_modifier_remove(wmOperatorType *ot)
 static int freestyle_modifier_copy_exec(bContext *C, wmOperator *op)
 {
        Scene *scene = CTX_data_scene(C);
-       SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
-       FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&srl->freestyleConfig);
+       ViewLayer *view_layer = BLI_findlink(&scene->view_layers, scene->active_view_layer);
+       FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&view_layer->freestyle_config);
        PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", &RNA_LineStyleModifier);
        LineStyleModifier *modifier = ptr.data;
 
@@ -1314,7 +1318,7 @@ static int freestyle_modifier_copy_exec(bContext *C, wmOperator *op)
                        BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier");
                        return OPERATOR_CANCELLED;
        }
-       DAG_id_tag_update(&lineset->linestyle->id, 0);
+       DEG_id_tag_update(&lineset->linestyle->id, 0);
        WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle);
 
        return OPERATOR_FINISHED;
@@ -1338,8 +1342,8 @@ void SCENE_OT_freestyle_modifier_copy(wmOperatorType *ot)
 static int freestyle_modifier_move_exec(bContext *C, wmOperator *op)
 {
        Scene *scene = CTX_data_scene(C);
-       SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
-       FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&srl->freestyleConfig);
+       ViewLayer *view_layer = BLI_findlink(&scene->view_layers, scene->active_view_layer);
+       FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&view_layer->freestyle_config);
        PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", &RNA_LineStyleModifier);
        LineStyleModifier *modifier = ptr.data;
        int dir = RNA_enum_get(op->ptr, "direction");
@@ -1368,7 +1372,7 @@ static int freestyle_modifier_move_exec(bContext *C, wmOperator *op)
        }
 
        if (changed) {
-               DAG_id_tag_update(&lineset->linestyle->id, 0);
+               DEG_id_tag_update(&lineset->linestyle->id, 0);
                WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle);
        }
 
@@ -1489,7 +1493,7 @@ static int texture_slot_move_exec(bContext *C, wmOperator *op)
                        }
                }
 
-               DAG_id_tag_update(id, 0);
+               DEG_id_tag_update(id, 0);
                WM_event_add_notifier(C, NC_TEXTURE, CTX_data_scene(C));
        }