Curves: Add notifier to update spreadsheet when sculpting

This commit is contained in:
Dalai Felinto 2022-05-12 11:47:02 +02:00
parent 6dcda1b9aa
commit 77d3e6b439
5 changed files with 15 additions and 0 deletions

View File

@ -37,6 +37,8 @@
#include "ED_screen.h"
#include "ED_view3d.h"
#include "WM_api.h"
/**
* The code below uses a prefix naming convention to indicate the coordinate space:
* cu: Local space of the curves object that is being edited.
@ -252,6 +254,7 @@ struct AddOperationExecutor {
curves_->update_curve_types();
DEG_id_tag_update(&curves_id_->id, ID_RECALC_GEOMETRY);
WM_main_add_notifier(NC_GEOM | ND_DATA, &curves_id_->id);
ED_region_tag_redraw(region_);
}

View File

@ -37,6 +37,8 @@
#include "UI_interface.h"
#include "WM_api.h"
/**
* The code below uses a prefix naming convention to indicate the coordinate space:
* cu: Local space of the curves object that is being edited.
@ -186,6 +188,7 @@ struct CombOperationExecutor {
curves_->tag_positions_changed();
DEG_id_tag_update(&curves_id_->id, ID_RECALC_GEOMETRY);
WM_main_add_notifier(NC_GEOM | ND_DATA, &curves_id_->id);
ED_region_tag_redraw(region_);
}

View File

@ -35,6 +35,8 @@
#include "ED_screen.h"
#include "ED_view3d.h"
#include "WM_api.h"
/**
* The code below uses a suffix naming convention to indicate the coordinate space:
* cu: Local space of the curves object that is being edited.
@ -137,6 +139,7 @@ struct DeleteOperationExecutor {
curves_->remove_curves(mask);
DEG_id_tag_update(&curves_id_->id, ID_RECALC_GEOMETRY);
WM_main_add_notifier(NC_GEOM | ND_DATA, &curves_id_->id);
ED_region_tag_redraw(region_);
}

View File

@ -36,6 +36,8 @@
#include "ED_screen.h"
#include "ED_view3d.h"
#include "WM_api.h"
#include "curves_sculpt_intern.hh"
/**
@ -356,6 +358,7 @@ struct CurvesEffectOperationExecutor {
curves_->tag_positions_changed();
DEG_id_tag_update(&curves_id_->id, ID_RECALC_GEOMETRY);
WM_main_add_notifier(NC_GEOM | ND_DATA, &curves_id_->id);
ED_region_tag_redraw(region_);
}

View File

@ -37,6 +37,8 @@
#include "ED_screen.h"
#include "ED_view3d.h"
#include "WM_api.h"
/**
* The code below uses a prefix naming convention to indicate the coordinate space:
* - `cu`: Local space of the curves object that is being edited.
@ -147,6 +149,7 @@ struct SnakeHookOperatorExecutor {
curves_->tag_positions_changed();
DEG_id_tag_update(&curves_id_->id, ID_RECALC_GEOMETRY);
WM_main_add_notifier(NC_GEOM | ND_DATA, &curves_id_->id);
ED_region_tag_redraw(region_);
}