diff options
Diffstat (limited to 'source/blender/editors/space_view3d')
8 files changed, 42 insertions, 42 deletions
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 0c4e370ef8c..357d04e0ce9 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -782,7 +782,7 @@ static void do_view3d_vgroup_buttons(bContext *C, void *UNUSED(arg), int event) ViewLayer *view_layer = CTX_data_view_layer(C); Object *ob = view_layer->basact->object; ED_vgroup_vert_active_mirror(ob, event - B_VGRP_PNL_EDIT_SINGLE); - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); } } @@ -1117,7 +1117,7 @@ static void do_view3d_region_buttons(bContext *C, void *UNUSED(index), int event case B_OBJECTPANELMEDIAN: if (ob) { v3d_editvertex_buts(NULL, v3d, ob, 1.0); - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); } break; } diff --git a/source/blender/editors/space_view3d/view3d_camera_control.c b/source/blender/editors/space_view3d/view3d_camera_control.c index 24871e16db6..15edce3fc87 100644 --- a/source/blender/editors/space_view3d/view3d_camera_control.c +++ b/source/blender/editors/space_view3d/view3d_camera_control.c @@ -243,7 +243,7 @@ void ED_view3d_cameracontrol_update( ob_update = v3d->camera->parent; while (ob_update) { - DEG_id_tag_update(&ob_update->id, OB_RECALC_OB); + DEG_id_tag_update(&ob_update->id, ID_RECALC_TRANSFORM); ob_update = ob_update->parent; } @@ -265,7 +265,7 @@ void ED_view3d_cameracontrol_update( BKE_object_apply_mat4(v3d->camera, view_mat, true, true); - DEG_id_tag_update(&v3d->camera->id, OB_RECALC_OB); + DEG_id_tag_update(&v3d->camera->id, ID_RECALC_TRANSFORM); copy_v3_v3(v3d->camera->size, size_back); @@ -300,7 +300,7 @@ void ED_view3d_cameracontrol_release( /* store the original camera loc and rot */ BKE_object_tfm_restore(ob_back, vctrl->obtfm); - DEG_id_tag_update(&ob_back->id, OB_RECALC_OB); + DEG_id_tag_update(&ob_back->id, ID_RECALC_TRANSFORM); } else { /* Non Camera we need to reset the view back to the original location because the user canceled*/ @@ -312,7 +312,7 @@ void ED_view3d_cameracontrol_release( rv3d->dist = vctrl->dist_backup; } else if (vctrl->persp_backup == RV3D_CAMOB) { /* camera */ - DEG_id_tag_update((ID *)view3d_cameracontrol_object(vctrl), OB_RECALC_OB); + DEG_id_tag_update((ID *)view3d_cameracontrol_object(vctrl), ID_RECALC_TRANSFORM); /* always, is set to zero otherwise */ copy_v3_v3(rv3d->ofs, vctrl->ofs_backup); diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 11927d6d530..2bc680bcbeb 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -2736,7 +2736,7 @@ static int view3d_all_exec(bContext *C, wmOperator *op) } if (center) { - DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE); } if (!changed) { @@ -3283,7 +3283,7 @@ static int render_border_exec(bContext *C, wmOperator *op) } if (rv3d->persp == RV3D_CAMOB) { - DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE); } return OPERATOR_FINISHED; } @@ -3343,7 +3343,7 @@ static int clear_render_border_exec(bContext *C, wmOperator *UNUSED(op)) border->ymax = 1.0f; if (rv3d->persp == RV3D_CAMOB) { - DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE); } return OPERATOR_FINISHED; } @@ -4802,7 +4802,7 @@ void ED_view3d_cursor3d_update( mbus, &scene->id, scene, Scene, cursor_location); } - DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE); } static int view3d_cursor3d_invoke(bContext *C, wmOperator *op, const wmEvent *event) diff --git a/source/blender/editors/space_view3d/view3d_gizmo_empty.c b/source/blender/editors/space_view3d/view3d_gizmo_empty.c index 9ce0041c76c..58cfeba0480 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_empty.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_empty.c @@ -96,7 +96,7 @@ static void gizmo_empty_image_prop_matrix_set( Object *ob = igzgroup->state.ob; ob->empty_drawsize = matrix[0][0]; - DEG_id_tag_update(&ob->id, DEG_TAG_TRANSFORM); + DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM); float dims[2]; RNA_float_get_array(gz->ptr, "dimensions", dims); diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index b423e61009f..b2fbdbad31c 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -443,7 +443,7 @@ static void do_lasso_select_objects( } if (changed) { - DEG_id_tag_update(&vc->scene->id, DEG_TAG_SELECT_UPDATE); + DEG_id_tag_update(&vc->scene->id, ID_RECALC_SELECT); WM_main_add_notifier(NC_SCENE | ND_OB_SELECT, vc->scene); } } @@ -541,7 +541,7 @@ static void do_lasso_select_pose( const bool changed_multi = do_pose_tag_select_op_exec(bases, bases_len, sel_op); if (changed_multi) { - DEG_id_tag_update(&vc->scene->id, DEG_TAG_SELECT_UPDATE); + DEG_id_tag_update(&vc->scene->id, ID_RECALC_SELECT); WM_main_add_notifier(NC_SCENE | ND_OB_SELECT, vc->scene); } @@ -1025,7 +1025,7 @@ static void view3d_lasso_select( break; } - DEG_id_tag_update(vc->obedit->data, DEG_TAG_SELECT_UPDATE); + DEG_id_tag_update(vc->obedit->data, ID_RECALC_SELECT); WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc->obedit->data); } FOREACH_OBJECT_IN_MODE_END; @@ -1150,7 +1150,7 @@ static int object_select_menu_exec(bContext *C, wmOperator *op) /* undo? */ if (changed) { Scene *scene = CTX_data_scene(C); - DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE); + DEG_id_tag_update(&scene->id, ID_RECALC_SELECT); WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); return OPERATOR_FINISHED; } @@ -1719,8 +1719,8 @@ static bool ed_object_select_pick( retval = true; - DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE); - DEG_id_tag_update(&clip->id, DEG_TAG_SELECT_UPDATE); + DEG_id_tag_update(&scene->id, ID_RECALC_SELECT); + DEG_id_tag_update(&clip->id, ID_RECALC_SELECT); WM_event_add_notifier(C, NC_MOVIECLIP | ND_SELECT, track); WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); @@ -1853,7 +1853,7 @@ static bool ed_object_select_pick( } } - DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE); + DEG_id_tag_update(&scene->id, ID_RECALC_SELECT); WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); } @@ -2437,7 +2437,7 @@ finally: MEM_freeN(vbuffer); if (changed) { - DEG_id_tag_update(&vc->scene->id, DEG_TAG_SELECT_UPDATE); + DEG_id_tag_update(&vc->scene->id, ID_RECALC_SELECT); WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, vc->scene); return OPERATOR_FINISHED; } @@ -2510,7 +2510,7 @@ static int do_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, const eS const bool changed_multi = do_pose_tag_select_op_exec(bases, bases_len, sel_op); if (changed_multi) { - DEG_id_tag_update(&vc->scene->id, DEG_TAG_SELECT_UPDATE); + DEG_id_tag_update(&vc->scene->id, ID_RECALC_SELECT); WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, vc->scene); } @@ -2546,7 +2546,7 @@ static int view3d_box_select_exec(bContext *C, wmOperator *op) vc.em = BKE_editmesh_from_object(vc.obedit); ret |= do_mesh_box_select(&vc, &rect, sel_op); if (ret & OPERATOR_FINISHED) { - DEG_id_tag_update(vc.obedit->data, DEG_TAG_SELECT_UPDATE); + DEG_id_tag_update(vc.obedit->data, ID_RECALC_SELECT); WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc.obedit->data); } break; @@ -2554,28 +2554,28 @@ static int view3d_box_select_exec(bContext *C, wmOperator *op) case OB_SURF: ret |= do_nurbs_box_select(&vc, &rect, sel_op); if (ret & OPERATOR_FINISHED) { - DEG_id_tag_update(vc.obedit->data, DEG_TAG_SELECT_UPDATE); + DEG_id_tag_update(vc.obedit->data, ID_RECALC_SELECT); WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc.obedit->data); } break; case OB_MBALL: ret |= do_meta_box_select(&vc, &rect, sel_op); if (ret & OPERATOR_FINISHED) { - DEG_id_tag_update(vc.obedit->data, DEG_TAG_SELECT_UPDATE); + DEG_id_tag_update(vc.obedit->data, ID_RECALC_SELECT); WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc.obedit->data); } break; case OB_ARMATURE: ret |= do_armature_box_select(&vc, &rect, sel_op); if (ret & OPERATOR_FINISHED) { - DEG_id_tag_update(&vc.obedit->id, DEG_TAG_SELECT_UPDATE); + DEG_id_tag_update(&vc.obedit->id, ID_RECALC_SELECT); WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, vc.obedit); } break; case OB_LATTICE: ret |= do_lattice_box_select(&vc, &rect, sel_op); if (ret & OPERATOR_FINISHED) { - DEG_id_tag_update(vc.obedit->data, DEG_TAG_SELECT_UPDATE); + DEG_id_tag_update(vc.obedit->data, ID_RECALC_SELECT); WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc.obedit->data); } break; @@ -3278,7 +3278,7 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op) if (CTX_data_edit_object(C)) { obedit_circle_select(&vc, select, mval, (float)radius); - DEG_id_tag_update(obact->data, DEG_TAG_SELECT_UPDATE); + DEG_id_tag_update(obact->data, ID_RECALC_SELECT); WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obact->data); } else if (BKE_paint_select_face_test(obact)) { @@ -3301,7 +3301,7 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op) } else { if (object_circle_select(&vc, select, mval, (float)radius)) { - DEG_id_tag_update(&vc.scene->id, DEG_TAG_SELECT_UPDATE); + DEG_id_tag_update(&vc.scene->id, ID_RECALC_SELECT); WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, vc.scene); } } diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index a220257c63f..1bff52e7950 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -180,7 +180,7 @@ static int snap_sel_to_grid_exec(bContext *C, wmOperator *UNUSED(op)) } ob->pose->flag |= (POSE_LOCKED | POSE_DO_UNLOCK); - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); } else { vec[0] = -ob_eval->obmat[3][0] + gridf * floorf(0.5f + ob_eval->obmat[3][0] / gridf); @@ -204,7 +204,7 @@ static int snap_sel_to_grid_exec(bContext *C, wmOperator *UNUSED(op)) /* auto-keyframing */ ED_autokeyframe_object(C, scene, ob, ks); - DEG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM); } } FOREACH_SELECTED_EDITABLE_OBJECT_END; @@ -379,7 +379,7 @@ static int snap_selected_to_location(bContext *C, const float snap_target_global ob->pose->flag |= (POSE_LOCKED | POSE_DO_UNLOCK); - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); } CTX_DATA_END; } @@ -437,7 +437,7 @@ static int snap_selected_to_location(bContext *C, const float snap_target_global /* auto-keyframing */ ED_autokeyframe_object(C, scene, ob, ks); - DEG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM); } } @@ -527,7 +527,7 @@ static int snap_curs_to_grid_exec(bContext *C, wmOperator *UNUSED(op)) curs[2] = gridf * floorf(0.5f + curs[2] / gridf); WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d); /* hrm */ - DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE); return OPERATOR_FINISHED; } @@ -725,7 +725,7 @@ static int snap_curs_to_sel_exec(bContext *C, wmOperator *UNUSED(op)) Scene *scene = CTX_data_scene(C); if (snap_curs_to_sel_ex(C, scene->cursor.location)) { WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, NULL); - DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE); return OPERATOR_FINISHED; } @@ -802,7 +802,7 @@ static int snap_curs_to_active_exec(bContext *C, wmOperator *UNUSED(op)) if (snap_calc_active_center(C, false, scene->cursor.location)) { WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d); - DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE); return OPERATOR_FINISHED; } @@ -835,7 +835,7 @@ static int snap_curs_to_center_exec(bContext *C, wmOperator *UNUSED(op)) zero_v3(scene->cursor.location); - DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE); WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, NULL); return OPERATOR_FINISHED; diff --git a/source/blender/editors/space_view3d/view3d_utils.c b/source/blender/editors/space_view3d/view3d_utils.c index d20dfa10923..a5be2a8cc83 100644 --- a/source/blender/editors/space_view3d/view3d_utils.c +++ b/source/blender/editors/space_view3d/view3d_utils.c @@ -531,7 +531,7 @@ bool ED_view3d_camera_lock_sync(const Depsgraph *depsgraph, View3D *v3d, RegionV ob_update = v3d->camera; while (ob_update) { - DEG_id_tag_update(&ob_update->id, OB_RECALC_OB); + DEG_id_tag_update(&ob_update->id, ID_RECALC_TRANSFORM); WM_main_add_notifier(NC_OBJECT | ND_TRANSFORM, ob_update); ob_update = ob_update->parent; } @@ -543,7 +543,7 @@ bool ED_view3d_camera_lock_sync(const Depsgraph *depsgraph, View3D *v3d, RegionV ED_view3d_to_object(depsgraph, v3d->camera, rv3d->ofs, rv3d->viewquat, rv3d->dist); BKE_object_tfm_protected_restore(v3d->camera, &obtfm, v3d->camera->protectflag | protect_scale_all); - DEG_id_tag_update(&v3d->camera->id, OB_RECALC_OB); + DEG_id_tag_update(&v3d->camera->id, ID_RECALC_TRANSFORM); WM_main_add_notifier(NC_OBJECT | ND_TRANSFORM, v3d->camera); } diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 1cced23b24d..d99fa5e8760 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -456,7 +456,7 @@ static int view3d_camera_to_view_exec(bContext *C, wmOperator *UNUSED(op)) BKE_object_tfm_protected_restore(v3d->camera, &obtfm, v3d->camera->protectflag); - DEG_id_tag_update(&v3d->camera->id, OB_RECALC_OB); + DEG_id_tag_update(&v3d->camera->id, ID_RECALC_TRANSFORM); rv3d->persp = RV3D_CAMOB; WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, v3d->camera); @@ -541,7 +541,7 @@ static int view3d_camera_to_view_selected_exec(bContext *C, wmOperator *op) BKE_object_tfm_protected_restore(camera_ob, &obtfm, OB_LOCK_SCALE | OB_LOCK_ROT4D); /* notifiers */ - DEG_id_tag_update(&camera_ob->id, OB_RECALC_OB); + DEG_id_tag_update(&camera_ob->id, ID_RECALC_TRANSFORM); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, camera_ob); return OPERATOR_FINISHED; } @@ -1381,11 +1381,11 @@ static int localview_exec(bContext *C, wmOperator *op) /* Unselected objects become selected when exiting. */ if (v3d->localvd == NULL) { - DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE); + DEG_id_tag_update(&scene->id, ID_RECALC_SELECT); WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); } else { - DEG_id_tag_update(&scene->id, DEG_TAG_BASE_FLAGS_UPDATE); + DEG_id_tag_update(&scene->id, ID_RECALC_BASE_FLAGS); } return OPERATOR_FINISHED; @@ -1431,7 +1431,7 @@ static int localview_remove_from_exec(bContext *C, wmOperator *op) if (changed) { DEG_on_visible_update(bmain, false); - DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE); + DEG_id_tag_update(&scene->id, ID_RECALC_SELECT); WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene); return OPERATOR_FINISHED; |