Merge branch 'blender-v4.4-release'
This commit is contained in:
@@ -48,6 +48,7 @@ void keymap_sculpt(wmKeyConfig *keyconf);
|
||||
/* `sculpt_transform.cc` */
|
||||
|
||||
void update_modal_transform(bContext *C, Object &ob);
|
||||
void cancel_modal_transform(bContext *C, Object &ob);
|
||||
void init_transform(bContext *C, Object &ob, const float mval_fl[2], const char *undo_name);
|
||||
void end_transform(bContext *C, Object &ob);
|
||||
|
||||
|
||||
@@ -576,6 +576,16 @@ void update_modal_transform(bContext *C, Object &ob)
|
||||
flush_update_step(C, UpdateType::Position);
|
||||
}
|
||||
|
||||
void cancel_modal_transform(bContext *C, Object &ob)
|
||||
{
|
||||
/* Cancelling "Elastic" transforms (due to its TransformDisplacementMode::Incremental nature),
|
||||
* requires restoring positions from undo. For "All Vertices" there is no benefit in using the
|
||||
* transform system to update to original positions either. */
|
||||
Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C);
|
||||
|
||||
undo::restore_position_from_undo_step(*depsgraph, ob);
|
||||
}
|
||||
|
||||
void end_transform(bContext *C, Object &ob)
|
||||
{
|
||||
SculptSession &ss = *ob.sculpt;
|
||||
|
||||
@@ -110,7 +110,13 @@ static void recalcData_sculpt(TransInfo *t)
|
||||
{
|
||||
BKE_view_layer_synced_ensure(t->scene, t->view_layer);
|
||||
Object *ob = BKE_view_layer_active_object_get(t->view_layer);
|
||||
sculpt_paint::update_modal_transform(t->context, *ob);
|
||||
|
||||
if (t->state == TRANS_CANCEL) {
|
||||
sculpt_paint::cancel_modal_transform(t->context, *ob);
|
||||
}
|
||||
else {
|
||||
sculpt_paint::update_modal_transform(t->context, *ob);
|
||||
}
|
||||
}
|
||||
|
||||
static void special_aftertrans_update__sculpt(bContext *C, TransInfo *t)
|
||||
|
||||
Reference in New Issue
Block a user